Claude API pricing is pay-as-you-go, billed per million tokens (MTok), with a separate rate for input and output. As of July 2026 the three models you’ll actually choose between cost $5/$25 (Opus 4.8), $3/$15 (Sonnet 5 — introductory $2/$10 through August 31, 2026), and $1/$5 (Haiku 4.5) per million input/output tokens. The sticker price is only half the story, though: prompt caching and the Batch API can legitimately cut a production bill by 50–90%, and this article walks through the full table, the multipliers, and worked examples with real numbers.
TL;DR: Claude API pricing runs from $1/$5 per MTok (Haiku 4.5) to $10/$50 (Fable 5). Cache reads cost 0.1× the input price; cache writes cost 1.25× (5-minute) or 2× (1-hour). The Batch API halves both input and output cost. The 1M context window on Opus and Sonnet carries no long-context premium. Output tokens are 5× the price of input tokens on every model — verbose responses, not big prompts, are usually what blows up a bill.
How Claude API billing works
Every request is metered in tokens — roughly 4 characters or 0.75 English words each. You pay the input rate for everything you send (system prompt, conversation history, tool definitions, documents) and the output rate for everything the model generates, including thinking tokens on reasoning-heavy requests. The response’s usage object reports exact counts per request, which makes cost tracking straightforward if you log it. There are no per-seat fees, no minimums, and no charge for a failed request that never processed.
One structural fact should shape your architecture before any optimization: on every Claude model, output tokens cost five times more than input tokens. In my own usage logs, trimming response verbosity (“answer in under 100 words”, structured outputs instead of prose) has saved more money than any model downgrade.
Claude API pricing by model (July 2026)
| Model | API ID | Input / MTok | Output / MTok | Context |
|---|---|---|---|---|
| Claude Fable 5 | claude-fable-5 | $10 | $50 | 1M |
| Claude Opus 4.8 | claude-opus-4-8 | $5 | $25 | 1M |
| Claude Opus 4.7 | claude-opus-4-7 | $5 | $25 | 1M |
| Claude Sonnet 5 (intro, to Aug 31 2026) | claude-sonnet-5 | $2 | $10 | 1M |
| Claude Sonnet 5 (from Sep 1 2026) | claude-sonnet-5 | $3 | $15 | 1M |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | $3 | $15 | 1M |
| Claude Haiku 4.5 | claude-haiku-4-5 | $1 | $5 | 200K |
Three footnotes worth knowing. First, Sonnet 5’s introductory pricing ($2/$10) is genuinely the best value on the platform right now — near-Opus coding quality at 40% of Opus output cost at the intro rate (60% at standard) — and it reverts to $3/$15 on September 1, 2026, so budget against the standard rate. Second, the 1M token context window on current Opus and Sonnet models is billed at the standard per-token rate with no long-context premium: a 900K-token request costs the same per token as a 9K one. Third, Opus 4.7 and later (plus Sonnet 5) use a newer tokenizer that produces roughly 30% more tokens for the same text than Sonnet 4.6 and earlier — when comparing models, compare cost per task, not cost per token. Full model positioning is covered in Claude models explained.
Prompt caching: the 90% discount most teams ignore
Prompt caching lets the API reuse an already-processed prompt prefix instead of re-billing it at full price. The multipliers apply to the base input rate of whichever model you’re on:
| Cache operation | Multiplier | Sonnet 5 (standard $3 base) | Opus 4.8 ($5 base) |
|---|---|---|---|
| 5-minute cache write | 1.25× | $3.75 / MTok | $6.25 / MTok |
| 1-hour cache write | 2× | $6 / MTok | $10 / MTok |
| Cache read (hit) | 0.1× | $0.30 / MTok | $0.50 / MTok |
The break-even math is friendly: with the 5-minute TTL, a single cache read already saves money (1.25× + 0.1× = 1.35× versus 2× for two uncached passes). The 1-hour TTL costs double to write, so it needs at least two reads to pay off — worth it for bursty traffic with gaps. Concretely: a chatbot with a 20,000-token system prompt on Sonnet 5 pays $0.06 per request uncached. With caching, the first request costs $0.075 and every subsequent request within the TTL costs $0.006 — a 90% reduction on the prefix for the price of one cache_control field. Caching multipliers also stack with the Batch API discount.
Batch API: 50% off everything asynchronous
The Message Batches API processes requests asynchronously — submit up to thousands at once, collect results within 24 hours (typically much sooner) — and charges half price on both input and output tokens:
| Model | Batch input / MTok | Batch output / MTok |
|---|---|---|
| Claude Opus 4.8 | $2.50 | $12.50 |
| Claude Sonnet 5 (intro) | $1.00 | $5.00 |
| Claude Sonnet 5 (standard) | $1.50 | $7.50 |
| Claude Haiku 4.5 | $0.50 | $2.50 |
Nightly report generation, dataset labeling, embedding-adjacent summarization, evaluation runs — anything without a user waiting on it belongs in a batch. During the Sonnet 5 introductory window, batched Sonnet 5 costs $1/$5 per MTok, which is Haiku-tier pricing for near-Opus quality.
Tool and feature pricing
- Web search: $10 per 1,000 searches, plus standard token costs for the results that enter context. Errored searches aren’t billed.
- Web fetch: no per-use charge — you pay only for the fetched content as input tokens (an average web page runs ~2,500 tokens).
- Code execution: free when used alongside the current web search/web fetch tools; otherwise 1,550 free container-hours per organization per month, then $0.05 per hour per container.
- Tool definitions: your tool schemas are billed as ordinary input tokens, and enabling tools adds a small system-prompt overhead (roughly 290–800 tokens depending on model).
- Fast mode (research preview): Opus 4.8 at higher output speed bills at $10/$50 per MTok — double standard Opus rates.
- US-only inference: the
inference_geo: "us"data-residency option applies a 1.1× multiplier across all token categories.
Worked examples: what real workloads cost
Example 1: customer-support assistant on Haiku 4.5
10,000 conversations per month, averaging 3,000 input tokens (system prompt + history) and 700 output tokens. Uncached: 30M input × $1 + 7M output × $5 = $65/month. With the 2,500-token system prompt cached (reads at $0.10/MTok), the total bill drops by roughly a third — about $43/month all-in. This is the workload class where Haiku’s pricing shines.
Example 2: coding assistant on Sonnet 5
2,000 requests/month averaging 25,000 input tokens (repo context, mostly stable) and 2,000 output tokens, at standard pricing. Uncached: 50M × $3 + 4M × $15 = $210/month. Cache the 20K-token stable context and assume an 80% hit rate: cached reads bill at $0.30/MTok, cutting the input line to roughly $62 and the total to about $122/month — a 42% saving from one architectural decision. At introductory rates, the same workload lands near $81.
Example 3: nightly document pipeline on Opus 4.8, batched
500 documents/night, 40,000 input and 1,500 output tokens each — 600M input and 22.5M output tokens per month. Synchronous Opus: $3,000 + $562.50 = $3,562/month. The same jobs through the Batch API: $1,500 + $281.25 = $1,781/month. If a nightly window is acceptable, that’s half the bill for changing an endpoint. To model your own numbers interactively, use the Claude API cost calculator.
Common mistakes that inflate Claude API pricing
- Resending giant context uncached. The same 30K-token document at full input price on every turn is the most expensive habit in LLM development. One
cache_controlblock fixes it. - Ignoring output verbosity. At 5× the input rate, an answer that’s twice as long as needed costs more than doubling your prompt.
- Running everything on Opus. Route requests: Haiku for classification and routing, Sonnet as the default, Opus where evals show it matters.
- Breaking the cache accidentally. A timestamp or request ID interpolated at the top of the system prompt invalidates the entire cached prefix — you pay write rates forever and read rates never. If
cache_read_input_tokensis zero on repeat requests, hunt for the dynamic content. - Budgeting against intro pricing. Sonnet 5’s $2/$10 window closes August 31, 2026. Forecast at $3/$15.
- Confusing API billing with a Claude Pro subscription. The $20/month Claude Pro plan covers the chat apps only — it includes no API credits, and API usage is always metered separately.
Keeping your bill predictable
Pricing also interacts with rate limits: usage tiers cap requests and tokens per minute per model, so a cost forecast at scale is implicitly a tier question too. Three habits keep API spend boring. Log the usage object on every response and dashboard it — surprises should surface in hours, not on the invoice. Set spend limits per workspace in the Console so a runaway loop in dev can’t spend production money. And re-run the arithmetic when your traffic shape changes: the cheapest configuration for 100 requests a day (no caching, synchronous, Sonnet) is rarely the cheapest at 100,000 (cached, batched, routed across tiers). Prices do change — Anthropic publishes the canonical table on its official pricing page, which is worth checking before you commit a forecast. All figures in this article were verified against it on July 12, 2026.
Next steps
If you haven’t built anything yet, start with the complete Claude API developer’s guide for the platform overview, then get hands-on with your first integration. The rest of the API section covers rate limits, language-specific examples, and the interactive cost calculator mentioned above. And if you’re still weighing Anthropic against OpenAI before committing a budget, our Claude vs GPT comparison puts the two model families side by side.
FAQ
How much does the Claude API cost per request?
It depends on tokens, not requests. A typical chat request with 2,000 input tokens and 500 output tokens costs about $0.0135 on Claude Sonnet 5 at standard pricing (about $0.009 at the introductory rate), $0.022 on Opus 4.8, and $0.0045 on Haiku 4.5. Long documents or verbose outputs scale those numbers linearly.
Is there a free tier for the Claude API?
New Console accounts receive a small amount of free credit for evaluation, but there is no ongoing free tier. All sustained usage is pay-as-you-go, billed per million input and output tokens at the rates for whichever model you call.
What is the cheapest Claude model?
Claude Haiku 4.5 at $1 per million input tokens and $5 per million output tokens. Through August 31, 2026, batched Claude Sonnet 5 at introductory pricing matches Haiku-tier rates at $1 and $5 per MTok, which is exceptional value for the quality.
How does prompt caching reduce Claude API costs?
Cached prompt prefixes are read back at 0.1 times the base input price, while writes cost 1.25 times (5-minute TTL) or 2 times (1-hour TTL). With the 5-minute cache, a single reuse already saves money, and workloads with large stable system prompts commonly cut input costs by 80 to 90 percent.
Does the 1M context window cost extra?
No. Current Opus and Sonnet models include the full 1 million token context window at standard per-token pricing with no long-context surcharge. You still pay for every token you send, so caching large stable context remains important.
Do batch and caching discounts stack?
Yes. Batch API requests are billed at 50 percent of standard rates, and prompt caching multipliers apply on top of that. A cached, batched workload can combine both savings, which is why high-volume pipelines are dramatically cheaper than naive synchronous calls.
