Claude Opus 4 API Pricing
Claude Opus 4 was retired by Anthropic on June 15, 2026 - the claude-opus-4-20250514 model id no longer answers. Anthropic names Claude Opus 4.8 as the replacement. Its last listed rates were $15.00/M input and $75.00/M output, with cache hits at $1.50/M, kept here for invoice checks and migration math. Checked against Anthropic's model deprecations page.
Run the numbers.
Archive calculator pre-loaded with Claude Opus 4 rates. Tweak spend, output mix, or cache hit rate; share the URL to share the calculation.
Real-world presets.
Repo-wide bug fix
Reading 100-page contracts
Support agent ticket triage
Research planning turn
This is a chars-per-token approximation, not a real tokenizer. Actual tokens vary by language, code density, and tool-call overhead — counts are typically ±10–20% off for English prose, more for code or non-Latin scripts. For exact billing, use the vendor's official tokenizer.
| Model | Input /M | Output /M | Effective blended | Context | Best for |
|---|---|---|---|---|---|
| Claude Opus 4.7 | $5.00 cache $0.50 | $25.00 | $3.41 −3.0× | 1M | Frontier reasoning and hard code |
| Claude Opus 4.6 | $5.00 cache $0.50 | $25.00 | $3.41 −3.0× | 1M | Frontier reasoning and hard code |
| Claude Opus 4.5 | $5.00 cache $0.50 | $25.00 | $3.41 −3.0× | 200K | Frontier reasoning and hard code |
| Claude Opus 4.1 | $15.00 cache $1.50 | $75.00 | $10.24 retired | 200K | Legacy Opus workloads |
| Claude Sonnet 4.6 | $3.00 cache $0.30 | $15.00 | $2.05 −5.0× | 1M | Production agents and coding |
| Claude Sonnet 4.5 | $3.00 cache $0.30 | $15.00 | $2.05 deprecated · −5.0× | 200K | Production agents and coding |
| Claude Haiku 4.5 | $1.00 cache $0.10 | $5.00 | $0.682 −15× | 200K | Support and classification |
| GPT-5.4 | $2.50 cache $0.25 | $15.00 | $1.80 −5.7× | 1.05M | Tool use and app agents |
| Gemini 3.8 Flash | $0.75 cache $0.075 | $3.75 | $0.481 −21× · promo | 1M | Long-context document analysis |
Frequently asked.
Practical pricing questions, with vendor list prices separated from workload assumptions.
Q · 01 Can I still call Claude Opus 4? +
claude-opus-4-20250514 on June 15, 2026, and requests to it now fail. Anthropic names Claude Opus 4.8 as the replacement. The rates on this page are the last ones Anthropic listed, kept for reading old invoices and for estimating a migration.Q · 02 What should I migrate Claude Opus 4 workloads to? +
Q · 03 How does prompt caching change the price? +
$1.5/M, which is 10% of the $15/M base input rate. Anthropic also charges cache writes at $18.75/M for 5-minute writes and $30/M for 1-hour writes. The calculator models repeated prompt sections as cache hits.Q · 04 Is there a Batch API discount? +
$7.5/M input and $37.5/M output.Q · 05 Does long context cost extra? +
200K context label. Longer-context Opus 4.6, Opus 4.7, and Sonnet 4.6 use standard pricing across the full 1M window. Prompt caching and batch discounts still apply according to their normal rules.Q · 06 Does regional pricing differ? +
inference_geo parameter and use standard first-party API pricing. Bedrock and Vertex AI publish their own regional pricing policies.Q · 07 Are volume discounts published? +
Q · 08 How accurate is the tokenizer estimate? +
4.875 characters per token. Actual billing uses Anthropic's server-side tokenizer; code, tables, and non-English text can differ materially.