Skip to main content
POST
Embeddings
Generate vector embeddings from text for semantic search, similarity, clustering, and retrieval. Requests are served through the attested TEE gateway, which does not retain request bodies. Use is_tee from the embedding catalog to find confidential-capable models and verify the receipt for the actual request.

Request body

string
required
Model id returned by GET /v1/embeddings/models.
string | string[]
required
Text to embed. Pass a single string or an array of strings for batch embedding.
string
float (default) or base64.
integer
Optional output dimension count. Supported by openai/text-embedding-3-small and openai/text-embedding-3-large, which can return fewer dimensions than their default.

Example

Batch input

Pass an array to embed several strings in one request. Results are returned in input order, each with its index.

Response

Model catalog

The public GET /v1/embeddings/models catalog is authoritative. It accepts the same zdr filter as the chat model catalog:
Embedding requests accept the same provider routing block as chat completions, including zdr, aci_verified, and aci_session_ids. See Zero data retention.

Custom dimensions

openai/text-embedding-3-small and openai/text-embedding-3-large accept a dimensions parameter to return shorter vectors, which reduces storage and speeds up similarity search at some cost to quality.
Keep one model and one dimension count per index. Vectors from different models are not comparable.

Models

Chat and confidential models.

Trust boundary

What the gateway protects.