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:

ModelBase input / MTok5-min cache write1-hour cache writeCache hit / refreshOutput / 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.

Batch API discounts, Fast mode, and regional premiums

The Batch API processes asynchronous jobs with a flat 50% discount on both input and output tokens. That cuts Claude Sonnet 5.5 and Sonnet 5 to $1 per million input tokens and $5 per million output tokens, and it drops Claude Opus 5.5 to $2 input and $10 output. Batch pricing for Claude Haiku 5.5 falls to $0.05 input and $0.25 output for prompts up to 100,000 tokens, or $0.25 input and $1.25 output when prompts pass that threshold. Claude Fable 5.1 and Mythos 5.1 batch runs cost $5 input and $25 output.

Other features increase token rates instead of lowering them:

  • US-only inference: Setting inference_geo to "us" applies a 1.1x multiplier across all token categories (input, output, cache writes, cache reads) on Claude 4.6 and later models; sending that parameter on earlier models returns a 400 error.
  • Fast mode: Claude Opus 5.5 costs $8 per million input tokens and $40 per million output tokens in Fast mode, while Fast mode for Claude Opus 5 and Opus 4.8 costs $10 input and $50 output. Fast mode applies across the full context window, stacks with prompt caching and data residency multipliers, and can't be used with the Batch API.
  • Cloud provider endpoints: On Amazon Bedrock and Google Cloud (Google managed), regional and multi-region endpoints for Claude Sonnet 4.5, Haiku 4.5, Opus 4.5, and later models carry a 10% premium over global endpoints.
  • Marketplace units: Claude Platform on AWS and Claude in Microsoft Foundry bill through marketplace Claude Consumption Units (CCUs) priced at $0.01 per CCU, where 100 CCUs equal $1.00 of fees calculated at standard API prices.

Long context and hidden tool overheads

Context size is straightforward on modern frontier tiers. Claude 4.6 and later models (except Haiku 5.5) and Claude Mythos Preview provide their full 1M token context window at standard pricing, meaning a 900,000-token prompt pays the exact same per-token rate as a 9,000-token prompt.

Claude Haiku 5.5 works differently. It bills based on prompt length, and its 100,000-token threshold counts every input token in the request, including cache reads and cache writes. If your prompt hits 100,001 tokens, the entire request pays the higher tier rates: $0.50 input and $2.50 output instead of $0.10 and $0.50. That is a 5x price jump. Watch your context accumulation closely when you loop Haiku 5.5. You can read more about controlling overall spend in our guide on How do I cap my Claude API spend?.

Tool definitions also eat tokens silently before your user input gets processed. Supplying tools injects a tool-use system prompt:

  • Claude Opus 5.5, Opus 5, Sonnet 5.5, and Haiku 5.5 add 286 tokens when tool_choice is auto or none.
  • When tool_choice is any or tool, Opus 5 and Haiku 5.5 jump to 406 tokens.
  • Claude Sonnet 5 injects 354 tokens (auto/none) or 474 tokens (any/tool).
  • Older models add more: Opus 4.8 adds 290 or 410 tokens; Opus 4.7 adds 675 or 804 tokens; Opus 4.6 and Sonnet 4.6 add 497 or 589 tokens; Opus 4.5, Sonnet 4.5, and Haiku 4.5 add 496 or 588 tokens.

Specific tool schemas add further static overhead. The bash tool adds 325 input tokens on Claude 4.7 and later models (and Mythos Preview), or 244 tokens on Claude 4.6 and earlier. The text editor (text_editor_20250728) adds 974 input tokens on 4.7+ and Mythos Preview, and 745 tokens on 4.6 and earlier. Declaring computer_toolset_20260801 with default members adds about 4,500 input tokens (around 4,590 on Sonnet 5 and 4,520 on other models), while browser_toolset_20260801 adds about 6,600 input tokens (around 6,670 on Sonnet 5 and 6,610 on others).

Execution charges apply to specific tooling:

  • Web search costs $10 per 1,000 searches plus standard input token costs for retrieved content; failed searches returning an error are not billed.
  • Web fetch has no per-request charge, billing only standard token costs for fetched page context, which you can limit via max_content_tokens.
  • Code execution carries no runtime charge when web_search_20260209 (or later) or web_fetch_20260209 (or later) is included. Without those tools, organizations receive 1,550 free container hours monthly, paying $0.05 per hour per container thereafter, billed with a 5-minute minimum per execution.

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