embeddings

Create embeddings

Creates embedding vectors representing the input text.

Input can be a single string or an array of strings. Each input produces one embedding vector in the response.

post/embeddings

Request body

dimensionsinteger nullable

The number of dimensions the resulting output embeddings should have.

encoding_formatstring nullable

The format to return the embeddings in ("float" or "base64").

modelstring required

ID of the model to use.

userstring nullable

A unique identifier representing your end-user.

Example request

{
  "input": "What is a doubleword?",
  "model": "Qwen/Qwen3-Embedding-8B"
}

Response

Embeddings generated successfully. Each input string has a corresponding entry in the data array.

modelstring required

The model used for generating embeddings.

objectstring required

The object type, always "list".

Example response

{
  "data": [
    {
      "embedding": [
        0.0023,
        -0.0134,
        0.0256
      ],
      "index": 0,
      "object": "embedding"
    }
  ],
  "model": "Qwen/Qwen3-Embedding-8B",
  "object": "list",
  "usage": {
    "prompt_tokens": 6,
    "total_tokens": 6
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.