Skip to content
Agentdex

Blog · · Agentdex Editorial

Anthropic API Pricing (2026): Claude Token Costs, Caching and Batch Explained

If you're building with Claude and want to know what your API bill will look like, this guide covers every layer of Anthropic API pricing as of October 2026: per-token rates by model, prompt caching, the Batch API, data residency, effort settings and tools. All prices come from Anthropic's pricing docs.

Key Takeaways

  • Claude API pricing is usage-based: you pay per million tokens (MTok) for input, cache writes, cache reads and output, with separate rates for each model. There is no monthly API fee, and API billing is separate from Claude Pro ($20/month, or $17/month billed annually) and Max subscriptions.

  • Current models and base prices per million input/output tokens: Haiku 5.5 from $0.10/$0.50, Sonnet 5.5 $2/$10, Opus 5.5 $4/$20 and Fable 5.1 $10/$50. All four have a 1M-token context window and up to 128K output tokens.

  • Your real bill depends less on headline rates and more on output length, context size, prompt caching hit rate and whether you use the Batch API. Cache reads cost 2.5% to 10% of the base input price depending on the model, and batch requests are 50% off.

  • Thinking is billed as ordinary output tokens, so effort settings directly affect cost. Combining cache reads with batch pricing can cut the input side by over 95% on Opus 5.5, Sonnet 5.5 and Fable 5.1.

  • Agentdex is an independent directory and rankings are never for sale. Numbers here come from Anthropic's own docs; confirm them before you hard-code anything.

How Claude API Pricing Works (Per Million Tokens)

The Claude API is fully usage-based. You pay per million tokens for input and output, at different rates depending on which model you call. There is no flat monthly API fee.

A token is a chunk of text. How many tokens the same text produces depends on the model's tokenizer and the content. Both your prompt (input tokens) and the model's reply (output tokens) count, and input includes everything the model sees: system prompt, retrieved documents, tool definitions, conversation history and the user message. Output tokens cost five times as much as input on every current model.

Here's what the Claude API bills you for on each request:

  • Input tokens - fresh text the model hasn't cached

  • Cache writes - first-time caching of a prefix (costs 1.25× or 2× input rate depending on TTL)

  • Cache reads: later hits on cached context, at 2.5% to 10% of the base input price depending on the model

  • Output tokens: everything the model generates, including thinking

  • Server-side tools: extra fees for some tools, such as web search at $10 per 1,000 searches

One detail that catches developers out: thinking is counted as output tokens at the model's normal output price. There's no cheaper thinking-token rate, so more reasoning means more spend.

Current Claude Model Lineup and Standard Pricing

Anthropic's current lineup has four models: Haiku 5.5 (fastest and cheapest), Sonnet 5.5 (speed plus intelligence), Opus 5.5 (Anthropic's recommended starting point for most workloads) and Fable 5.1 (demanding reasoning and long-horizon agents). Older models such as Opus 5, Sonnet 5, Opus 4.8 and Haiku 4.5 are still available as legacy models.

Here's the current lineup with standard prices per million tokens, from Anthropic's pricing docs:

Model

Input Price (per MTok)

Output Price (per MTok)

Cache Read Rate

Context Window

Haiku 5.5

$0.10 (≤100K) / $0.50 (>100K)

$0.50 (≤100K) / $2.50 (>100K)

$0.01 (≤100K) / $0.05 (>100K)

1M tokens

Sonnet 5.5

$2

$10

$0.10

1M tokens

Opus 5.5

$4

$20

$0.20

1M tokens

Fable 5.1

$10

$50

$0.25

1M tokens

Cache read multipliers differ by model. Fable 5.1 cache reads cost $0.25 per million tokens, 2.5% of its base input rate. Opus 5.5 and Sonnet 5.5 cache reads cost 5% of input ($0.20 and $0.10), and other models, including Haiku 5.5, use the standard 10%. Those differences compound quickly at scale.

All four current models share a 1M-token context window but have very different base rates. Haiku 5.5 is the only one with prompt-length pricing, split at 100,000 tokens, covered below.

The next section covers which model to use for which job, so you don't overpay for capability you don't need.

The image depicts stacked metallic coins arranged in ascending columns, symbolizing increasing value tiers. Each column represents a different level of worth, reflecting the concept of pricing models and token usage in API services.

