Embeddings
Convert text into numerical vectors with the OpenAI-compatible Embeddings endpoint.
Basic request
The response contains vectors in the data array and usage information in usage when available.
Python
Node.js / TypeScript
Request fields
Batch inputs
Batch related texts in one request when the selected model and your input limits allow it. Preserve each response item's index so you can map vectors back to the original inputs.
Vector compatibility
Do not mix embeddings from different model IDs or dimension settings in the same vector index. Re-embed existing data if you change either one.
For retrieval systems, use the same model and preprocessing strategy for documents and user queries.
Alternative path
The API specification also exposes a model-in-path embedding endpoint:
Prefer /v1/embeddings for new OpenAI-compatible integrations unless your existing client requires the engine-style path.
