Create Embedding
Create text embeddings.
Returns vector representations of the input text.
Authentication
AuthorizationBearer
Your production key sent as a bearer token.
Request
This endpoint expects an object.
model
Model ID in format ‘provider/model-name’
input
Text to embed
encoding_format
Encoding format for embeddings
dimensions
Number of dimensions for the output embeddings. Supported by OpenAI text-embedding-3 and later models and by Google gemini embedding models.
task_type
Google-only: the embedding task type (e.g. RETRIEVAL_QUERY, RETRIEVAL_DOCUMENT, SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING). Ignored for non-Google models.
user
End-user identifier
Response
Successful Response
data
model
usage
Token usage for embeddings.
object
Errors
422
Unprocessable Entity Error