Create Embeddings

POST/v1/embeddings
Convert text input into vector embeddings.

Request Body

application/json
model:requiredstring

Model identifier used for this request.

input:requiredstring

Text, message, image, or file input supplied to the model.

encoding_format:optionalstring

Format used to encode the returned embeddings.

Allowedfloatbase64
dimensions:optionalinteger

Number of dimensions in the returned embedding vectors.

Response

200

A successful request returns a JSON response. The complete example is shown in the code panel.