LLM API pricing compared: OpenAI vs Anthropic vs Google
Output costs five to six times more than input — at every vendor, at every tier. That ratio, not the headline price, is what decides your bill.
Three vendors, three pricing pages, three incompatible layouts. OpenAI splits by context length. Anthropic splits by cache duration. Google splits by prompt size and modality. Comparing them means normalising them first.
So here they are on one axis: US dollars per million tokens, standard tier, text only, as of 17 July 2026. Prices move; the date is the point.
Frontier models
| Model | Input | Output | Output ÷ input |
|---|---|---|---|
| Claude Fable 5 | $10.00 | $50.00 | 5× |
| OpenAI gpt-5.6-sol | $5.00 | $30.00 | 6× |
| Claude Opus 4.8 | $5.00 | $25.00 | 5× |
| Gemini 3.1 Pro | $2.00 | $12.00 | 6× |
Mid-tier
| Model | Input | Output | Output ÷ input |
|---|---|---|---|
| OpenAI gpt-5.6-terra | $2.50 | $15.00 | 6× |
| Claude Sonnet 5 | $2.00 | $10.00 | 5× |
| Gemini 3.5 Flash | $1.50 | $9.00 | 6× |
| OpenAI gpt-5.6-luna | $1.00 | $6.00 | 6× |
Cheap tier
| Model | Input | Output | Output ÷ input |
|---|---|---|---|
| Claude Haiku 4.5 | $1.00 | $5.00 | 5× |
| OpenAI gpt-5.4-mini | $0.75 | $4.50 | 6× |
| Gemini 3.1 Flash-Lite | $0.25 | $1.50 | 6× |
| OpenAI gpt-5.4-nano | $0.20 | $1.25 | 6.25× |
What the tables do not tell you
Output costs five to six times input — and the ratio is astonishingly rigid. Look at the right-hand column. Every Anthropic model on this page prices output at exactly 5× input. Every OpenAI and Google model prices it at exactly 6×, with one exception: gpt-5.4-nano, the cheapest model here, is 6.25×.
Across three companies, four price tiers and a 50× spread in absolute cost, that ratio moves by a quarter of a multiple, once. Nobody publishes it as a policy; everyone converges on it.
This is the single most useful fact for budgeting, and no pricing page states it.
It means the length of your answers, not the length of your prompts, is what you
are really buying. A verbose model at $2 input can cost more in practice than a
terse one at $5. If you want a smaller bill, cap max_tokens and ask for brevity
before you switch vendors.
Long context is where they genuinely differ
This is the real divergence, and it is buried in footnotes.
| Vendor | Charge for a long prompt |
|---|---|
| OpenAI | 2× input, 1.5× output. gpt-5.6-sol goes $5 → $10 input, $30 → $45 output |
| 2× input, 1.5× output above 200k tokens. Gemini 3.1 Pro goes $2 → $4 input, $12 → $18 output | |
| Anthropic | Flat. No surcharge across the full 1M window |
Look closely at those multipliers. OpenAI and Google land on exactly the same ones — double the input, half again the output — from different pricing pages, neither stating it as a policy. Anthropic's docs are unusually blunt in the other direction: a 900k-token request is billed at the same per-token rate as a 9k-token request.
What that actually changes — and what it doesn't
Less than you might expect, and it is worth being precise rather than dramatic.
Gemini 3.1 Pro is less than half the price of gpt-5.6-sol on short prompts, and it stays cheaper past 200k. Against Claude Opus 4.8, which never surcharges:
| Short prompt | Past 200k | |
|---|---|---|
| Opus 4.8 input vs Gemini | 2.5× more | 1.25× more |
| Opus 4.8 output vs Gemini | 2.1× more | 1.4× more |
So the surcharge narrows the gap without closing it. On these numbers the ranking does not flip: Gemini remains the cheapest frontier model at any length.
What changes is how much that lead is worth. Feed it long prompts and most of Gemini's price advantage evaporates — at which point a flat-rate model becomes defensible on grounds other than price: predictability, and no cliff at 200k to design around.
Whether you should send a 900k-token prompt at all is a different question. See context windows.
The lever that beats all of this: caching
Both OpenAI and Anthropic discount repeated context by roughly 90%:
| Normal input | Cached | |
|---|---|---|
| OpenAI gpt-5.6-sol | $5.00 | $0.50 |
| Claude Opus 4.8 | $5.00 | $0.50 |
| Claude Fable 5 | $10.00 | $1.00 |
If your application sends the same system prompt or the same documents on every request — which most applications do — caching is a bigger win than any vendor switch on this page. A 90% discount on the repeated portion dwarfs the 2× spread between frontier models. It is not free, though: writing to the cache costs a premium, so it only pays once you read it back. See how to cut your LLM API bill.
What an identical workload actually costs
One million input tokens and 100,000 output tokens — roughly a busy support bot's day. No caching, standard tier:
| Model | Input | Output | Total |
|---|---|---|---|
| Claude Fable 5 | $10.00 | $5.00 | $15.00 |
| OpenAI gpt-5.6-sol | $5.00 | $3.00 | $8.00 |
| Claude Opus 4.8 | $5.00 | $2.50 | $7.50 |
| Gemini 3.1 Pro | $2.00 | $1.20 | $3.20 |
| Claude Haiku 4.5 | $1.00 | $0.50 | $1.50 |
| Gemini 3.1 Flash-Lite | $0.25 | $0.15 | $0.40 |
| OpenAI gpt-5.4-nano | $0.20 | $0.13 | $0.33 |
The frontier-to-floor spread is about 45×. Most production workloads do not need the top of this table, and the honest advice is unglamorous: start at the bottom, measure quality on your actual task, and move up only when it fails.
One dated change worth diarising
Claude Sonnet 5 gets more expensive on 1 September 2026 — from $2/$10 to $3/$15 per million tokens, a 50% rise. Anthropic publishes both prices on the same page today. If Sonnet 5 is in your stack, that is a budget line you can plan for now rather than discover on an invoice.
What we would actually do
- Don't shop on the headline input price. Output is 5–6× more expensive and is what varies with your prompt design.
- Cache before you switch. ~90% off repeated context beats every difference on this page.
- Match the model to the tier, not the brand. All three sell a frontier, a mid and a cheap model at broadly comparable prices. Loyalty is not a pricing strategy.
- If you send long prompts, check the surcharge before the rate — not because it flips the ranking, but because it quietly halves the gap you thought you were buying.
What we addedA normalised cross-vendor price table (the three publish in incompatible shapes), the computed finding that output runs 5-6x input across every model and tier — with the single exception located — the discovery that OpenAI and Google independently land on identical long-context multipliers (2x input, 1.5x output) while Anthropic charges flat, and a worked cost calculation for an identical workload.
This article was researched and drafted with AI assistance from the sources listed below, then checked and edited by Fiqhro Dedhen before publication. How we work.
Sources
3 cited · 3 primary
- 1PrimaryOpenAI (Platform Docs)Pricing
Official API price list. Standard tier, short/long context columns read 17 July 2026.
platform.openai.com · accessed 17 Jul 2026
- 2PrimaryAnthropic (Claude Platform Docs)Pricing
Official model pricing, cache rates, the flat long-context statement and the dated Sonnet 5 increase.
docs.claude.com · accessed 17 Jul 2026
- 3PrimaryGoogle (Gemini API Docs)Gemini Developer API pricing
Official paid-tier pricing including the >200k-token prompt surcharge.
ai.google.dev · accessed 17 Jul 2026