/embeddingsCreate embedding vectors
Creates embedding vectors for the supplied text or token input. Provide model and input, and use encoding_format or dimensions to control the returned vectors when the selected model supports those options.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Input and options for generating one or more embeddings.
One documented failure
slow_downYour request rate increased too quickly. Please reduce the request rate and gradually increase it again.
Traffic increased too quickly
One documented failure
server_is_overloadedThe model is temporarily overloaded. Please retry your request after a brief delay.
The requested model is temporarily overloaded
A 400 is returned for invalid input or request parameters; a 401 indicates a missing or revoked API key or an unauthorized client IP; a 403 indicates that organization policy blocks access. A 429 is returned when the request exceeds a rate limit, a 500 when an internal error prevents processing, and a 503 when the service or requested model is temporarily unavailable. model and input are required; input must not be empty or exceed 8192 tokens, encoding_format must be float or base64, and dimensions must be at least 1 and is supported only by text-embedding-3 and later models.