CoreViz
API

Image Tagging

POST /api/ai/tag — classify or tag an image using AI

Image Tagging

Classify an image or generate tags using a custom prompt.

SDK equivalent: sdk.tag() — see Vision SDK

Endpoint

POST /api/ai/tag

Request

curl -X POST https://lab.coreviz.io/api/ai/tag \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "image": "https://example.com/photo.jpg",
    "prompt": "What type of vehicle is this?",
    "options": ["car", "truck", "motorcycle"],
    "multiple": false
  }'

Request Body

FieldTypeRequiredDescription
imagestringYesImage URL or base64 data URI
promptstringYesClassification question or tagging context
optionsstring[]NoConstrained list of valid tag values
multiplebooleanNoAllow multiple tags (default: true)

Response

{
  "tags": ["car"],
  "raw": { ... }
}
FieldTypeDescription
tagsstring[]Selected tags or classifications
rawobjectRaw model response