Skip to main content
POST
Zero-shot image classification

Body

application/json

Zero-shot classification for images using a set of candidate labels.

image
required

Image or list of images to classify (base64, URL or binary). Required.

candidate_labels
string[]
required

Candidate label list to evaluate for each image. Required.

hypothesis_template
string
default:This is a photo of {}

Template used to form hypotheses using the candidate labels for scoring.

timeout
number | null

Timeout for fetching remote images in seconds; null means no timeout.

Response

200 - application/json

Zero-shot image classification results

label
string

Predicted label name.

score
number

Confidence score (probability-like) for the label.