Claude API pricing explained: what each model costs, and how batching and caching cut the bill
The Claude API charges per million tokens (MTok), with separate prices for input and output tokens. As of 21 October 2026, Claude Opus 5.5 costs $4 per MTok of input and $20 per MTok of output, Claude Sonnet 5.5 costs $2 and $10, and Claude Haiku 5.5 costs $0.10 and $0.50 for prompts up to 100,000 tokens. The Batch API halves those prices, and cached input is billed at a fraction of the base rate.
How Claude API pricing works
You pay for tokens, counted per request and priced per million tokens (MTok):
- Input tokens: everything you send (system prompt, messages, tool definitions, tool results, documents).
- Output tokens: everything Claude generates, including thinking.
- Modifiers on top: prompt caching, the Batch API, data residency, fast mode, and usage-based server tools.
Every response reports the exact count in its usage field, so you can compute the cost of each call. The prices below are copied from Anthropic's pricing page on 21 October 2026; always check the official page before budgeting.
Claude API pricing per model (October 2026)
| Model | Input | Cache write (5 min) | Cache hit | Output |
|---|---|---|---|---|
| Claude Fable 5.1 | $10 | $12.50 | $0.25 | $50 |
| Claude Opus 5.5 | $4 | $5 | $0.20 | $20 |
| Claude Opus 5 | $5 | $6.25 | $0.50 | $25 |
| Claude Sonnet 5.5 | $2 | $2.50 | $0.10 | $10 |
| Claude Sonnet 5 | $2 | $2.50 | $0.20 | $10 |
| Claude Sonnet 4.6 | $3 | $3.75 | $0.30 | $15 |
| Claude Haiku 5.5 (prompt up to 100k tokens) | $0.10 | $0.125 | $0.01 | $0.50 |
| Claude Haiku 5.5 (prompt over 100k tokens) | $0.50 | $0.625 | $0.05 | $2.50 |
| Claude Haiku 4.5 | $1 | $1.25 | $0.10 | $5 |
All prices in USD per million tokens. A 1-hour cache write costs 2x the input price. Sonnet 5's $2 and $10, launched as introductory pricing, are now its standard price.
Prompt caching: pay less for repeated input
If many requests share the same beginning (a long system prompt, tool definitions, a reference document), cache it:
| Operation | Price |
|---|---|
| 5-minute cache write | 1.25x the input price |
| 1-hour cache write | 2x the input price |
| Cache hit | 0.1x the input price on most models; 0.05x on Opus 5.5 and Sonnet 5.5; 0.025x on Fable 5.1 and Mythos 5.1 |
With the 5-minute cache, caching pays for itself after a single cache hit. The multipliers stack with the batch discount and data residency.
The Batch API: 50% off
The Message Batches API processes requests asynchronously "with a 50% discount on both input and output tokens". Most batches finish in under an hour, and a batch can take up to 24 hours. Nightly reports, bulk extraction and evaluations belong there; anything a person is waiting for does not. Fast mode is not available with batches.
Long context, data residency and fast mode
- Long context. Claude 4.6 and later models include the full 1M-token context window at standard rates: a 900k-token request costs the same per token as a 9k one. The exception is Claude Haiku 5.5, which bills prompts over 100,000 tokens at the higher row above.
- Data residency. On Claude 4.6 and later models,
inference_geo: "us"(US-only inference) applies a 1.1x multiplier to every token category. - Fast mode. Faster output for Opus 5.5 at premium prices: $8 input and $40 output per MTok.
What tools cost
- Tool definitions count as input tokens, and using tools adds a small system prompt: 286 tokens on Opus 5.5, Sonnet 5.5 and Haiku 5.5.
- Web search: $10 per 1,000 searches, plus the result tokens.
- Code execution: free with web search or web fetch in the request; otherwise each organization gets 1,550 free hours a month, then $0.05 per hour per container (5-minute minimum).
Long tool outputs are the cost most people miss: every tool result is input on the next request, and in an agentic loop the whole history is resent each turn.
A worked example
A support agent answers a question with a 3,000-token prompt (system prompt, tools, conversation) and a 400-token reply on Claude Sonnet 5.5:
- Input: 3,000 × $2 / 1,000,000 = $0.006
- Output: 400 × $10 / 1,000,000 = $0.004
- Total: about $0.01 per call, or about $10 per 1,000 calls.
If 2,500 of those input tokens are a stable prefix served from cache, the input part drops to roughly $0.00125 (500 normal tokens at $2 plus 2,500 cached tokens at $0.10), about $0.005 per call. Run a nightly job of the same calls through the Batch API and the base price halves again.
How to keep the bill down
- Pick the smallest model that passes your tests; route only hard requests to Opus.
- Cache stable prefixes: system prompt, tools, reference documents.
- Batch everything that can wait.
- Trim tool outputs and history; see the LLM context window.
- Set
max_tokensto what the task needs, and watchusagein production.
Pricing is out of scope for the Claude Certified Architect exam as billing, but the cost trade-offs behind it are not: batch vs realtime, multi-agent token cost, and context size all appear. Start with the Claude API basics or browse all articles.
Sources: Pricing (model prices, caching, batch, long context, data residency, fast mode, tools), read on 21 October 2026; Batch processing; Tool use with Claude (tool use system prompt tokens).
FAQ
How much does the Claude API cost?
It depends on the model and is priced per million tokens. As of 21 October 2026: Opus 5.5 $4 input and $20 output, Sonnet 5.5 $2 and $10, Haiku 5.5 $0.10 and $0.50 for prompts up to 100,000 tokens. Check the official pricing page for current prices.
How do I reduce Claude API costs?
Use the cheapest model that does the job, cache repeated prompt prefixes (cache hits cost a fraction of the input price), send non-urgent work through the Batch API for 50% off, and keep max_tokens and tool output lean.
Does the Claude API charge more for long prompts?
On Claude 4.6 and later models the full 1M-token window is billed at standard rates, except Claude Haiku 5.5, which charges higher prices for prompts over 100,000 tokens.
Is web search extra on the Claude API?
Yes. Web search costs $10 per 1,000 searches plus the tokens of the search results. Code execution is free when used with web search or web fetch; otherwise organizations get 1,550 free hours a month, then $0.05 per hour per container.