/v1/embeddings endpoint converts text into numerical vector representations (embeddings). You can pass a single string or a batch of strings in one request. The resulting vectors can be stored in a vector database and used for semantic search, document clustering, classification, or as input to a retrieval-augmented generation (RAG) pipeline. This endpoint is compatible with the OpenAI embeddings format.
Request parameters
string
required
The embedding model to use. Use the list models endpoint to find available embedding model IDs.
string | string[]
required
The text to embed. Pass a single string or an array of strings to embed multiple inputs in one request. Token limits vary by model.
string
default:"float"
The format in which to return the embedding vectors. Use
"float" for an array of floating-point numbers, or "base64" for a Base64-encoded string.Response fields
string
Always
"list".array
An array of embedding objects, one for each input string. Objects are returned in the same order as the input.
string
The model used to generate the embeddings.
object
Token usage for the request.