Model Tiers Explained: Haiku, Sonnet, Opus, Fable/Mythos

The concept of a model tier is Anthropic's way of segmenting Claude capability and price. Here's how the tiers break down from cheapest to most capable:

  • Haiku (5.5, legacy 4.5): the cheapest tier, built for high-volume, latency-sensitive tasks such as classification, extraction, routing, short summaries and game NPC dialog. Haiku 5.5 costs $0.10 input / $0.50 output per million tokens for prompts up to 100,000 tokens.

  • Sonnet (5.5, legacy 5): the balanced option. Sonnet 5.5 costs $2 input / $10 output per million tokens and suits production chatbots, RAG agents and general-purpose SaaS assistants.

  • Opus (5.5, legacy 5 and 4.x): Claude Opus 5.5 costs $4 input / $20 output per million tokens. Anthropic describes it as built for long-running agentic coding and knowledge work, and suggests starting with it for most workloads. Worth the premium when correctness matters more than raw throughput.

  • Fable (5.1): the top tier at $10 input / $50 output per million tokens, for demanding reasoning and long-horizon agents. Claude Mythos 5.1 has the same prices but limited availability through Anthropic's verification programs. For many workloads, Sonnet or Opus does the job; Fable is the escalation path.

Base input prices range from $0.10 (Haiku 5.5) to $10 (Fable 5.1) per million tokens, a 100× spread, which makes model choice one of the biggest cost levers you control. Use Haiku and Sonnet as defaults and escalate to Opus or Fable only where your own tests show the quality gain is worth it.

Per-Million Token Pricing: Input vs Output vs Cached Input

Anthropic quotes Claude API prices per million tokens, with separate rates for input, output, cache writes and cache reads. The split matters because they aren't priced equally.

On every current model, output costs five times the input price. Responses can be long (especially with high effort or long context), so output often dominates total spend. On Fable 5.1, output is $50 per million tokens versus $10 for input.

Prompt caching splits input pricing into three categories:

  • Normal input - standard input price for fresh, uncached tokens

  • Cache writes - charged at 1.25× (5-minute TTL) or 2× (1-hour TTL) the base input rate

  • Cache reads: heavily discounted. Opus 5.5 cache reads cost $0.20 and Sonnet 5.5 $0.10 per million tokens, 5% of each model's input price. Fable 5.1 cache reads cost 2.5% of input, and most other models 10%.

These differences are key to bringing down effective cost for repetitive prompts. A system prompt cached and reused across thousands of requests costs almost nothing per call on the input side.

When comparing Anthropic pricing with other providers, compare total cost for the same workload rather than headline input rates. The same per-token rate can produce very different bills depending on how many tokens each tokenizer produces for your text.

Supported Models and Long Context Windows

As of October 2026, Claude 4.6 and later models include a 1M-token context window, and all four current models support 1M tokens. The pricing nuances are model-specific.

Per Anthropic's docs, Claude 4.6 and later models other than Haiku 5.5 bill the full 1M window at standard rates: a 900K-token request pays the same per-token price as a 9K-token one. Long context isn't a surcharged premium feature on these models, though it still means more tokens per request.

Haiku 5.5 is the exception: it uses prompt-length pricing, with $0.10 input / $0.50 output for prompts up to 100,000 tokens and $0.50 input / $2.50 output once a request goes over that threshold. The prompt length counts all input tokens, including cache reads and writes.

For comparison across models:

  • Haiku 5.5: 1M window, but prompts over 100K tokens cost 5× more per token

  • Sonnet 5.5 - 1M window at flat $2/$10 rates regardless of prompt length

  • Opus 5.5 - 1M window at flat $4/$20 rates

  • Fable 5.1 - 1M window at flat $10/$50 rates

If you send long prompts, compare Haiku 5.5's over-100K rate ($0.50/$2.50) with Sonnet 5.5's flat $2/$10. For long-context work, the gap between them is smaller than the headline rates suggest.

Tokenizer Changes and Their Impact on Anthropic API Pricing

Here's a cost driver that catches teams out: Claude Opus 4.7 and later models use a newer tokenizer.

Anthropic says this tokenizer produces approximately 30% more tokens for the same text than earlier models, with the exact increase depending on your content. So the same per-token rate doesn't mean the same bill when you migrate from a 4.6-era model.

