v5

latestOpenAPI 3.1.02026-08-04166362486.5 KB

Create embeddings for text and images

Create embeddings for text or images using the specified model, encoding format, and normalization.

Args: params: The parameters for creating embeddings.

Returns: EmbeddingCreateResponse: The response containing the embeddings.

post/v1/embeddings

Request body

modelstring required

The model to use for creating embeddings.

dimensionsinteger nullable

The number of dimensions to use for the embeddings.

promptstring nullable

The prompt to use for the embedding creation.

normalizedboolean

Whether to normalize the embeddings.

Example request

{
  "model": "mixedbread-ai/mxbai-embed-large-v1",
  "dimensions": 768,
  "prompt": "Provide a detailed summary of the following text.",
  "normalized": true
}

Response

The embeddings for the input text or image

modelstring required

The model used

object'list'

The object type of the response

normalizedboolean required

Whether the embeddings are normalized.

dimensionsinteger nullable required

The number of dimensions used for the embeddings.

Example response

{
  "data": [
    {
      "object": "embedding"
    }
  ],
  "normalized": true,
  "dimensions": 768
}