The short version
Two of these three models cost the same per token. One of them costs nearly twice as much to actually use. That is not a contradiction — it is the whole point, and it is why comparing pricing pages is the wrong way to pick a model.
Everything below is measured, sourced and dated. Where a number is vendor-reported rather than independent, we say so.
Start with the sticker, because that is where everyone starts. All figures are per 1M tokens from the vendors' own pricing pages, retrieved July 2026.
| Model | Input | Cached input | Output | Batch (in / out) |
|---|---|---|---|---|
| OpenAI GPT-5.5 | $5.00 | $0.50 | $30.00 | $2.50 / $15.00 |
| Claude Opus 4.8 | $5.00 | $0.50 | $25.00 | $2.50 / $12.50 |
| Gemini 3.1 Pro Preview (≤200k prompt) | $2.00 | $0.20 | $12.00 | $1.00 / $6.00 |
| Claude Fable 5 (top of Anthropic's range) | $10.00 | $1.00 | $50.00 | $5.00 / $25.00 |
On paper the story is simple. Gemini is cheap, Claude is slightly cheaper than GPT on output, and everything else is a rounding error. Every one of those conclusions is wrong once you measure what these models actually do.
Artificial Analysis runs the same evaluation suite against every model and publishes the dollar cost of doing so. This is the closest thing the industry has to a like-for-like cost benchmark, because the workload is identical.
| Model | Cost to run the suite | Output tokens emitted | Output price / 1M |
|---|---|---|---|
| Claude Opus 4.8 (max) | $4,011.58 | 120,000,000 | $25 |
| OpenAI GPT-5.5 (high) | $2,159.38 | 45,000,000 | $30 |
| Gemini 3.1 Pro Preview | $815.11 | 56,000,000 | $12 |
Opus 4.8 costs 1.9× more to run than GPT-5.5 while charging 17% less per output token. Gemini 3.1 Pro costs a fifth of Opus. If you had picked by price per token you would have picked wrong.
Cost per task is price per token multiplied by tokens per task. Vendors publish the first number and hide the second. Four things move it.
The same paragraph is a different number of tokens on each vendor's tokenizer. Anthropic's newer models are notably token-hungry.
All three vendors charge reasoning at the output rate. You cannot see most of it.
Some models take 45M tokens to finish a job. Others take 120M. That is a 2.7× difference in output volume for the same work.
One vendor doubles your input price past a threshold. Another charges rent on your cache. The third does neither.
Anthropic states on its own pricing page that Opus 4.7 and later, Fable 5, Mythos 5 and Sonnet 5 use a newer tokenizer producing "approximately 30% more tokens for the same text". Claude Opus 4.8 is on that tokenizer. Same sticker price, more tokens per unit of text.
An independent measurement using Anthropic's own count_tokens endpoint found the inflation is not uniform. English prose came in at 1.20×. Technical documentation hit 1.47×. A real instruction file measured 1.45×. Weighted across seven realistic coding samples the average was 1.325×.
That matters because technical English is exactly what sits in a system prompt. If your prefix is documentation and instructions, budget for 45% more tokens, not 30%.
There is no published side-by-side count of identical text run through the GPT-5.5, Opus 4.8 and Gemini 3.1 Pro tokenizers. Anyone showing you a neat three-way table has estimated it. The one hard multilingual datapoint we found: a localisation study measured Claude encoding Tamil at 1.19 characters per token against Gemini's 4.24 — roughly a 3.5× cost difference for the same output. If you serve non-English users, tokenizer choice is a first-order cost decision.
All three vendors bill reasoning tokens at the output rate. None of them show you most of what you paid for.
| Vendor | Billed as | Can you see them? | In the vendor's own words |
|---|---|---|---|
| OpenAI | Output tokens | No — count only | "Reasoning tokens are not visible via the API, they still occupy space in the model's context window and are billed as output tokens." |
| Anthropic | Output tokens | Not by default on Opus 4.8 | "You're charged for the full thinking tokens generated by the original request, not the summary tokens." And: "Omitting reduces latency, not cost." |
| Output tokens | Summary only | Every row of the pricing table reads "Output price (including thinking tokens)". Pricing is "based on the full thought tokens the model needs to generate, despite only the summary being output". |
OpenAI adds a warning worth reading twice: "you could incur costs for input and reasoning tokens without receiving a visible response". A reasoning model that fails to answer still bills you.
Every vendor now exposes the billed count. Read it. On OpenAI it is usage.output_tokens_details, on Anthropic usage.output_tokens_details.thinking_tokens, on Google usage.total_thought_tokens. Most teams have never looked.
This is the variable that decides the bill, and only one organisation publishes it consistently. Artificial Analysis reports the output tokens each model emits to complete the identical suite.
| Model | Output tokens | AA verbosity verdict |
|---|---|---|
| Claude Opus 4.8 (max) | 120M | "somewhat verbose" — peer median 100M |
| Gemini 3.1 Pro Preview | 56M | "fairly concise" — peer median 72M |
| GPT-5.5 (high) | 45M | "somewhat verbose" — peer median 35M |
Opus emits 2.7× the output of GPT-5.5 for the same work. At $25 versus $30 per million that difference is not close to being recovered.
The cleanest evidence that token efficiency beats token price comes from OpenAI's own product line. Artificial Analysis on the GPT-5.5 launch: per-token pricing doubled from GPT-5.4 to $5 / $30, but a ~40% reduction in token use largely absorbed the hike — the net cost to run the Index rose only about 20%.
A model can double its price and barely move your bill. Or hold its price and quietly double it.
Above a certain prompt size, the cheap model stops being cheap and the expensive one stops being expensive.
| Vendor | Threshold | What happens | Effective price above it |
|---|---|---|---|
| OpenAI GPT-5.5 | 272k input tokens | Input 2×, output 1.5×, for the whole session | $10 / $45 |
| Google Gemini 3.1 Pro | 200k prompt tokens | Input and output both rise | $4 / $18 |
| Claude Opus 4.8 | — | Nothing. "A 900k-token request is billed at the same per-token rate as a 9k-token request" | $5 / $25 |
At a 500k-token prompt, Opus 4.8 becomes cheaper than GPT-5.5 on both input and output — $5 against $10, $25 against $45. Anthropic's caching and batch discounts still apply across the full 1M window too.
So the honest answer to "which is cheapest" is: it depends on your prompt size, and the crossover is real. If you are processing large documents, whole codebases or long conversation histories, run the numbers again above the threshold. They will not look like the pricing page.
All three cut cached input by 90%. What differs is what they charge you to get there.
| OpenAI | Anthropic | ||
|---|---|---|---|
| Activation | Automatic | Automatic or explicit breakpoints | Implicit, automatic |
| Cache read discount | 90% | 90% (0.1× input) | 90% |
| Cache write fee | None on GPT-5.5 | 1.25× input (5-min) or 2× (1-hour) | None |
| Storage fee | None | None | $4.50 per 1M tokens per hour on 3.1 Pro |
| Minimum prefix | 1,024 tokens | 1,024 (Opus/Sonnet), 4,096 (Haiku 4.5) | 4,096 tokens |
| TTL | 5–10 min | 5 min or 1 hour (you choose, priced differently) | ~60 min, not user-controlled |
At $4.50 per 1M tokens per hour, a 200,000-token cached context held across an eight-hour working session costs $7.20 in storage alone, before a single read. Gemini's headline price is genuinely the lowest on this page. Its cache is the only one that charges rent.
The 1.25× write fee is real but bounded: Anthropic's own break-even is a single read at the five-minute TTL. For an agent hammering the same prefix, that is one request. For a low-traffic app whose cache expires between users, you may be paying 1.25× input forever and reading it back never.
| Model | Output speed | Time to first answer token | Verdict |
|---|---|---|---|
| Gemini 3.1 Pro Preview | 148.1 tokens/sec | 20.6 s | "notably fast" (peer median 76.6 t/s) |
| Claude Opus 4.8 (max) | 61.9 tokens/sec | 33.2 s | "slower than average" (peer median 70.4 t/s) |
| GPT-5.5 (high) | Not published by Artificial Analysis — we will not guess | ||
Combine the two columns and the picture sharpens. Opus emits 120M tokens at 61.9 tokens per second. Gemini emits 56M at 148.1. Opus needs roughly five times more wall-clock generation time for the same suite. In an agent loop, wall-clock time is engineer time, queue depth and timeout risk — all of which cost money that never appears on the API invoice.
Cost only matters relative to capability, so here is the honest quality picture — with a large caveat attached.
| Model | SWE-bench Verified (vendor harness) | SWE-bench Pro (standardised harness) |
|---|---|---|
| Claude Fable 5 | 95.0% | — |
| GPT-5.5 | 88.7% | 58.6% (vendor harness) |
| Claude Opus 4.8 | 88.6% | 69.2% (vendor harness) |
| Gemini 3.1 Pro | 80.6% | 46.1% (standardised) |
| Claude Opus 4.6 | — | 51.9% (standardised) |
| GPT-5.4 (xHigh) | — | 59.1% (standardised) |
Read that table with suspicion. Every SWE-bench Verified score above is the vendor's own number on the vendor's own harness, and none are independently verified. When the same models are run on Scale's standardised harness the scores drop by 17–21 points. The harness is the variable, not just the model.
The one comparison we would stake something on is Artificial Analysis's, because the workload is identical and the cost is measured rather than claimed. Their summary of GPT-5.5's launch, verbatim: "GPT-5.5 (medium) scores the same as Claude Opus 4.7 (max) on our Intelligence Index at one quarter of the cost (~$1,200 vs $4,800) — although Gemini 3.1 Pro Preview scores the same at a cost of ~$900."
Because nobody can, honestly. Every headline coding score in circulation was produced by the vendor that sells the model, on a harness the vendor built. The only fair comparison is one where the workload, the harness and the scorer are the same for everyone — and on cost, that is what Artificial Analysis provides.
| If your workload is… | Cheapest choice | Why |
|---|---|---|
| High-volume, short prompts, quality-tolerant | Gemini 3.1 Pro or a Flash-class model | Lowest sticker, concise output, no cache write fee |
| Agentic coding, many turns | GPT-5.5 | Fewest output tokens per task; measured at half Opus's run cost |
| Prompts above ~272k tokens | Claude Opus 4.8 | No long-context surcharge; competitors both raise prices |
| Long-lived cached context (hours) | OpenAI or Anthropic | Google charges $4.50/1M tokens/hour to store the cache |
| Non-English, especially Indic scripts | Gemini | Measured 3.5× token-efficiency advantage over Claude on Tamil |
| Latency-sensitive user-facing | Gemini 3.1 Pro | 148 t/s vs Opus's 62 t/s |
| Hardest reasoning, cost no object | Claude Fable 5 | Highest reported SWE-bench Verified at 95.0% — and $50/1M output |
The biggest cost lever on this page is not choosing between three flagships. It is not using a flagship at all.
OpenAI's gpt-5.4-nano is 24× cheaper on output than GPT-5.5. Claude Haiku 4.5 is 5× cheaper than Opus 4.8. Gemini Flash-Lite is 8× cheaper than Gemini 3.1 Pro. No amount of vendor-shopping between flagships recovers a 24× ratio.
An AI gateway makes this practical, because you can route per request without three SDKs and three invoices. How gateways charge for that convenience is covered in our gateway guide, and the current landed prices are on our model price comparison.
The objection to routing is usually operational: three vendors means three SDKs, three keys and three invoices. That objection is what an OpenAI-compatible gateway removes — one base URL, one balance, and the model chosen per request by changing a string.
Nobody else's benchmark is about your workload. Ours included.
On measured cost to run the same evaluation suite, Gemini 3.1 Pro at $815, GPT-5.5 at $2,159 and Claude Opus 4.8 at $4,011. On list price the order looks different, which is exactly the point.
Because it emits more tokens. Opus 4.8 produced 120M output tokens to complete the suite; GPT-5.5 needed 45M. A 17% lower price per token does not survive a 2.7× higher token count.
On short-to-medium prompts, yes, by a wide margin. Above a 200k prompt its price rises to $4 / $18, and it charges $4.50 per 1M tokens per hour to store a cache — a fee neither competitor has. On long-lived contexts that gap narrows.
Yes, all three bill them at the output rate. OpenAI does not return them at all. Anthropic omits them by default on Opus 4.8. Google returns a summary. Every vendor exposes the billed count — read it.
Yes. Anthropic states its newer models, including Opus 4.8, produce about 30% more tokens for the same text. Independent measurement found 1.20× on prose and up to 1.47× on technical documentation.
Claude. Anthropic applies no long-context surcharge — a 900k-token request bills at the same rate as a 9k one. OpenAI doubles input above 272k; Google raises Gemini above a 200k prompt.
It can. All three give 90% off cached reads, but Anthropic charges 1.25× to write the cache and Google charges hourly storage. On a hot prefix hit many times per minute, Anthropic's write fee amortises to nothing. On a cold one, it does not.
Treat vendor-reported SWE-bench Verified numbers with caution — none are independently verified, and the same models score 17–21 points lower on a standardised harness. Compare models only within the same harness.
On measured cost per unit of benchmark performance, yes — roughly half the cost for a comparable score. On very long prompts the ranking flips, because GPT-5.5 doubles its input price above 272k tokens and Claude does not.
Dramatically. On output tokens, gpt-5.4-nano is 24× cheaper than GPT-5.5, Claude Haiku 4.5 is 5× cheaper than Opus 4.8, and Gemini Flash-Lite is 8× cheaper than Gemini 3.1 Pro. Routing beats vendor-shopping.
It varies enormously. Anthropic's new tokenizer added only about 1% for Japanese and Chinese prose but up to 47% for technical English. Separately, one study measured Claude encoding Tamil at 1.19 characters per token against Gemini's 4.24 — roughly 3.5× the cost for the same output.
It makes A/B testing far easier — one key, one balance, one line changed to swap models. Just check the gateway's landed price first: in our own comparison, prices for the identical model range from 40% below vendor list to 10% above it.
Google. Gemini offers a genuine ongoing free API tier on its Flash-class models, though not on Gemini 3.1 Pro. Anthropic gives only a small unspecified starter credit; OpenAI's free tier is heavily rate-limited.
Artificial Analysis measures Opus 4.8 at 61.9 output tokens per second against Gemini 3.1 Pro's 148.1. Combined with its higher token volume, Opus needs roughly five times more wall-clock generation time to complete the same suite.
Price per token tells you almost nothing. Two of these three models charge the same for input, and one of them costs nearly twice as much to actually run. The variable that decides your bill is how many tokens the model needs to finish the job — and that number appears on no pricing page.
If you want a default: Gemini 3.1 Pro is the cheapest flagship for most workloads by a wide margin. GPT-5.5 is the value pick for agentic work, because it finishes in fewer tokens. Claude Opus 4.8 wins on long context, where it is the only flagship that does not raise its price, and on the hardest reasoning tasks, where you are buying capability rather than economy.
And before you optimise any of that: check whether the task needs a flagship at all. There is a 24× price ratio sitting unused inside OpenAI's own catalogue.
count_tokens endpoint, April 2026.Copyright © 2026 Best AI Gateways
Independent ranking. We may be rewarded for recommending the service we rate best and sending users to it — that reward pays for the research behind this comparison and never buys a ranking position, at no extra cost to you. Information is provided “as is” without warranty. See our Disclaimer & Terms.