Skip to main content
For coding agents, discover the current recommended embedding shortlist first with GET /v1/models?recommended_for=embedding, then send the selected model explicitly to this endpoint.

Request Body

Synchronous request timeout: This non-chat endpoint waits for the routed model to finish. Large inputs, long audio, or large batches can exceed common 30s client defaults, so set your HTTP client timeout to at least 120s.
string
required
ID of the embedding model to use (e.g., text-embedding-3-small).
string | array
required
Input text to embed. Can be a string or array of strings.
string
default:"float"
Format for the embeddings: float or base64.
integer
Number of dimensions for the output (model-specific).
string
A unique identifier representing your end-user for abuse monitoring.

Available Models

Response

string
Always list.
array
Array of embedding objects.Each object contains:
  • object (string): embedding
  • index (integer): Index in the input array
  • embedding (array): The embedding vector
string
Model used.
object
Token usage with prompt_tokens and total_tokens.

Batch Embeddings