Vision encoders

Embed an image

Run a vision encoder on one image, or a video encoder on a short clip, and get its embedding.

View as Markdown
POST/v1/embed

Embeddings come back L2-normalised at the model's real width. Depth-image encoders (eth/defm) take a depth map as image: a 16-bit grayscale PNG of depth in millimetres, 0 for no measurement.

Authorization

Request body

JSON, with Content-Type: application/json.

  • modelstringrequired

    The encoder to run, e.g. google/siglip2-so400m. The live models for this endpoint are listed below.

  • imagestring

    The image, base64 JPEG or PNG. Under 4 MB of base64. Send image or frames.

  • framesstring[]

    Video encoders only (e.g. meta/v-jepa-2-encoder): a clip of 1–64 frames, oldest first, all the same size, under 4 MB of base64 together. Billed per 16 frames, so 64 frames cost 4 calls.

Response

  • idstring

    Unique id of this call, e.g. emb_48213. It matches the call in your Activity dashboard.

  • modelstring

    The model that answered.

  • backendstring

    "http": the real model ran on a GPU. "simulated": stand-in output of the same shape, as test keys get.

  • sandboxboolean

    true when the call was made with a test key: the output is simulated, nothing ran on a GPU and nothing was charged. Absent otherwise.

  • embeddingnumber[]

    The embedding, unit length. For a clip, one vector for the whole clip.

  • diminteger

    Its length, e.g. 1152 for SigLIP 2 So400m.

  • usageobject

    What the call cost.

    Show 2 child attributes
    • cost_usdnumber

      Charged to your credits, in US dollars.

    • latency_msinteger

      Time the model took, in milliseconds.

Errors

400

frames sent to an encoder that embeds single images

Plus the errors every endpoint shares: invalid input, keys, credits and cold starts. See Errors.

Models

40 live models for /embed. Each page has a ready-made request.

1 more is coming soon. See the models page.