Embeddings
Generate embeddings for text inputs. POST /api/v1/embeddings.
Navigation
Embeddings
POST /api/v1/embeddingsCreates an embedding vector for the given input. Requires a deployment with an embedding-capable model.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID |
input | string | array | Yes | The text to embed (string or array of strings) |
encoding_format | string | No | float (default) or base64 |
Response
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [0.0023, -0.0091, 0.0154, ...],
"index": 0
}
],
"model": "nomic-embed-text",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}