Skip to main content

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

ParameterTypeRequiredDescription
inputsarrayArray of input objects containing content blocks (text, image, or mixed)
modelstringMust be qwen3-vl-embedding-8b
input_typestringsearch_document, search_query or image
output_dimensionintegerOutput embedding dimension
embedding_typesarraye.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

FieldTypeDescription
idstringRequest identifier
embeddingsobjectEmbedding vectors grouped by type (e.g. float)
textsarrayInput texts that were embedded
meta.billed_units.input_tokensintegerTokens billed for this request
modelstringModel 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

FieldTypeDescription
idstringRequest identifier
embeddingsobjectEmbedding vectors grouped by type (e.g. float)
meta.billed_units.input_tokensintegerTokens billed for this request
meta.billed_units.imagesintegerNumber of Images that were embedded
modelstringModel used