DocsDeployment APIEmbeddings

Embeddings

Generate embeddings for text inputs. POST /api/v1/embeddings.

Navigation

Embeddings

POST /api/v1/embeddings

Creates an embedding vector for the given input. Requires a deployment with an embedding-capable model.

Request Body

ParameterTypeRequiredDescription
modelstringYesModel ID
inputstring | arrayYesThe text to embed (string or array of strings)
encoding_formatstringNofloat (default) or base64

Response

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [0.0023, -0.0091, 0.0154, ...],
      "index": 0
    }
  ],
  "model": "nomic-embed-text",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}