Complete claude api pricing breakdown for every current model. Side-by-side costs for Opus, Sonnet, and Haiku plus prompt caching, batch, and fast mode multipliers.
Anthropic updates Claude API pricing with every new model release. The gap between choosing the right tier and defaulting to the most capable one can mean thousands of dollars per month in unnecessary spend.
This is the complete breakdown for June 2026. Every current model, every cache tier, batch discounts, and the processing options that actually move the needle on your bill.
These are the active Claude models available through the API. All prices are per million tokens (MTok) in USD.
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| Claude Opus 4.8 | $5.00 | $25.00 |
| Claude Opus 4.7 | $5.00 | $25.00 |
| Claude Opus 4.6 | $5.00 | $25.00 |
| Claude Opus 4.5 | $5.00 | $25.00 |
| Claude Sonnet 4.6 | $3.00 | $15.00 |
| Claude Sonnet 4.5 | $3.00 | $15.00 |
| Claude Haiku 4.5 | $1.00 | $5.00 |
A few things stand out.
The Opus line is flat across versions. Opus 4.5 through 4.8 all cost $5.00 input and $25.00 output. Upgrading to the latest Opus does not increase your token bill. Anthropic describes Opus 4.8 as their "most capable model for complex reasoning and agentic coding," so there is no cost reason to stay on an older version.
Sonnet sits at the 60% mark. At $3.00/$15.00, Sonnet costs 60% of Opus on input and 60% on output. Anthropic positions it as "the best combination of speed and intelligence." For most production workloads that don't require frontier-level reasoning, this is where the math works best.
Haiku is the budget workhorse. At $1.00 input and $5.00 output, it is 5x cheaper than Opus on input and 5x cheaper on output. Anthropic calls it "the fastest model with near-frontier intelligence." Classification, routing, extraction, and other high-volume tasks belong here.
Output tokens cost 5x more than input tokens across every model tier. Opus charges $5.00 in and $25.00 out. Sonnet charges $3.00 in and $15.00 out. Haiku charges $1.00 in and $5.00 out.
This 5:1 ratio means output-heavy workloads (like long-form generation, code writing, and detailed analysis) burn budget faster than input-heavy ones like summarization or classification. If your application generates more tokens than it consumes, model selection matters even more.
Two older Opus models remain available but deprecated: Claude Opus 4.1 and Claude Opus 4 at $15.00 input and $75.00 output per million tokens. That is 3x the input cost and 3x the output cost of current Opus models. If you are still running either, migrating to Opus 4.5 or later saves 67% immediately.
Claude Haiku 3.5 is retired on the first-party API but still available on Amazon Bedrock and Vertex AI at $0.80/$4.00.
Opus 4.7 and later use a new tokenizer that may consume up to 35% more tokens for the same text compared to earlier models. Identical prompts can cost more on Opus 4.7+ purely due to tokenization differences, even though the per-token rate is the same. Factor this into migration planning.
Prompt caching is the single biggest lever for reducing Claude API costs on repeat workloads. Instead of reprocessing the same system prompt, document, or conversation history on every request, the API reads from cache at a fraction of the standard input price.
Anthropic offers two cache durations with different write costs:
| Cache Operation | Cost Multiplier | Duration |
|---|---|---|
| 5-minute cache write | 1.25x base input price | 5 minutes |
| 1-hour cache write | 2x base input price | 1 hour |
| Cache hit (read) | 0.1x base input price | Same as write |
Cache hits cost 10% of the standard input price. In dollar terms:
| Model | Standard Input | Cache Hit Input | Savings |
|---|---|---|---|
| Opus 4.8 | $5.00 / MTok | $0.50 / MTok | 90% |
| Sonnet 4.6 | $3.00 / MTok | $0.30 / MTok | 90% |
| Haiku 4.5 | $1.00 / MTok | $0.10 / MTok | 90% |
The 5-minute cache write costs 1.25x the base input price. Since a cache hit costs 0.1x, caching pays off after just one subsequent read. You pay 1.25x once, then save 0.9x on every hit.
The 1-hour cache write costs 2x the base input price. This takes two cache reads to break even, then every additional hit saves 0.9x.
For agent workflows where the system prompt stays constant across hundreds of turns, caching is not optional. A 10,000-token system prompt on Opus that hits cache costs $0.005 per call instead of $0.05. Over a thousand calls, that is $5 versus $50.
Add a single cache_control field at the top level of your request. The system manages breakpoints as conversations grow.
Place cache_control on individual content blocks for fine-grained control over exactly what gets cached.
The Batch API processes requests asynchronously with a 50% discount on both input and output tokens.
| Model | Batch Input (per 1M tokens) | Batch Output (per 1M tokens) |
|---|---|---|
| Opus 4.8 | $2.50 | $12.50 |
| Opus 4.7 | $2.50 | $12.50 |
| Opus 4.6 | $2.50 | $12.50 |
| Sonnet 4.6 | $1.50 | $7.50 |
| Sonnet 4.5 | $1.50 | $7.50 |
| Haiku 4.5 | $0.50 | $2.50 |
The discount is clean: half price across the board. Batch requests are suited for workloads where you can wait: evaluation pipelines, content generation queues, or bulk classification. Batch pricing also stacks with prompt caching: a cached batch request on Haiku 4.5 costs $0.05 per million input tokens, which is 20x cheaper than Haiku's standard input rate.
Fast mode is a research preview feature that provides faster output for Opus models at premium rates.
| Model | Fast Input (per 1M tokens) | Fast Output (per 1M tokens) |
|---|---|---|
| Opus 4.8 | $10.00 | $50.00 |
| Opus 4.6 / 4.7 | $30.00 | $150.00 |
Opus 4.8 fast mode costs 2x the standard rate. Opus 4.6 and 4.7 fast mode costs 6x on both input and output. The generational gap is notable: fast Opus 4.8 is cheaper than standard-speed Opus 4.6 in fast mode by a factor of three. Fast mode is not available with the Batch API; prompt caching multipliers do stack on top of fast mode pricing.
Default for all API requests. Best-effort availability at standard pricing.
Your requests are prioritized over standard traffic: useful for production workloads where uptime matters more than cost.
Asynchronous processing with the 50% discount. Best for non-latency-sensitive workloads.
Assume 2,000 input tokens and 500 output tokens per conversation, with an 8,000-token system prompt cached.
Processing 50,000 product descriptions at 1,000 input tokens and 200 output tokens each.
The pricing structure rewards three specific behaviors:
Not every request needs Opus. Use Haiku for classification, extraction, and routing. Use Sonnet for general-purpose work. Reserve Opus for tasks where reasoning quality directly affects outcomes. A gateway-level routing layer can automate this without changing application code.
Any static prefix (system prompts, few-shot examples, tool definitions, and document context) should be cached. The 90% discount on cache hits is the single largest cost reduction available. Structure prompts so unchanging content comes first.
The 50% batch discount applies to all models. If your workload is not latency-sensitive, batch it. Evaluation suites, content pipelines, data processing, anything that runs on a schedule rather than in response to a user action.
These three levers compound. A batch request with cached inputs on Haiku costs $0.05 per million input tokens. Standard Opus without caching costs $5.00 for the same million tokens. That is a 100x difference between the cheapest and most expensive way to process the same input.
Anthropic prompt caching handles repeated prefixes. SHIM exposes the native Messages API and preserves its supported request payload and success response format; it does not add a semantic response cache or cross-provider failover.
const anthropic = new Anthropic({
baseURL: "https://api.getshim.tech",
apiKey: process.env.SHIM_API_KEY
})