v4

latestOpenAPI 3.1.02026-07-31155218294.8 KB
Embeddings

Openai Embeddings

post/v1/embeddings

Headers

x-deepinfra-sourcestring nullable
user-agentstring nullable
xi-api-keystring nullable
x-api-keystring nullable

Request body

service_tier'default' | 'priority' | 'flex'
fail_fastboolean

If true, the request is rejected immediately with HTTP 429 when the model has no spare capacity, instead of waiting in the queue. Opt-in; the default (false) keeps standard queueing behavior.

modelstring required

model name

input_type'query' | 'passage' | 'document' nullable

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.

encoding_format'float' | 'base64'

format used when encoding

dimensionsinteger nullable

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.

Example request

{
  "model": "thenlper/gte-large",
  "dimensions": 1536
}

Response

Successful Response

{"stackTrail":"paths:/v1/embeddings:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}