Every LLM vendor sells the same thing — next-token computation — and every one prices it differently enough that comparing them is genuinely hard. Not because the math is hard: the units are stable (US dollars per million tokens), and the arithmetic is division. It is hard because the headline numbers describe a request shape you will never send, and the modifiers that describe your real request — cached tokens, batch windows, long context, tool calls, thinking budgets — live in different corners of the documentation, each with its own footnote.
This is the guide I wanted when I first tried to forecast an app’s bill: what you are actually buying, how the price is assembled, and what to look for on a pricing page before you commit an architecture to it. Vendor tables with sources follow; prices are October 2026 list prices and will drift — the mechanics outlive the numbers.
First: what a token costs to make
A refresher with a point. Tokens are chunks of text — roughly four characters of English, fewer for code-heavy or repetitive text, sometimes one per non-Latin word. You are billed twice per request: once for every input token (the prompt the model reads) and once for every output token (the completion it writes). Output is consistently several times more expensive than input across the market — generating a token means running the full model once per token, sequentially, while input tokens are processed together in one efficient parallel pass. That asymmetry, not the input price, is what makes chatty applications expensive.
Two consequences worth internalizing:
- An app’s cost profile is its output volume. Two models with identical input prices can produce wildly different bills if one rambles. Output discipline — max tokens, terse formats, structured fields over prose — often saves more than model-shopping.
- “Thinking” tokens are output tokens. Reasoning models bill for their private scratchpad. A model that thinks for 2,000 tokens before answering 200 bills like a 2,200-token answer. Some APIs let you cap the budget; treat that cap as a cost control, not a quality knob only.
The anatomy of the per-token price
The number on the pricing page is the base rate for a plain, uncached, short-context API call. Your real price is that number plus a stack of modifiers. Almost all of them make tokens cheaper; the trap is that each applies to a different slice of your traffic, so the blend you actually pay depends entirely on your request shape.
Cached input. Send the identical prompt prefix repeatedly — every chat turn, every classification fan-out, every agent step — and the provider can reuse computation from the previous call. Cached tokens are billed at a small fraction of the fresh-input rate, roughly a tenth across the market. Some vendors cache automatically above a minimum prefix length; others require you to mark cache breakpoints explicitly. At least one bills cache writes at a premium, which makes “cache everything once” a losing strategy for prompts used a single time. Caching is the single largest lever on most real workloads; the companion piece on prompt caching and architecture covers the engineering side.
Batch APIs. Accept minutes-to-hours latency, send the same request through the batch endpoint, and pay roughly half. For offline workloads — dataset labeling, backfill jobs, document sweeps — this is the closest thing to free money on the menu. Batch and caching compose: a shared instruction prefix cached inside a batch run stacks both discounts.
Long-context tiers. Several vendors charge more per token beyond a context threshold — commonly somewhere between 128K and 200K tokens — or, equivalently, discount requests below it. If your corpus-filling design pushes every call past the cliff, your effective per-token price can double while the headline rate stays untouched. The companion piece on what a context window really costs covers why you rarely want to be up there anyway.
Modality conversion. Images, audio, and documents are converted to tokens — or billed per unit — before the model sees them. A screenshot is hundreds to thousands of tokens depending on resolution and how the vendor chops it; a minute of audio is a fixed rate on some APIs, a model-dependent token count on others. Two vendors with identical text prices can differ 2× on a vision-heavy workload. Check the modality table, not the text table, if your app reads images.
Free tiers and rate limits. Most vendors publish a free allocation — per-minute and per-day, keyed to model tier. Free tiers are ideal for prototyping and smoke tests and are aggressively throttled; they tell you nothing about sustained production cost, but everything about how cheaply you can develop against the API.
The tables: October 2026 list prices
All tables below were read from each vendor’s official pricing page on 2026-10-10 (sources listed at the end). Prices are US dollars per million tokens, standard tier, unless noted. Numbers the research pass could not confirm are flagged UNVERIFIED — treat those as placeholders, not facts.
The cross-vendor snapshot (current flagship lines)
| Vendor · model | Input | Cached input | Output | Context |
|---|---|---|---|---|
| OpenAI · gpt-5.2 | $1.75 | $0.175 | $14.00 | — (not on pricing page) |
| OpenAI · gpt-5.1 / gpt-5 | $1.25 | $0.125 | $10.00 | — |
| OpenAI · gpt-5-mini / -nano | $0.25 / $0.05 | $0.025 / $0.005 | $2.00 / $0.40 | — |
| Anthropic · Claude Fable 5 | $10.00 | $1.00 | $50.00 | 200K (1M UNVERIFIED) |
| Anthropic · Claude Opus 4.8 | $5.00 | $0.50 | $25.00 | 200K |
| Anthropic · Claude Sonnet 4.6 | $3.00 | $0.30 | $15.00 | 200K (1M-beta on 4.5) |
| Anthropic · Claude Haiku 4.5 | $1.00 | $0.10 | $5.00 | 200K |
| Google · Gemini 3.1 Pro (preview) | $2.00 → $4.00 over 200K | $0.20 → $0.40 | $12.00 → $18.00 over 200K | 200K tier boundary |
| Google · Gemini 3.8 Flash | $0.75 intro → $1.50 from 2027-01-01 | $0.075 → $0.15 | $3.75 → $7.50 | flat, no tier |
| xAI · grok-4.7 / 4.6 | $2.00 → $4.00 at ≥200K | $0.50 → $1.00 | $6.00 → $12.00 at ≥200K | 500K |
| DeepSeek · deepseek-flash | $0.30 peak / $0.15 off (cache miss) | $0.006 / $0.003 (cache hit) | $1.20 / $0.60 | 1M, no surcharge |
| DeepSeek · deepseek-v4-pro | $1.32 / $0.66 (miss) | $0.044 / $0.022 (hit) | $3.96 / $1.98 | 1M, no surcharge |
Read that table twice — once down the Input column, once down the Cached column. The input spread across the current generation is roughly 10× (Haiku-class $1 to Fable-class $10). The cached-input spread tells the architectural story: every vendor in the table prices cached reads at ~2–25% of fresh input, and DeepSeek’s automatic cache hits at 2% of its miss price. The Renaissance of agent loops lives in that column.
Per-vendor detail worth knowing
OpenAI (platform.openai.com/docs/pricing). Cached input is a flat 10% of input on the GPT-5 line (it was 50% on the older 4o generation — check the ratio before porting cost models). Caching is automatic above a minimum prefix. Batch is mentioned as “additional savings” with no percentage published for text models — the 50% figure widely cited is explicit only on the embeddings table (UNVERIFIED for text). No long-context tiers are listed. Reasoning tokens bill as output.
Anthropic (claude.com/pricing + docs.claude.com). The cleanest cache economics to reason about: reads at 0.1× input, writes at 1.25× input with a 5-minute TTL (refreshed on each hit) or 2× with a 1-hour TTL. Caching is opt-in via explicit breakpoints with a ~1,024-token minimum prefix. Batch is an explicit −50% on input and output and stacks with caching. The 1M context beta (Sonnet-class) bills the entire request at 2× input / 1.5× output once total input crosses 200K — a cliff, not a slope. Docs lag the marketing page by a model generation; the marketing page is the SSOT.
Google (ai.google.dev/gemini-api/docs/pricing). The only vendor in the set that bills cache storage by the hour (per million cached tokens) — long-lived caches are a storage line item, not just a read discount (reads ≈ 10% of input). Batch is a flat −50%; a Priority tier runs at 1.8×; long-context surcharges apply only to Pro-class models at a 200K boundary (2× input, 1.5× output). Watch the intro-price cliffs: the 3.8/3.6 Flash line doubles on 2027-01-01. Audio bills at 25 tokens/second; a 1K image is 1,120 tokens.
xAI (docs.x.ai/developers/pricing). Cached reads at 25% of input — the least generous discount in the set. The long-context rule is the bluntest: a prompt of 200K+ tokens re-prices the whole request at 2× input and 2× output. No free tier. Batch discounts exist but vary per model (percentages UNVERIFIED). A US-region endpoint adds 1.1×.
DeepSeek (api-docs.deepseek.com/quick_start/pricing). The aggressive disruptor profile: automatic context caching (no write premium) with hits at 2–3% of miss price, off-peak hours at exactly half price (weekends + non-peak UTC windows), 1M context with no long-context surcharge, and OpenAI- and Anthropic-compatible endpoints at the same prices. No published batch tier.
Notable pricing mechanics (the durable patterns)
- Cached reads: 2–25% of input. Current-generation norm ≈ 10% (OpenAI, Anthropic, Google); DeepSeek undercuts to 2%; Grok sits at 25%.
- Cache writes may cost more than input. Anthropic 1.25×/5m, 2×/1h — a prefix read once costs more cached than uncached. Google instead bills storage hourly.
- Long-context cliffs at ~200K. Google (Pro-class) and xAI re-price at 2×; Anthropic’s 1M beta does the same; DeepSeek doesn’t charge one. The cliff usually applies to the WHOLE request, not the overflow.
- Batch ≈ −50% where published (Anthropic, Google explicit; OpenAI embeddings-only; xAI varies; DeepSeek none listed).
- Thinking tokens bill as output — explicitly, at three of five vendors. Budget the scratchpad.
- Intro prices expire. Scheduled 2× steps on dated models (Gemini 3.8/3.6 Flash, 2027-01-01) turn a year-old cost model into fiction.
- Regional/premium multipliers stack: 1.1× US-only endpoints, 1.8×–2× priority/fast tiers — applied after cache discounts.
Sources, fetched 2026-10-10: platform.openai.com/docs/pricing · claude.com/pricing (redirects from anthropic.com/pricing) + docs.claude.com/en/docs/about-claude/pricing · ai.google.dev/gemini-api/docs/pricing (page dated 2026-10-09) · api-docs.deepseek.com/quick_start/pricing/ · docs.x.ai/developers/pricing. List prices move — treat the tables as a snapshot and the ratios as the durable knowledge.
Reading a pricing page like an auditor
Before committing an architecture, extract these seven answers from the docs. If a question has no documented answer, assume the expensive interpretation until support says otherwise.
- What is the output:input price ratio? (Drives chatty-app cost more than any other number.)
- What is the cached-input price, is caching automatic, and do cache writes cost extra? (Also: the TTL — minutes or hours.)
- Is there a context-length price tier, and where is the cliff?
- What does the batch API discount, and what latency does it demand?
- How are images/audio/documents converted, and at what per-unit price?
- What does the free tier throttle — RPM, TPM, per-day?
- Does the model alias I’m using pin a version? (Version pinning protects cached prefixes and reproducible bills.)
A worked comparison
Same request, five vendors, October 2026 list prices. The request: a 100K-token prompt with a 2K-token answer — once fresh, once re-sent identically (cache hit):
| Vendor · model | Fresh call | Cached re-send | Savings |
|---|---|---|---|
| OpenAI · gpt-5.1 | $0.145 | $0.033 | −77% |
| Anthropic · Sonnet 4.6 | $0.330 | $0.060 | −82% |
| Google · Gemini 3.8 Flash | $0.083 | $0.015 | −82% |
| xAI · grok-4.7 | $0.212 | $0.062 | −71% |
| DeepSeek · flash (peak) | $0.032 | $0.003 | −90% |
(100K input = 0.1 × the per-million rate; 2K output = 0.002 × the output rate; cached re-send prices input at the cached rate. Anthropic also bills a 1.25× cache write on the fresh call — one cent here, real money at scale.)
Now the same request at 300K input — past every long-context cliff in the table: grok-4.7 re-prices the whole request at 2× ($1.22 total), Gemini 3.1 Pro crosses its 200K boundary ($1.24), while DeepSeek’s flat 1M window bills $0.09. A 13× spread on identical work, decided entirely by how each vendor prices length.
The point of the exercise is not crowning a cheapest vendor — it changes quarterly — but discovering that your request shape is the dominant term. An app with 90% cacheable prefixes and terse outputs fits a very different winner than an app with novel 300K-token inputs and long prose answers, even on identical price tables. Run your own shape through the arithmetic with the llm-cost-calculator, size prompts first with token-estimator, check image payloads with image-token-calculator, and let model-picker filter by the constraints that actually bind you.
The durable takeaways
Numbers above will age; these won’t:
- You are billed for output at a multiple of input — manage output volume first, input second.
- Repetition is the hidden majority of most bills — cache it.
- Batch anything that tolerates latency — it is the cleanest 50% on the menu.
- Long context carries surcharges and quality costs — treat the window as a budget, not a feature.
- Your request shape, not the vendor’s headline, is the biggest number in the formula.
Measure your real traffic, price that shape, and re-check quarterly. The vendors re-price; the arithmetic never does.