Create Embeddings (Cohere)
POST/cohere/v2/embed
Generate embeddings for multimodal inputs (text, image, mixed) or when you need configurable embedding dimensions.
This endpoint is compatible with the Cohere Embedding API. API syntax follows Cohere's official documentation.
info
This endpoint is only compatible with qwen3-vl-embedding-8b.
For the bge-m3 model, use the OpenAI-compatible endpoint.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
inputs | array | Array of input objects containing content blocks (text, image, or mixed) | |
model | string | ✅ | Must be qwen3-vl-embedding-8b |
input_type | string | ✅ | search_document, search_query or image |
output_dimension | integer | Output embedding dimension | |
embedding_types | array | e.g. ["float"] |
warning
Following values classification and clustering are not supported as input_type.
Supported dimensions
output_dimension possible values are:
128, 256, 384, 512, 768, 1024, 1536, 2048, 2560, 3072, 3584 and 4096.
Text embedding
Request Example — Text embedding
curl -X POST https://api.ig1.ai/cohere/v2/embed \
-H "Authorization: Bearer $IG1AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": [
{
"content": [
{ "type": "text", "text": "The food was delicious" },
{ "type": "text", "text": "the waiter was happy" }
]
}
],
"model": "qwen3-vl-embedding-8b",
"input_type": "search_document",
"output_dimension": 2048,
"embedding_types": ["float"]
}'
Response example — Text embedding
{
"id": "2988",
"embeddings": {
"float": [
[
0.021447632,
-0.0013963302,
"...",
-0.004244844,
0.030830972
]
]
},
"texts": [
"The food was delicious"
],
"meta": {
"api_version": {
"version": "2",
"is_experimental": true
},
"billed_units": {
"input_tokens": 20
}
},
"model": "qwen3-vl-embedding-8b",
"usage": {
"billed_units": {
"input_tokens": 20
}
}
}
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Request identifier |
embeddings | object | Embedding vectors grouped by type (e.g. float) |
texts | array | Input texts that were embedded |
meta.billed_units.input_tokens | integer | Tokens billed for this request |
model | string | Model used |
Image Embedding
Request Example — Image embedding
curl -X POST https://api.ig1.ai/cohere/v2/embed \
-H "Authorization: Bearer $IG1AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-vl-embedding-8b",
"inputs": [
{
"content": [
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<BASE64_ENCODED_IMAGE_DATA>"
}
}
]
}
],
"input_type": "image",
"output_dimension": 2048,
"embedding_types": ["float"]
}'
tip
For image inputs, use "input_type": "image" and wrap the base64-encoded image in an image_url content block. The response includes images counter under billed_units.
Response Example — Image embedding
{
"id": "3181",
"embeddings": {
"float": [
[
0.03056407,
-0.024977088,
0.035329435,
"...",
-0.031385683,
-0.023662506
]
]
},
"texts": [],
"images": [
{
"width": 1280,
"height": 720,
"format": "png",
"bit_depth": 32
}
],
"meta": {
"api_version": {
"version": "2",
"is_experimental": true
},
"billed_units": {
"input_tokens": 898,
"images": 1
}
},
"model": "qwen3-vl-embedding-8b",
"usage": {
"billed_units": {
"images": 1,
"input_tokens": 898
}
}
}
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Request identifier |
embeddings | object | Embedding vectors grouped by type (e.g. float) |
meta.billed_units.input_tokens | integer | Tokens billed for this request |
meta.billed_units.images | integer | Number of Images that were embedded |
model | string | Model used |