Embedding
An embedding is a fixed-length list of numbers representing a piece of text, produced by a model so that texts with similar meaning land close together in that vector space, which is what makes semantic search and retrieval possible.
The number of values in the list is the embedding's dimension. Comparing two embeddings is then a cheap arithmetic operation — usually cosine similarity — which is why retrieval over millions of documents can run in milliseconds while the model that produced the vectors runs on a GPU.
Embedding models are input-only. There is no generated text and therefore no output rate: you are billed for the tokens read and nothing else, which makes their pricing the simplest of any model class.
Dimension is a storage and search decision more than a quality one past a certain width. Some models, including the one we serve, are trained so that a vector can be truncated to a shorter prefix and remain usable, which lets you trade a little recall for a large reduction in index size without re-embedding anything.
Embeddings are model-specific and not interchangeable. Vectors from two different models cannot be compared, so changing embedding model means re-indexing the entire corpus — a migration cost that should be weighed before switching for a small rate difference.
What it costs you
A retrieval system has two bills of different shapes: a one-off indexing cost proportional to corpus size, and a recurring generation cost proportional to traffic. Embedding rates are low enough that the first is usually a rounding error, and the leverage is almost entirely in the second — because every retrieved chunk becomes input tokens on every query forever. Returning ten chunks where three would do triples the input on each request, which costs far more over a year than any embedding model does.
Worked from today’s rates
Qwen3 Embedding 8B produces 4,096-dimension vectors and is billed on input only, at $0.030/M against an official $0.050/M. Indexing a 50-million-token corpus costs $1.50 once.
Related terms
- TokenA token is the unit of text a language model reads and writes — roughly four characters of English, or about three quarters of a word — and it is also the unit that every language model API bills by.
- Context windowA context window is the maximum number of tokens a model can hold in one request, counting the system prompt, the conversation history, any retrieved documents and the reply being generated together.
- Inference providerAn inference provider is a company that runs open-weight model weights on its own or rented GPUs and sells access to them over an API, as distinct from the lab that trained and published the model.
Go deeper
Every rate quoted above is published in full on the pricing page, alongside the model publisher’s own official rate.