You're sizing a one time initial corpus embedding. The corpus is 1 billion tokens total. You'll use OpenAI text-embedding-3-small via the synchronous (non-batch) API. Per the OpenAI pricing page in 2026, text-embedding-3-small costs $0.02 per 1 million tokens. Compute the total cost in USD.
1 billion tokens at $0.02 per million is $20. Even at billion-token scale, embedding compute is a rounding error in a production budget.
Think of it like buying flour at the bulk store. A one-million unit bag costs two cents. A billion is a thousand of those bags, which works out to twenty dollars. That is cheap enough that a bakery never worries about flour cost when planning the menu. The bakery worries about rent, ovens, and the labour to bake. Converting text into searchable fingerprints works the same way. The headline price per piece of text is so small that the total bill basically vanishes. The real costs in a working search index live elsewhere: shelf space to hold all those fingerprints, the redo bill when somebody upgrades the fingerprinting machine, and the engineering time to keep the whole system observable.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
The arithmetic in this question is deliberately straightforward. The interview value is in the surrounding reasoning: what the number tells you about the real cost structure of an embedding-backed system, and whether the candidate can extrapolate that into a useful production-sizing instinct.
A candidate who computes $20 and stops has answered the literal question. A candidate who computes $20 and then frames it as 'so compute is not the cost driver here' has answered the interview question. The framing is what matters; the arithmetic is the entry ticket.
Working through the arithmetic
OpenAI prices text-embedding-3-small at $0.02 per million input tokens (2026 pricing). The corpus is 1 billion tokens. To get from billion to million, divide by a million. One billion tokens is 1,000 million tokens. Multiply by the price: 1,000 * $0.02 = $20.
The sync API price is $0.02 per million; the batch API price is $0.01 per million (50% discount, 24-hour SLA). The same billion-token job on batch is $10.
For scale comparison, text-embedding-3-large sits at $0.13 per million sync and $0.065 batch. The same billion-token job on the larger model is $130 sync, $65 batch. The cost ratio between the two models is 6.5x, which is the price you pay for higher MTEB scores and a 3072-dim output vector instead of 1536.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- OpenAI's 2026 pricing page lists text-embedding-3-small at $0.02 per million input tokens; the batch API drops that to $0.01 per million.
- A typical Notion-scale knowledge base of a few billion tokens costs under $100 to embed once on text-embedding-3-small via the batch API.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does the cost change if you switch to text-embedding-3-large?
$0.13 per million sync, halved to $0.065 batch. 1B tokens lands at $130 sync, $65 batch. Storage doubles from 1536 to 3072 dim.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating the embedding compute cost as a blocker for production decisions when it is dwarfed by storage, query cost, and re-embedding cycles.
60 second bullets to scan on the way to the call.
Tokens per million as the per-unit conversion
text-embedding-3-small price at $0.02 per million sync
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.