Skip to main content
POST
Openai Embeddings

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-deepinfra-source
string | null
user-agent
string | null
xi-api-key
string | null
x-api-key
string | null

Body

application/json
model
string
required

model name

Example:

"thenlper/gte-large"

input
string
required

text or multimodal content to embed. Each item is either a string, or a list of content parts ({"type":"text"} / {"type":"image_url"}) for multimodal embedding models such as nvidia/llama-nemotron-embed-vl-1b-v2.

Maximum string length: 1024
Example:
service_tier
enum<string> | null

The service tier used for processing the request. 'priority' processes the request with higher priority (premium rate); 'flex' processes it at lower priority for a discount, served only when spare capacity exists and may be retried/timed out under load. Both apply only to models that support the respective tier.

Available options:
default,
priority,
flex
input_type
enum<string> | null

Role hint for asymmetric retrieval models: 'query' embeds a search query, 'passage'/'document' embeds a document. Controls the query:/passage: prefix on VL embedding models; ignored by symmetric models.

Available options:
query,
passage,
document
encoding_format
enum<string>
default:float

format used when encoding

Available options:
float,
base64
dimensions
integer | null

The number of dimensions in the embedding. If not provided, the model's default will be used.If provided bigger than model's default, the embedding will be padded with zeros.

Required range: x >= 32
Example:

1536

Response

Successful Response