> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed v4.0

> Cohere embedding model for multilingual retrieval, with long-context text support.

Cohere embedding model for multilingual retrieval, with long-context text support.

## Model Information

| Field                | Description         |
| -------------------- | ------------------- |
| `model`              | embed-v4.0          |
| `context`            | 128K tokens         |
| `default dimensions` | 1536                |
| `endpoint`           | POST /v1/embeddings |

Context and output sizes describe the model specification. Effective request limits, availability, and billing depend on the MixRoute route.

## Capabilities and Usage

* Set input\_type=search\_document for indexed documents and search\_query for user queries. classification and clustering select other task types.
* This endpoint example embeds text. Do not assume native Cohere image/PDF input objects work in the OpenAI-compatible input field.
* Use the same model and vector dimensions for documents and queries. Output vectors are returned in data\[].embedding.

## Request Example

Set `MIXROUTE_API_KEY` before making the request.

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/embeddings" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "embed-v4.0",
  "input": [
    "An API reference for developers."
  ],
  "input_type": "search_document",
  "encoding_format": "float"
}'
```

## Request Fields

| Field             | Description                                           |
| ----------------- | ----------------------------------------------------- |
| `model`           | Required. Use the exact model ID above.               |
| `input`           | Required text string or array of strings.             |
| `input_type`      | Required for Cohere embeddings; select the task type. |
| `encoding_format` | Use float for a JSON vector array.                    |

Complete request format: [embeddings](/en/api-reference/endpoint/embeddings).
