/v1/embeddings). It maps text and images into a single 2048-dimension vector space — ideal for image-text retrieval and semantic search.
Key capabilities
- Multimodal input — Embed text, an image, or a combined text+image input into one vector
- Unified vector space — Text and image vectors are directly comparable
- 2048 dimensions — Fixed output dimension
- Split billing — Text input and vision input are billed at separate rates; usage is reported per type
Quick example
Unlike standard embedding models,
input is an array of content objects (Ark multimodal format), not a plain string. Text-only input also uses this format: [{"type": "text", "text": "..."}]. One request returns one fused embedding for the whole input.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be doubao-embedding-vision |
input | array | Yes | Content objects: {type: "text", text} and/or {type: "image_url", image_url: {url}} |
input[].image_url.url | string | Image items | Image URL or Base64 data URI |
Response
| Field | Description |
|---|---|
data.embedding | 2048-dimension float vector for the whole input |
usage.prompt_tokens_details.text_tokens | Text tokens — billed at the text rate |
usage.prompt_tokens_details.image_tokens | Image tokens — billed at the vision rate (higher) |
API Reference
View the interactive API playground.