The practical impact: re-baseline real token counts in staging before projecting migration costs. If you're moving from Sonnet 4.6 or Haiku 4.5 to a 5.5 model, run the same workload through both and compare actual token usage before you commit. You can use Anthropic's token counting endpoint with each model's ID.

Track tokens per request by model version. A model that looks cheaper per million tokens can cost the same or more if it turns your content into more tokens.

Service Tiers: Standard, Batch and Priority

Anthropic's service tiers are separate from model tiers. Standard is the default for everyday traffic, and Batch is for asynchronous work that can wait.

Priority Tier, which gave committed capacity, is no longer available for purchase, per Anthropic's service tiers docs. Organizations with an existing commitment can use it until their contract ends, and the service_tier parameter (for example "auto") still routes their requests to it when capacity is available.

If you need guaranteed capacity today, Anthropic points you to its sales team.

For most indie builders and small SaaS teams, the standard tier plus batch for offline jobs is enough.

Data Residency and Regional Pricing Multipliers

On Claude 4.6 and later models, the inference_geo parameter controls where inference runs. The default, "global", uses standard pricing.

Setting inference_geo to "us" for US-only inference applies a 1.1× multiplier to every token category: input, output, cache writes and cache reads. That raises your bill by about 10% for compliance-sensitive workloads.

Partner platforms set their own prices. On Amazon Bedrock and Google Cloud (Google managed), regional and multi-region endpoints carry a 10% premium over global endpoints. Check both Anthropic's docs and the cloud provider's pricing.

Treat data residency as one of several stacking modifiers (with caching, batch and fast mode), and model it explicitly when you build cost projections for US-only deployments.

The image depicts a globe interconnected by network lines, with various data center buildings strategically placed in different geographic regions, symbolizing global data flow and connectivity. This visual representation highlights the importance of efficient API usage and the infrastructure that supports production AI systems, emphasizing the role of data residency and token pricing in modern technology.

Prompt Caching: The Biggest Lever to Cut Claude API Cost

Prompt caching reuses previously processed parts of your prompt across API calls. If you send the same system prompt, tool definitions, RAG context or conversation history over and over, caching is where you save the most money.

You can turn it on with automatic caching (one cache_control field at the top level of the request) or place explicit cache breakpoints on content blocks, per Anthropic's prompt caching docs. The first time a prefix is processed it's a cache write, priced at 1.25× base input for the 5-minute cache or 2× for the 1-hour cache. Later requests that hit the cache pay the discounted read rate.

Cache reads cut the input price of cached tokens by 90% to 97.5%, depending on the model:

  • Opus 5.5 and Sonnet 5.5: cache reads at 5% of base input price

  • Fable 5.1 (and Mythos 5.1): cache reads at 2.5% of base input price; most other models, 10%

That lets a large static prefix, such as a 100K-token knowledge base, be reused across many calls at a small fraction of the normal input cost.

Break-even math: per Anthropic, a 5-minute cache pays for itself after one cache read, and a 1-hour cache after two. After that, every read is savings.

Best use cases for prompt caching:

  • Customer support agents with big system prompts

  • RAG-based knowledge assistants querying the same document set

  • Code review bots with extensive rule libraries

  • Document Q&A tools where the same long document is queried many times

If you're not using prompt caching and you're making repeated API calls with overlapping prefixes, you're leaving money on the table.

Batch API: 50% Discount for Async Workloads

The Message Batches API processes large volumes of requests asynchronously at a 50% discount on both input and output tokens. Anthropic says most batches finish within an hour; batches that don't complete within 24 hours expire. It's the simplest way to halve your bill for anything that doesn't need a real-time response.

Batch pricing covers current and legacy models, including Haiku 5.5, Sonnet 5.5, Opus 5.5 and Fable 5.1. Fast mode isn't available with the Batch API, and Claude Managed Agents sessions have no batch mode.

Typical batch processing workloads include:

  • Large-scale classification (for example support ticket labeling with Haiku 5.5)

  • Bulk summarization of document archives

  • Offline analytics and data enrichment

  • Nightly content generation or tagging pipelines

Batch pricing stacks with prompt caching and data residency multipliers. On Opus 5.5 or Sonnet 5.5, a cache read is 5% of base input, and batch halves that again to 2.5%. One caveat: because batch requests run asynchronously, Anthropic provides cache hits on a best-effort basis, and it reports typical hit rates of 30% to 98%.

