Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
Endpoints / Vectors

Embeddings

POST/v1/embeddings

Create vector embeddings with OpenAI-compatible clients. Use the model catalog to discover which models support embeddings and whether they accept custom dimensions.

Request body

modelstring
required

Embedding model ID from /api/models/catalog.

inputstring | string[]
required

Text input or ordered batch of text inputs. The response preserves order.

dimensionsinteger
nullable

Optional vector dimension for models that support truncation.

encoding_formatstring
nullable
floatbase64

Output encoding format when supported by the upstream provider.

Response

objectstring

Usually list.

dataobject[]

One embedding item per input.

data[].embeddingnumber[] | string

Vector values or base64-encoded vector depending on encoding_format.

usage.prompt_tokensinteger

Input tokens used for embedding.

Batch guidance

Pass an array for small batches. For large data jobs, chunk client-side so each request stays within provider body-size and token limits.

Common models

ModelDimNotes
BAAI/bge-m31024Multilingual
text-embedding-3-small1536OpenAI cheap default
text-embedding-3-large3072OpenAI high quality
gemini-embedding-001768Google default

See also