OpenAI vs Anthropic API pricing
Both vendors publish per-million-token rates, but they price context, output, and caching differently enough that the cheaper choice depends entirely on your workload shape.
Published · 7 min read
Comparing two model vendors on price sounds like it should be a single number. It is not, because the ratio between their input and output rates differs, their cached-input discounts differ, and the context window you get at a given price point differs. A workload that is cheaper on one vendor can be more expensive on the other after you change nothing but the ratio of reading to writing.
This piece is the vendor-level comparison. For a single-model matchup see GPT-5.5 against Claude Sonnet 4.6, and for the broader cost picture start from the guide to reducing API costs.
The published rates
| Model | Input | Output | Context |
|---|---|---|---|
| GPT-5.6 Sol | $5.00 | $30.00 | 1.1M |
| GPT-5.6 Terra | $2.50 | $15.00 | 1.1M |
| GPT-5.6 Luna | $1.00 | $6.00 | 1.1M |
| GPT-5.5 | $5.00 | $30.00 | 1.1M |
| GPT-5.4 | $2.50 | $15.00 | 1M |
| GPT-5.4 Mini | $0.750 | $4.50 | 400K |
| Model | Input | Output | Context |
|---|---|---|---|
| Claude Haiku 4.5 | $1.00 | $5.00 | 200K |
| Claude Sonnet 4.6 | $3.00 | $15.00 | 1M |
| Claude Opus 4.7 | $5.00 | $25.00 | 1M |
Read the output-to-input ratio, not the input price
The headline input rate is the number everyone quotes and the number that matters least. Output is where volume turns expensive, so the ratio between the two rates tells you how a model behaves under your specific traffic.
A retrieval-heavy pipeline that reads thousands of tokens of context and returns a short answer is dominated by the input rate. An agent loop that writes long tool calls and long explanations is dominated by the output rate. Pricing two vendors against your own token mix, rather than against each other's marketing pages, is the only comparison that predicts your invoice. The monthly estimation method gets you that mix.
Cached input is where the vendors converge
| Model | List input | List cached input | Cache read vs input | corouter cached input |
|---|---|---|---|---|
| GPT-5.6 Sol | $5.00 | $0.500 | 10% | $0.100 |
| GPT-5.6 Terra | $2.50 | $0.250 | 10% | $0.050 |
| GPT-5.6 Luna | $1.00 | $0.100 | 10% | $0.020 |
| GPT-5.5 | $5.00 | $0.500 | 10% | $0.100 |
| GPT-5.4 | $2.50 | $0.250 | 10% | $0.050 |
| GPT-5.4 Mini | $0.750 | $0.075 | 10% | $0.015 |
| Claude Haiku 4.5 | $1.00 | $0.100 | 10% | $0.020 |
| Claude Sonnet 4.6 | $3.00 | $0.300 | 10% | $0.060 |
| Claude Opus 4.7 | $5.00 | $0.500 | 10% | $0.100 |
Both vendors land on a similar idea: a cache read costs roughly a tenth of a normal input token. If your prompts carry a large stable prefix, this discount can matter more to your bill than the difference between the two vendors' base rates. That makes caching a prerequisite for any honest vendor comparison, not an afterthought — the mechanics are covered here.
Context window is a cost decision, not just a capability
A large context window changes what you can build, but it also changes what you spend, because context is input tokens and input tokens are billed on every call. Stuffing a 200,000-token context because the model allows it is one of the most expensive habits available to a developer.
Treat the window as a budget rather than a target. Retrieval that selects 4,000 relevant tokens will almost always beat passing 100,000 tokens and hoping, on both cost and answer quality.
What this means in practice
- Short answers over long context: weight the input rate heavily. Compare GPT-5.4 and Claude Haiku 4.5 first.
- Long generation from short prompts: weight the output rate heavily, and cap max tokens before you compare anything.
- Large stable system prompt: enable caching on both sides before drawing any conclusion about which vendor is cheaper.
- Code-shaped work: look at GPT-5.6 Sol and Claude Sonnet 4.6 on the same task before pricing either.
Whichever vendor wins your comparison, the list price is not the only price available. corouter meters the same model IDs at outlet rates — see the full price table or price your own token mix with the monthly cost estimator.
Keep reading
- How to reduce your LLM API costsMost advice about cutting inference spend is vague. This is the concrete version: where the money goes, which five levers move it, and how much each one is worth on a real monthly volume.
- GPT-5.5 vs Claude Sonnet 4.6, priced honestlyTwo frontier models from two vendors, compared on the only dimension we can verify: what they cost to run at published rates on identical workloads.
- How to estimate your monthly LLM API costForecasting an inference bill is arithmetic, not prophecy. Here is the method: four numbers to log, one formula, and the mistakes that make estimates come in low.
Price the same models at outlet rates
Same model IDs and familiar JSON shapes, metered per token, with a $5 minimum top-up and no subscription.
Get an API key