Explicitly separate latency-sensitive online traffic (messages API standard mode) from non-urgent batch processing so you can push as much volume as possible through the cheaper route.

Claude Code and Code-Focused Usage

Claude Code (Agentdex profile) inside Claude Pro, Max, Team or Enterprise plans draws on your plan's usage limits, which are separate from API billing. On paid plans you can turn on usage credits to keep working past a limit at standard API rates. This split is a common source of confusion.

When you use the Claude API for code tasks such as automated code review, refactoring or test generation, you pay normal per-token rates for whichever model you call, plus any caching or batch discounts you've set up. Sonnet 5.5 and Opus 5.5 are the usual choices.

Don't assume a Claude Pro subscription covers backend automation. Server-side code calling the API with an API key is billed at API token rates. Max plans include $100 or $200 a month in API credits, which can offset some of that.

Typical setups for indie dev tools:

  • Sonnet 5.5 as default for code assistance and review

  • Haiku 5.5 for code classification or linting at scale

  • Opus 5.5 for deeply agentic coding sessions where correctness matters more than raw cost

Estimating Monthly Anthropic API Spend (With Examples)

Here's a simple mental model for claude api cost:

Monthly Cost ≈ (input tokens / 1M × input price) + (cached input / 1M × cache-read price) + (output tokens / 1M × output price)

Add multipliers for data residency, and halve everything for Batch API requests. Cache writes (1.25× input on the 5-minute cache) are small for a shared system prompt and are left out below. These are illustrative examples using list prices, not measured customer bills.

Example 1: Small Chatbot on Sonnet 5.5

  • 10,000 conversations/month

  • 500 input tokens per conversation (400 cached via system prompt, 100 fresh)

  • 700 output tokens per conversation

Component

Tokens

Rate

Cost

Fresh input

1M

$2/MTok

$2.00

Cache reads

4M

$0.10/MTok

$0.40

Output

7M

$10/MTok

$70.00

Total

$72.40

Output dominates the bill. The cached system prompt costs 40 cents.

Example 2: RAG Knowledge Assistant on Fable 5.1

  • 50,000 queries/month

  • 4,000 fresh input tokens + 96,000 tokens of cached knowledge base

  • 600 output tokens per query

Component

Tokens

Rate

Cost

Fresh input

200M

$10/MTok

$2,000

Cache reads

4.8B

$0.25/MTok

$1,200

Output

30M

$50/MTok

$1,500

Total

$4,700

Running the same workload through the Batch API halves each line, to about $2,350, if your cache hit rate holds up. Batch cache hits are best-effort, so budget for some cached tokens being billed at the full input rate.

Example 3: High-Volume Classification on Haiku 5.5 via Batch API

  • 10 million short texts/month

  • 20 input tokens, 5 output tokens per item

  • All via batch API (50% discount)

Component

Tokens

Batch Rate

Cost

Input

200M

$0.05/MTok

$10

Output

50M

$0.25/MTok

$12.50

Total

$22.50

That's 10 million classifications for under $25 at list prices. The cheapest current model plus batch processing makes this kind of job very cheap.

Calibrate your numbers using Anthropic's own pricing tables and usage metrics from your logs rather than guesses, especially before promising fixed-price AI features to customers.

The image depicts a calculator placed on a desk beside a laptop, which displays lines of code on its screen. This setup suggests a workspace focused on programming, possibly related to API usage and token pricing in production AI systems.

Choosing the Right Model Tier for Your Use Case

Model selection is your strongest knob for balancing cost and quality. Pick the cheapest model that meets your UX bar for a given workflow, and only escalate when required.

Quick checklist:

  • Haiku 5.5: routing, classification, tagging, basic extraction, high-volume summarization

  • Sonnet 5.5 - most production chatbots, RAG agents, SaaS assistants, general-purpose work

  • Opus 5.5 - agentic coding sessions, complex reasoning, tasks where task complexity demands deeper coherence

  • Fable 5.1 - long-horizon planning, highest-stakes analysis, problems where Sonnet and Opus measurably fail

A common routing pattern keeps most traffic on Haiku or Sonnet and escalates a smaller share to Opus or Fable based on task type or confidence checks. That keeps your blended cost down while still handling hard cases well.

