v1

latestOpenAPI 3.1.02026-07-2675394318.9 KB
inference

Create embeddings

Creates a model response for the given text.

post/v1/embeddings

Query parameters

ai_project_idstring nullable

current project ID

current project ID

Request body

modelstring required

ID of the model to use.

encoding_formatstring nullable

The format to return the embeddings in. Can be either float or base64.

userstring nullable

A unique identifier representing your end-user.

service_tier'auto' | 'default' | 'over-limit' | 'flex' | 'no-limit'

Represents the service tier for requests.

Attributes: Auto: Automatically choose the best available tier for the request (Default or OverLimit). Analyze response to determine which tier was used. Default: Return 429 errors on hitting the rate limit, do not exceed to the OverLimit tier. OverLimit: Indicate that the request was over the user limit. This tier cannot be set by user in the request, but us used in a response for tier=Auto. Flex: Do not consume rate-limit credits, but run with lower priority. May still result in 429 errors in case of if there is no resources to process.

dimensionsinteger nullable

The dimensions to use for the request.

Example request

{
  "model": "BAAI/bge-en-icl",
  "dimensions": 4096
}

Response

OK

objectstring required

always 'list'.

modelstring required

The model used for the embedding.

service_tier'auto' | 'default' | 'over-limit' | 'flex' | 'no-limit' required

Represents the service tier for requests.

Attributes: Auto: Automatically choose the best available tier for the request (Default or OverLimit). Analyze response to determine which tier was used. Default: Return 429 errors on hitting the rate limit, do not exceed to the OverLimit tier. OverLimit: Indicate that the request was over the user limit. This tier cannot be set by user in the request, but us used in a response for tier=Auto. Flex: Do not consume rate-limit credits, but run with lower priority. May still result in 429 errors in case of if there is no resources to process.