OpenAI vs Anthropic vs Gemini Pricing: 2026 Per-Token Cost Comparison
Per-token prices across the three major providers, including the discounts that matter most: prompt caching (cuts cached-prefix cost 80-90%) and batch APIs (halve cost for non-real-time work). The cheapest provider depends on your tier — frontier, mid, or budget — and your context length. Here is the full breakdown and the decision rule for which provider to default to.
TL;DR — who is cheapest?
There is no single cheapest provider — it depends on the tier. Anthropic Claude Sonnet 5 currently holds the frontier value crown at $2/$10 with 1M context and no long-context surcharge. Google Gemini 3.1 Pro ties it on input price ($2 ≤200K) and matches the 1M window. OpenAI GPT-5.6 Sol is the quality flagship, promo-priced at $4/$20 through at least November 2026 (standard $5/$30). At the budget tier, GPT-5.6 Luna ($0.20/$1.20) undercuts everything by a wide margin.
Budget tier (simple tasks) → GPT-5.6 Luna or Gemini 3.7 Flash. Frontier value → Claude Sonnet 5 or Gemini 3.1 Pro. Maximum quality → GPT-5.6 Sol, Claude Opus 5 ($5/$25), or Claude Fable 5 ($10/$50). Long context (>200K) → Claude Sonnet 5 is now the cheapest: 1M tokens at standard per-token rates, while OpenAI bills 2× input above 272K and Google roughly doubles above 200K. Batch / background → any provider; all three discount 50%.
Frontier tier: GPT-5.6 vs Claude Sonnet 5 / Opus 5 vs Gemini 3.1 Pro
The frontier tier is where quality matters most and price gaps are real. At August 2026 rates, here are the per-million-token prices for the value picks at the frontier from each provider.
| Model | Input ($/M tok) | Output ($/M tok) | Context window |
|---|---|---|---|
| OpenAI GPT-5.6 Sol | $4.00 promo (std $5.00) | $20.00 promo (std $30.00) | 1M (2× input rate >272K) |
| Anthropic Claude Sonnet 5 | $2.00 | $10.00 | 1M (no surcharge) |
| Google Gemini 3.1 Pro | $2.00 ≤200K / $4.00 above | $12.00 ≤200K / $18.00 above | 1M |
Anthropic repriced aggressively: Sonnet 5's $2/$10 launch price — already half the $3/$15 the Sonnet line carried since 3.5 — has been made permanent, and both Sonnet 5 and Opus 5 ($5/$25) carry 1M-token contexts billed at standard rates. Google's Gemini 3.1 Pro (still "Preview") matches Sonnet on input up to 200K but roughly doubles above that threshold. OpenAI's GPT-5.6 Sol is the most expensive per token even at its promo price, which runs through at least November 21, 2026 — but it's positioned as the quality flagship, alongside Fable 5 ($10/$50), Anthropic's maximum-capability model. If Claude produces a correct answer in one pass where a cheaper model needs two, the effective cost per correct answer can favor the pricier per-token rate. Always benchmark on your own eval, not on published model cards.
Provider pricing shifts quarterly. The numbers here are an August 2026 snapshot with three live promos to watch: GPT-5.6 Sol's $4/$20 (expires no earlier than Nov 21, 2026), Gemini 3.7 Flash's $0.75/$3.75 (doubles Jan 1, 2027), and Gemini 3.1 Pro's Preview pricing (may change at GA). Before any capacity commitment, pull live rates from each provider's pricing page. A gateway like LiteLLM can track and re-route automatically as prices change.
Budget tier: GPT-5.6 Luna vs Claude Haiku 4.5 vs Gemini 3.7 Flash
The budget tier is where most of your traffic should land after model routing. These models are 10-50x cheaper than the frontier tier and handle classification, extraction, summarization, and FAQ with adequate quality.
| Model | Input ($/M tok) | Output ($/M tok) | Best for |
|---|---|---|---|
| GPT-5.6 Luna | $0.20 | $1.20 | Cheapest per token, broad ecosystem |
| Claude Haiku 4.5 | $1.00 | $5.00 | Fast, better reasoning for the tier |
| Gemini 3.7 Flash | $0.75 promo → $1.50 in 2027 | $3.75 promo → $7.50 | Huge 1M context at budget price |
GPT-5.6 Luna is the absolute cheapest at $0.20/$1.20 — roughly 4× under Gemini 3.7 Flash even before Flash's promo expires on December 31, 2026 (its price then doubles to $1.50/$7.50). Haiku 4.5 sits highest on price but often edges the others on raw response quality for the tier, and keeps a 200K window (the other two run 1M). Between budget and frontier, OpenAI's GPT-5.6 Terra ($2/$12) covers mid-tier routing. The right choice depends on what your downstream pipeline expects.
GPT-5.6 Luna ($1.20/M output) undercuts Gemini 3.7 Flash's promo rate ($3.75/M) by ~3× and Claude Sonnet 5 ($10/M) by ~8× — route easy traffic there. At the frontier, Sonnet 5 and Gemini 3.1 Pro tie on input at $2/M; GPT-5.6 Sol costs ~2× more for flagship quality.
Prompt caching: the 80-90% discount you should already be using
All three providers now offer prompt caching — if your prompt shares a prefix with a recent call (a system prompt, a shared document, few-shot examples), the cached prefix tokens are billed at a steep discount. For agent and RAG workloads that resend the same system prompt every turn, this is the single biggest cost lever after model selection.
| Provider | Cached input price | vs normal input | Min cache prefix |
|---|---|---|---|
| OpenAI (GPT-5.6) | 10% of input (Sol: ~$0.40/M) | 90% off | 1024 tokens (write +25%) |
| Anthropic (Claude Sonnet 5) | $0.20/M | 90% off | 1024 tokens (write +25%) |
| Google (Gemini 3.1 Pro) | 10-20% of input + storage fee | 80-90% off | 2048 tokens ($4.50/M-tok/hr storage) |
The caveat is that each provider's cache has a minimum prefix length (1024-2048 tokens) and a TTL (5-60 minutes). Short prompts see no benefit; long, repeated prefixes see huge savings. Anthropic also charges a small write premium for the initial caching, but the net is still a large win on multi-turn agent traffic.
Put stable content (system prompt, tool schemas, few-shot examples) at the start of the prompt and dynamic content (user query, retrieved context) at the end. This maximizes the cacheable prefix. A 2000-token system prompt cached across 1000 daily turns saves 2M input tokens per day — at GPT-5.6 Sol's promo rate, that is $8/day uncached vs $0.80/day cached: ~$216/month from one prompt-structure change.
Batch API: 50% off for non-real-time workloads
If your workload tolerates latency (eval runs, content generation, data labeling, document processing), the batch APIs halve your cost. All three providers offer this with a 24-hour SLA.
| Provider | Batch API | Discount | SLA |
|---|---|---|---|
| OpenAI | Batch API | 50% | Within 24 hours |
| Anthropic | Message Batches | 50% | Within 24 hours |
| Batch API (Gemini) | 50% | Within 24 hours |
The batch API stacks with prompt caching — a batch job with a shared system prompt gets both the 50% batch discount and the 80-90% cache discount on the prefix. For eval harnesses running thousands of test prompts with a shared instruction, this can cut eval cost by 80%+. See the cost optimization playbook for where batch fits in the full stack.
Long context: who handles 200K-2M tokens?
Context length no longer splits the providers the way it used to: all three now reach 1 million tokens. What splits them is the surcharge. Anthropic bills Sonnet 5 and Opus 5 at standard rates all the way to 1M. Google roughly doubles Gemini 3.1 Pro above 200K ($2→$4 input). OpenAI doubles input (1.5× output) above 272K. One caveat: Anthropic notes its newer tokenizer emits ~30% more tokens for the same text, so effective Claude costs run higher than nominal rates suggest.
Beware that long-context quality degrades on all models — the "lost in the middle" problem. Just because a model accepts 1M tokens does not mean it attends to all of them equally. Run your eval at the context lengths you actually use; do not assume a 1M context window gives you 1M tokens of reliable recall.
The case for multi-provider
Relying on a single provider is both a reliability risk (outages, rate limits) and a cost risk (you cannot benefit from price competition). A gateway like LiteLLM or Portkey lets you route by cost, fall back across providers on errors, and A/B-test quality continuously. The typical production setup uses GPT-5.6 Luna or Gemini 3.7 Flash for bulk traffic, Claude Sonnet 5 or Gemini 3.1 Pro for quality-sensitive traffic, and Claude Sonnet 5 again for long-context work — all behind a single gateway endpoint.
At scale (typically >$50K/month committed spend), all three providers offer volume discounts off the list price — often 15-30%. If you are at that scale, do not pay list price. Use the gateway's usage data as leverage in negotiation and re-quote annually.
FAQ
Which is cheaper: OpenAI, Anthropic, or Gemini?
It depends on the tier. Frontier: Claude Sonnet 5 is cheapest ($2.00/$10.00, no long-context surcharge), tied on input by Gemini 3.1 Pro ($2.00/$12.00 ≤200K), with GPT-5.6 Sol promo-priced at $4.00/$20.00 (standard $5/$30). Premium frontier: Claude Opus 5 ($5/$25) and Fable 5 ($10/$50). Budget: GPT-5.6 Luna ($0.20/$1.20) is cheapest, then Gemini 3.7 Flash ($0.75/$3.75 promo, doubling in 2027), then Claude Haiku 4.5 ($1.00/$5.00). For long contexts above 200K, Claude Sonnet 5 is the cheapest frontier option.
How much does prompt caching save?
Prompt caching cuts the cost of cached prefix tokens by 80-90% (OpenAI: 90% off, Anthropic: 90% off on reads plus a 25% write premium, Google: 80-90% off plus an hourly storage fee). For workloads with repeated system prompts (agents, RAG), blended input cost drops 40-60%. Requires a minimum cacheable prefix (1024-2048 tokens).
How much does the batch API save?
50% off list price, across all three providers, with a 24-hour completion SLA. It stacks with prompt caching for compounded savings. Use it for evals, content generation, and any non-real-time workload.
Should I use multiple providers?
Yes — for reliability and cost optimization. A gateway (LiteLLM, Portkey) lets you route by cost, fall back on outages, and benchmark quality continuously. The typical setup: budget model for bulk, frontier model for quality, Claude Sonnet 5 for long context.
Related Deep Dives
- LLM Cost Optimization Playbook — the full 5-lever stack that builds on these prices
- Model Routing — how to send traffic to the cheapest viable tier
- Semantic Caching — eliminates the call entirely on repeated prompts
- LiteLLM vs Portkey vs OpenRouter — the gateways that enable multi-provider routing
Sources
- OpenAI API pricing page, "GPT-5.6 (Sol/Terra/Luna) and GPT-4.1 API pricing," accessed August 31, 2026
- Anthropic pricing documentation, "Claude Sonnet 5, Opus 5, Fable 5 and Haiku 4.5 API pricing," accessed August 31, 2026
- Google AI Studio / Gemini API pricing, "Gemini 3.1 Pro, 3.7 Flash and 2.5 API pricing," accessed August 31, 2026
- OpenAI deprecations page, "gpt-4.1-nano shutdown 2026-10-23; gpt-5 snapshots closing 2026-12-11," accessed August 31, 2026
- Anthropic, "Prompt Caching and Message Batches" documentation, 2025-2026
- Artificial Analysis, "LLM Performance and Pricing Leaderboard," 2026 (independent cross-provider comparison)
Pricing changes frequently and varies by region, commitment level, and enterprise agreement. All figures are August 2026 list and promo prices from public provider pages. Verify current rates before any procurement decision.