Benchmark quality against cost on a small sample of real workloads before you hard-code model choices.

Hidden Cost Drivers: Long Context, Output Length, and Multi-Step Workflows

Beyond list price per million tokens, your total cost is heavily influenced by three factors that aren't obvious from headline API rates.

Long context accumulation. Every extra document chunk, RAG retrieval and past chat message adds billable tokens. If you resend the full history each turn, a 20-turn conversation pays for the early messages 20 times. Caching the history prefix reduces that cost.

Output length. Verbose answers and high-effort reasoning produce many more output tokens. Output is the expensive side (Fable 5.1 charges $50 per million output tokens), so set max_tokens explicitly and ask for brevity in your prompts.

Multi-step workflows. When one call's output becomes the next call's input (summarize, then extract structured data, then generate a report), each step pays fresh input and output costs. Design pipelines to avoid redundant steps.

Track cost per workflow or feature rather than only per request, since complex orchestration is where hidden cost surprises lurk.

Adaptive Thinking, Effort Settings, and Cost

Current Claude models use adaptive thinking: the model decides how much to think, steered by the effort parameter. Levels run low, medium, high, xhigh and max, though not every model supports xhigh. Opus 5.5 and Haiku 5.5 default to medium; Sonnet 5.5 and Fable 5.1 default to high.

Effort applies to every output token, thinking included, and there's no discount for reasoning. Raising effort can sharply increase output tokens per task, and lowering it saves tokens on routine work. Anthropic's effort docs note that lower effort also means fewer, terser tool calls.

Practical advice:

  • Use low or medium effort for high-volume work (basic support, simple coding tasks, subagents)

  • Save xhigh and max for narrow, high-value workflows where better quality pays for the extra cost

  • Run A/B experiments comparing low vs high effort in terms of both token usage and business metrics (e.g. resolved tickets, first-pass mergeable PRs) before scaling any higher-effort setting across the board

Tool Use, Server-Side Tools, and Their Pricing Implications

Agentic Claude apps often call your own tools (functions, APIs) or Anthropic-hosted tools like web search, code execution and computer or browser use. All of these add token overhead, and some add separate fees.

When you pass tools, Claude adds a tool-use system prompt (286 tokens on Opus 5.5 and Sonnet 5.5) plus your tool names, descriptions and schemas. Larger tool definitions mean more input tokens on every call.

Each tool call also consumes input and output tokens for arguments, results and follow-up reasoning, billed at normal rates.

Some server-side tools carry non-token fees. Web search costs $10 per 1,000 searches. Code execution is free when used alongside web search or web fetch; otherwise each organization gets 1,550 free hours a month, then $0.05 per container-hour. Claude Managed Agents adds $0.08 per session-hour of active runtime on top of tokens.

To keep tool overhead under control:

  • Trim tool sets to only what's needed per request

  • Simplify JSON schemas

  • Cache tool definitions as part of your system prompt cached prefix

  • Only include tools relevant to the current task context

Reading and Auditing Your Anthropic API Bill

The Claude Console shows usage broken down by category: input tokens, cache writes and reads, output tokens, and batch requests. Review it regularly.

Regularly review distribution of spend across Claude models (Haiku vs Sonnet vs Opus vs Fable) and across workflows (e.g. chat assistant vs code review vs RAG pipeline) to spot misaligned architecture.

Red flags to watch for:

  • Output tokens consistently far above input tokens (verbose responses or high effort)

  • Very low cache read counts relative to writes (cache TTL misalignment or broken sessions)

  • A single workflow consuming 40%+ of monthly tokens without clear business justification

  • Sudden jumps after a model migration (the newer tokenizer produces more tokens for the same text)

Instrument application-side telemetry to correlate Anthropic API costs with product metrics - per-tenant cost, per-feature cost - so teams can confidently turn expensive features up or down.

Practical Cost-Optimization Playbook for Claude API Users

