Generate vector embeddings for input text(s).
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer authentication header of the form Bearer <token> where <token> is your API key |
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Embedding model identifier |
| input | string or array | Yes | Text(s) to embed. Can be a single string or array of strings |
| encoding_format | string | No | Format of the embedding. Options: float, base64. Default: float |
| dimensions | integer | No | Matryoshka dimensions for output embeddings. Default: model’s full dimensions |
| modality | string | No | Modality type: text, image, audio. Default: text |
| priority | string | No | Priority level: high, normal, low. Default: normal |
| include_input | boolean | No | Include original input text in response. Default: false |
| chunking | object | No | Chunking configuration for long texts (see Chunking Configuration below) |
chunking parameter accepts an object with the following fields:
| Parameter | Type | Description |
|---|---|---|
| enabled | boolean | Enable text chunking. Default: false |
| strategy | string | Chunking strategy: token, sentence, recursive, semantic, code, table. Default: token |
| chunk_size | integer | Max tokens per chunk (1-8192). Default: 512 |
| chunk_overlap | integer | Token overlap between chunks. Default: 0 |
| tokenizer | string | Tokenizer: cl100k_base, p50k_base, r50k_base, gpt2. Default: cl100k_base |
| min_sentences | integer | [sentence strategy] Minimum sentences per chunk. Default: 1 |