API Reference
Embeddings
POST /v1/embeddings — generate text embeddings from any configured embedding model.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/embeddings — generate text embeddings from any configured embedding model.
curl https://your-gateway/v1/embeddings \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "The quick brown fox jumps over the lazy dog"
}'
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Logical model name (must be an embedding model) |
input | string or array | Yes | Text or array of texts to embed |
encoding_format | string | No | float (default) or base64 |
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [0.0023, -0.0091, 0.0156, ...],
"index": 0
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 9,
"total_tokens": 9
}
}
| Provider | Notes |
|---|---|
| openai, mistral, groq, fireworks, ollama, together | No translation needed (OpenAI-compatible) |
| gemini, vertex | Translated to/from batchEmbedContents |
| cohere | Translated to/from /v2/embed |
| anthropic, bedrock, deepseek, perplexity, xai | Embeddings not supported |
{
"model": "text-embedding-3-small",
"input": [
"First text to embed",
"Second text to embed",
"Third text to embed"
]
}