Text
Create Multimodal Embeddings
Creates embedding vectors with a multimodal embedding model
Overview
Use this endpoint with models whose details list the multimodal-embedding operation. Read supported_operations in GET /v1/models/{model} before you send a request. Text-only embedding models use Create Embedding, and this endpoint returns 400 unsupported_endpoint for them.
Only text input is active. A request with image_url or image_base64 returns 400 image_input_deferred.
Request Body
ID of a model that lists multimodal-embedding, such as qwen3-vl-embedding.
One input item, or an array of items. Each item needs at least one of the fields below, and the response has one entry per item.
text(string): Text to embed.image_url(string): Public image URL. Not active yet.image_base64(string) andimage_mime_type(string): Base64 image data and its MIME type. Not active yet.
Number of dimensions of each returned vector, a positive integer. The maximum depends on the model.
Response
Always list.
One entry per input item.
Each entry contains:
object(string):embeddingindex(integer): Index of the input itemtext_embedding(array): The vector of a text item. An entry carries one vector field named by its modality:text_embedding,image_embedding,video_embedding, oraudio_embedding.
Model used.
Token usage with prompt_tokens and total_tokens, when the model reports it.
Request
curl -X POST "https://api.tokenlab.sh/v1/multimodal/embeddings" \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-vl-embedding",
"input": [
{"text": "A red bicycle leaning against a brick wall"},
{"text": "A city street at night"}
]
}'The example vector is shortened for readability.
Response
{
"object": "list",
"data": [
{ "object": "embedding", "index": 0, "text_embedding": [0.0123, -0.0456, 0.0789] },
{ "object": "embedding", "index": 1, "text_embedding": [0.0211, 0.0334, -0.0102] }
],
"model": "qwen3-vl-embedding",
"usage": { "prompt_tokens": 18, "total_tokens": 18 }
}Errors
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | input is missing, empty, or an item has none of text, image_url, image_base64 |
400 | unsupported_endpoint | The model does not list multimodal-embedding |
400 | image_input_deferred | An item contains an image |
Handle other statuses as in Handle API errors.
Authorization
BearerAuth API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
In: header
Headers
Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Verified first and may switch once to Official only before output, request acceptance, or persistent resource creation.
Value in
- "auto"
- "verified"
- "official"
Request Body
application/json
Response
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json