Submit an embedding request

Submits an embedding request to the embeddings router

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Request

This endpoint expects an object.
inputstring or list of strings or list of doubles or list of lists of doubles or list of objectsRequired

Text, token, or multimodal input(s) to embed

modelstringRequired
The model to use for embeddings
encoding_formatenumOptional
The format of the output embeddings
Allowed values:
dimensionsintegerOptional>=0
The number of dimensions for the output embeddings
userstringOptional

A unique identifier for the end-user

providerobjectOptional
Provider routing preferences for the request.
input_typestringOptional

The type of input (e.g. search_query, search_document)

Response

Embedding response
objectenum
Allowed values:
datalist of objects
List of embedding objects
modelstring
The model used for embeddings
idstring
Unique identifier for the embeddings response
usageobject
Token usage statistics

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error