AI CostBase

Embedding cost

Embeddings are the cheapest per-token models on the market — which is exactly why teams forget to budget them. At search scale, query embeddings run every single day, and the refresh loop never stops.

The formula

corpus_tok = pages × words × 1.33 initial = corpus_tok/1M × E_in (one-time) refresh = initial × refresh% (monthly) queries = queries/day × qTok/1M × E_in × 30 (monthly) total = queries + refresh + vectorDB

Embedding prices as of , pulled daily from OpenRouter's API. Chunking with overlap inflates indexed tokens ~10–15%; embeddings of the same corpus with a new model version are a full re-index — the refresh% input is where you budget for that migration risk.

The cheapest per-token models still have a bill that never stops

Embedding models are, per token, the least expensive things you can call. That fact is the source of the problem: a price low enough to ignore is a price nobody budgets, right up until the volume arrives.

The cost structure has three parts with three different behaviours, and they are easy to confuse because they all appear under the word "embedding".

CostFrequencyScales with
Initial indexingOnceCorpus size
Corpus refreshMonthlyContent change rate
Query embeddingsDaily, foreverSearch traffic

One-time, monthly, and every single day

The initial index is the number that looks alarming and matters least, because it happens once and then stops. The refresh line is proportional to how much of your corpus genuinely changes — and it is worth re-forecasting whenever the publishing cadence changes, since it is the line most likely to have been set once and never revisited.

The query line is the one that compounds. At the defaults on this page, five thousand searches a day means 150,000 embedded queries a month, every month, whether or not anything changed. Search traffic tends to grow faster than corpus size, which makes this the line that actually defines the trajectory of the bill.

A vector database is not an embedding bill

These two expenses are constantly added together and they have nothing in common. Embedding is a metered API charge that scales with tokens. The vector database is hosting that scales with index size, replication factor and query throughput — you can embed ten times as many tokens with almost no change to the hosting bill, and you can double the hosting bill without embedding a single new token.

This page therefore reports the retrieval stack in two parts: embedding spend, and the database cost kept visibly separate. Blending them would produce a single number that is wrong about both.

Where teams get this wrong

Estimating corpus size honestly

Corpus figures are almost always overstated before they are measured. Not every document deserves an index entry — outdated policies, superseded versions, duplicated attachments and boilerplate all inflate the count while contributing nothing retrievable. Deduplicating before the first index costs nothing; deduplicating afterwards means paying to re-index.

Token density also varies far more than people assume. Prose runs close to the 1.33 tokens-per-word figure used here, while tables, code blocks and structured data carry substantially more tokens per rendered page, and scanned documents with OCR text layers can be multiples of the prose figure. If your corpus is heavy on any of those, the words-per-page input understates the indexing bill — so measure a sample rather than assuming. A hundred documents sampled honestly beats a hundred thousand estimated generously.