Claude API pricing
What does the Claude API cost per million tokens?
Claude API base pricing runs from $0.10 per million tokens on Claude Haiku 5.5 up to $50 per million tokens on Claude Fable and Mythos outputs. Most developers build on Claude Sonnet 5 or Sonnet 5.5, which cost $2 per million input tokens and $10 per million output tokens.
Your actual monthly bill depends on more than just the base rates. Prompt caching discounts cache hits by up to 97.5%, the Batch API halves input and output rates, and tool use injects hundreds to thousands of extra tokens into your context window before your code even runs.
Base pricing by model
Anthropic prices models by million tokens (MTok), separating input from output. Output tokens always cost substantially more than inputs because generation requires far more compute than ingestion.
For Claude Sonnet 5, the $2 per million input and $10 per million output price was originally scheduled to rise to $3 and $15 on September 1, 2026, but that scheduled increase won't occur; it's now the permanent standard price. Claude 4.7 and later models, plus Claude Mythos Preview, use a newer tokenizer that produces roughly 30% more tokens for identical text compared to Claude Sonnet 4.6 and earlier versions. Keep that tokenizer shift in mind when you compare raw per-token numbers across generations.
Here's how base input, cache writes, cache reads, and output tokens compare across active and common models:
| Model | Base input / MTok | 5-min cache write | 1-hour cache write | Cache hit / refresh | Output / MTok |
|---|---|---|---|---|---|
| Claude Fable 5.1 | $10 | $12.50 | $20 | $0.25 | $50 |
| Claude Mythos 5.1 (limited) | $10 | $12.50 | $20 | $0.25 | $50 |
| Claude Fable 5 | $10 | $12.50 | $20 | $1 | $50 |
| Claude Mythos 5 (limited) | $10 | $12.50 | $20 | $1 | $50 |
| Claude Opus 5.5 | $4 | $5 | $8 | $0.20 | $20 |
| Claude Opus 5, 4.8, 4.7, 4.6, 4.5 | $5 | $6.25 | $10 | $0.50 | $25 |
| Claude Sonnet 5.5 | $2 | $2.50 | $4 | $0.10 | $10 |
| Claude Sonnet 5 | $2 | $2.50 | $4 | $0.20 | $10 |
| Claude Sonnet 4.6, 4.5 | $3 | $3.75 | $6 | $0.30 | $15 |
| Claude Haiku 5.5 (<=100k prompt) | $0.10 | $0.125 | $0.20 | $0.01 | $0.50 |
| Claude Haiku 5.5 (>100k prompt) | $0.50 | $0.625 | $1 | $0.05 | $2.50 |
| Claude Haiku 4.5 | $1 | $1.25 | $2 | $0.10 | $5 |
Retired models stay on the pricing sheet for legacy workloads. Retired Claude Opus 4 and 4.1 sit at $15 per million base input, $18.75 for 5-minute writes, $30 for 1-hour writes, $1.50 for hits, and $75 for output. Retired Claude Sonnet 4 remains at $3 base input and $15 output.
Prompt caching write and read rates
Prompt caching lets you store prefixes like system prompts, codebase snippets, or reference documentation so you don't pay base input rates on repetitive turns. You can set it up via automatic caching by adding a single cache_control field at the top level of your request, or through explicit cache breakpoints placed on individual content blocks.
Writing to the cache costs extra upfront. A 5-minute cache write costs 1.25x the model's base input price, while a 1-hour cache write costs 2x the base input price. Cache reads, however, cost pennies.
Hits cost 0.025x the base input price on Claude Fable 5.1 and Claude Mythos 5.1, 0.05x on Claude Opus 5.5 and Claude Sonnet 5.5, and 0.1x on every other model. At that standard 0.1x read rate, caching pays off after just one hit for a 5-minute cache write, or after two hits for a 1-hour cache write. Does it get any simpler than that?
If you reuse prompts, turn it on. Prompt caching multipliers also stack directly with other pricing modifiers, such as the Batch API discount and data residency settings.
Worked example: Claude Managed Agents
Claude Managed Agents sessions bill at the model's standard token prices plus $0.08 per session-hour for runtime, measured to the millisecond while the session status is running. Managed Agents sessions don't support the Batch API discount.
Take Anthropic's official worked example: a 1-hour session running on Claude Opus 5.5 that consumes 50,000 input tokens and generates 15,000 output tokens.
Without prompt caching, the calculation breaks down into three distinct charges:
- Input tokens: 50,000 tokens at $4 per million equals $0.20.
- Output tokens: 15,000 tokens at $20 per million equals $0.30.
- Runtime fee: 1.0 hour at $0.08 per hour equals $0.08.
- Total cost: $0.58.
Now look at what happens when 40,000 of those 50,000 input tokens hit a prompt cache:
- Uncached input tokens: 10,000 tokens at $4 per million equals $0.04.
- Cache read tokens: 40,000 tokens at $0.20 per million (0.05x the $4 base rate) equals $0.008.
- Output tokens: 15,000 tokens at $20 per million remains $0.30.
- Runtime fee: 1.0 hour remains $0.08.
- Total cost: $0.428.
Caching shaved 26% off the total invoice, and on workflows with higher token-to-runtime ratios, the savings are even larger.
Tracking and cutting Claude bills with Costbrake
Anthropic doesn't offer read-only API keys in the developer console. To pull usage and protect your account from rogue loops, Costbrake connects to Anthropic using an Admin key from Claude Console > Settings > Admin keys.
Costbrake watches spending across 23 cloud, AI, and SaaS providers, including Anthropic, AWS, Google Cloud, and OpenAI. If you want to check how other providers compare, see our guide on What does the OpenAI API cost per million tokens?. Checks run hourly on the Free plan, every 5 minutes on Pro and Team, and accelerate up to every minute during a spike. A spike alert triggers whenever an hour costs more than 3x your 7-day baseline and at least $5 more than usual. You also get threshold alerts at 50%, 80%, and 100% of your budget, along with month-end forecasts based on the pace of the last 72 hours.
If an autonomous agent runs wild, Costbrake's killswitch (called brakes) lets an admin disable a compromised API key or disable all workspace keys (up to 60 per brake) with a single confirmed click. Brakes never execute automatically; an admin must confirm, and every action can be undone.
You can wire up your monitoring by telling your AI coding tool "Set up Costbrake for me so I get alerted when my cloud and AI bills spike. Follow the instructions at https://costbrake.com/agent" via our agent setup, or paste your Admin key manually in the dashboard. Plans start at Free ($0 for 2 connections and email alerts), while Pro runs $12 a month for 10 connections, 5-minute checks, Slack, Discord, webhooks, and brakes. Every new workspace starts with a 14-day Pro trial with no credit card required. Check out full details on Costbrake pricing.
Questions and answers
Does Claude prompt caching reduce the price of output tokens?
No, prompt caching only reduces the cost of input tokens. Output tokens generated by Claude are always billed at the model's standard per-token output price regardless of cache status.
How much does Claude Sonnet 5 cost compared to Sonnet 5.5?
Both models cost $2 per million base input tokens, $2.50 for 5-minute cache writes, $4 for 1-hour cache writes, and $10 per million output tokens. The only pricing difference is on cache hits, which cost $0.10 per million tokens on Sonnet 5.5 (0.05x base) versus $0.20 per million tokens on Sonnet 5 (0.1x base).
Why does Claude Haiku 5.5 get so expensive on long requests?
Claude Haiku 5.5 has a 100,000-token prompt threshold that counts all input tokens, including cache reads and cache writes. If your prompt exceeds 100,000 tokens, the entire request is billed at $0.50 per million input tokens and $2.50 per million output tokens, which is five times higher than its $0.10 input and $0.50 output base rate.
How do I get a 50% discount on Claude API calls?
You can use the Batch API for asynchronous processing, which provides a 50% discount on both input and output tokens across all supported models. Keep in mind that the Batch API cannot be combined with Fast mode or Claude Managed Agents sessions.
Do tools like web search and code execution add extra costs?
Web search costs $10 per 1,000 searches plus standard input token costs for retrieved data, while web fetch has no per-request fee. Code execution includes 1,550 free container hours per month per organization (and is free of runtime fees when used alongside web search or web fetch), after which it costs $0.05 per hour per container with a 5-minute execution minimum.
Sources
Updated