Here's the playbook:

  • Choose the right model tier. Don't use Opus for classification. Don't use Haiku for complex reasoning. Match the model to the task.

  • Cache aggressively. Static system prompts, tool definitions and RAG context should all be cached. Cache reads cost 90% to 97.5% less than normal input, depending on the model.

  • Batch non-urgent workloads. Batch API processing halves input and output token costs. Anything that can wait hours instead of milliseconds should go through batch.

  • Cap output length. Set max_tokens and tune effort for each use case. Don't let the model ramble on your dime.

  • Monitor continuously. Track tokens per request, cache hit ratios, and cost per workflow. Review weekly.

  • Build routing logic. Default to cheaper models unless a request truly needs a higher tier, to keep your blended cost per million tokens down.

  • Design lean prompts. Break large static context into cacheable prefixes. Avoid unnecessary resending of long histories.

Agentdex tracks AI coding tools and agents built on Claude and other models, so you can compare how they're priced and where they fit.

The image shows a person seated at a workstation surrounded by multiple monitors displaying lines of code and dashboard analytics, likely related to API usage and token counts, emphasizing the complexities of managing input and output tokens in production AI systems. The setup suggests a focus on monitoring performance metrics and optimizing costs associated with API pricing and model selection.

Agentdex's Perspective: Picking Models for Dev and Game Projects

Agentdex is an independent directory of AI coding tools, coding agents and AI game makers for AI coders, indie hackers and indie game devs. Rankings are never for sale.

Small teams typically mix models:

  • Haiku or Sonnet for in-game NPC dialog generation and background lore (high volume, lower stakes)

  • Opus or Sonnet for build-time content pipelines (asset descriptions, level design docs)

  • Fable occasionally for design-doc-level reasoning or complex game balancing analysis

Budget-conscious teams can default to Haiku 5.5 with the Batch API for offline world-building and asset tagging, and move specific pipelines to Sonnet 5.5 or Opus 5.5 only when testing shows a clear quality gain.

For pricing changes and new model launches, subscribe to Model Pulse, Agentdex's daily AI newsletter, or grab the free Vibe Coder Starter Kit.

Model Pulse

Daily AI model drops, tools, and what they mean for AI coders.

FAQ

How much does the Claude API cost per million tokens in 2026?

As of October 2026, base prices per million input/output tokens are: Haiku 5.5 from $0.10/$0.50 (rising to $0.50/$2.50 for prompts over 100K tokens), Sonnet 5.5 $2/$10, Opus 5.5 $4/$20 and Fable 5.1 $10/$50. Cache reads, cache writes and batch requests have their own rates. Check Anthropic's pricing docs before hard-coding any numbers.

Is Claude Pro or Claude Max cheaper than using the Claude API?

Claude Pro and Max are subscriptions for people using Claude directly, with usage limits that reset on a rolling five-hour window plus weekly limits. Pro costs $20/month, or $17/month billed annually ($200 up front). Max starts at $100/month and includes $100 or $200 a month in API credits. Team is for 2 to 150 people, and Enterprise is $20 per seat per month plus usage billed at API rates, billed annually.

The Claude API is pure usage-based billing. For backends and automation, the API is the right tool, and it's usually easier to forecast. Subscriptions are for humans working in Claude and Claude Code, not for server-side code.

Can I get a free tier for the Claude API?

There's no standing free tier for production API use. Anthropic says new users get a small amount of free credits to test the API. Treat the API as a paid resource from day one: separate environments, set rate limits and monitor costs even while you're on trial credits.

When should I use Haiku 5.5 instead of Sonnet or Opus?

Haiku is best for simple, repeatable tasks like classification, tagging, routing, extraction and short summaries, where the quality gap between tiers doesn't justify the extra cost. Paired with the Batch API for offline jobs, Haiku 5.5 costs $0.05 input / $0.25 output per million tokens for prompts up to 100K tokens. At those rates, 10 million short items can cost under $25.

How do I stop Claude API costs from suddenly spiking?

Monitor tokens per request and total spend daily. Set max_tokens and effort explicitly on every call. Check new features for their effect on average prompt and response length. Alert on anomalies such as sudden jumps in output tokens or a new workflow taking a large share of spend. Use prompt caching and batch processing wherever possible, and re-baseline token counts when you migrate to a newer model, since the newer tokenizer produces about 30% more tokens for the same text.

Written by Agentdex Editorial. Agentdex is an independent directory reviewing AI coding tools; some links are affiliate links, marked as such (disclosure), and they never change our rankings. Prices and features are as of October 24, 2026, from official sources linked above. Always confirm on the vendor's site.