Basics

Embeddings

An embedding is a list of numbers, a vector, that stands for a piece of text so that texts with related meanings get vectors close together. Search, recommendations and retrieval for chat apps are built on them.

Also called Embedding, Vector embeddings, Text embeddings

Checked November 29, 2026

At a glance

Output
A vector of floating-point numbers
Related texts
Vectors close together
Used for
Search, clustering, recommendations, classification
Billed for
Input tokens only
On /model
POST /v1/embeddings, up to 2,048 inputs a request

OpenAI describes an embedding as a vector of floating-point numbers, where the distance between two vectors measures how related the texts are: a small distance means closely related, a large one barely related (OpenAI).

What they're used for

  • Search: rank results by how related they are to a query.
  • Clustering: group texts by similarity.
  • Recommendations: suggest items whose text is related.
  • Anomaly detection, diversity measurement and classification, by the same distances.

Those are OpenAI's list (OpenAI). Retrieval for a chat app works the same way: embed your documents once, embed each question, and put the closest passages in the prompt. Compare only vectors made by the same model, and embed everything again when you change models. Not every maker has an embedding model: Anthropic doesn't offer one of its own (Anthropic).

Embeddings on /model

  • POST /v1/embeddings takes the OpenAI format: send the model and the input, a string or a list of up to 2,048 strings or token lists, none of them empty (Embeddings).
  • encoding_format can be float or base64; the OpenAI SDKs ask for base64 and decode it for you.
  • A request is billed for its input tokens at the channel's input price, and usage.prompt_tokens is the count. There is no output to bill.
  • The embedding models and their prices are on the pricing page, under Type.

Where it applies on /model

Questions

Can I compare embeddings from two different models?

No. Each model places texts in its own space, so compare only vectors made by the same model, and embed everything again when you switch.

Does Claude make embeddings?

No. Anthropic doesn't offer an embedding model of its own; use an embedding model from another maker next to Claude.

Sources

The makers' own pages, each opened on November 29, 2026.

One key for every model here.

Top up from $10, change one URL, and pay only for the tokens you use.