Claude API Pricing: Per-Token Costs and Worked Examples

Claude API pricing for every current model: input and output rates per million tokens, prompt caching, the Batch API discount and three worked cost examples.

Josh Pocock7 min read

Claude API pricing cover

AI Coding

Claude API pricing

Stride AI Academy

Claude API pricing is per million tokens (MTok), with separate rates for input and output. On November 22, 2026, Claude Opus 5.5 costs $4 per million input tokens and $20 per million output tokens, Sonnet 5.5 costs $2 and $10, Haiku 5.5 starts at $0.10 and $0.50, and Fable 5.2 costs $8 and $40. Prompt caching and the Batch API can cut those rates a lot.

This guide lists the per-model rates, explains caching, batch, long-context and tool pricing, then works through three real cost examples with the arithmetic shown. Everything here was checked against Anthropic's API pricing docs and models overview on November 22, 2026. All prices are in US dollars.

This page is about the API only. Claude subscription plans (Pro, Max, Team) are billed differently and are covered in our Claude pricing guide.

Claude API prices by model

Current models, from the pricing docs:

Model API model ID Input Output
Claude Fable 5.2 claude-fable-5-2 $8 / MTok $40 / MTok
Claude Opus 5.5 claude-opus-5-5 $4 / MTok $20 / MTok
Claude Sonnet 5.5 claude-sonnet-5-5 $2 / MTok $10 / MTok
Claude Haiku 5.5 (prompts up to 100,000 tokens) claude-haiku-5-5 $0.10 / MTok $0.50 / MTok
Claude Haiku 5.5 (prompts over 100,000 tokens) claude-haiku-5-5 $0.50 / MTok $2.50 / MTok

All four have a 1M-token context window and up to 128K output tokens. The models overview says to start with Opus 5.5 for most workloads, and to use Fable 5.2 for demanding reasoning and long-horizon agent work.

Older models still on the price list include Fable 5.1 and Fable 5 at $10 and $50, Opus 5 and Opus 4.5 to 4.8 at $5 and $25, Sonnet 5 at $2 and $10, Sonnet 4.5 and 4.6 at $3 and $15, and Haiku 4.5 at $1 and $5.

Tokens and the newer tokenizer

A token is a piece of text. The docs note that Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text. So the same prompt can cost more tokens on a new model than an old one. Use the token counting endpoint with the model's ID to measure a real request.

Anthropic API pricing for caching

Prompt caching lets you reuse a long, repeated prefix, such as a system prompt or a document, at a fraction of the input price:

Cache operation Multiplier on input price
5-minute cache write 1.25x
1-hour cache write 2x
Cache read (hit) 0.1x on most models

Some current models read from cache for less than 0.1x:

Model 5-min write 1-hour write Cache read
Fable 5.2 $10 / MTok $16 / MTok $0.20 / MTok (0.025x)
Opus 5.5 $5 / MTok $8 / MTok $0.20 / MTok (0.05x)
Sonnet 5.5 $2.50 / MTok $4 / MTok $0.10 / MTok (0.05x)
Haiku 5.5 (up to 100K) $0.125 / MTok $0.20 / MTok $0.01 / MTok (0.1x)

The docs say a 5-minute cache pays for itself after one read, and a 1-hour cache after two.

Batch API pricing

The Batch API processes requests asynchronously at 50% off both input and output. Opus 5.5 drops to $2 and $10, Sonnet 5.5 to $1 and $5, and Haiku 5.5 to $0.05 and $0.25 for prompts up to 100,000 tokens. Batch and caching discounts stack.

Other Claude API costs

  • Long context: Claude 4.6 and later models bill the full 1M context at standard rates, except Haiku 5.5, which uses the higher rates for prompts over 100,000 tokens.
  • Web search: $10 per 1,000 searches, plus tokens. Web fetch has no extra charge.
  • Code execution: free when used with current web search or web fetch tools. Otherwise each organization gets 1,550 free hours a month, then $0.05 per hour per container.
  • Tool definitions: tools add input tokens. Opus 5.5, Sonnet 5.5 and Haiku 5.5 add a 286-token tool system prompt with tool_choice set to auto.
  • US-only inference: setting inference_geo to "us" adds a 1.1x multiplier on Claude 4.6 and later models.
  • Fast mode: Opus 5.5 at $8 and $40, Fable 5.2 at $16 and $80. It isn't available with the Batch API.
  • Managed Agents: tokens at normal rates plus $0.08 per session-hour of running time.

New API users get free credits to test the API.

Claude API cost: three worked examples

Each example uses the rates above. To turn tokens into dollars, divide by 1,000,000 and multiply by the price per MTok.

Example 1: a support chatbot on Sonnet 5.5

Assume 10,000 messages a month. Each request sends 3,000 input tokens (a 2,500-token system prompt and FAQ, plus 500 tokens of conversation) and gets 400 output tokens back.

Without caching:

  • Input: 10,000 x 3,000 = 30,000,000 tokens = 30 MTok x $2 = $60.00
  • Output: 10,000 x 400 = 4,000,000 tokens = 4 MTok x $10 = $40.00
  • Total: $100.00 a month

With a 5-minute cache on the 2,500-token prefix, assuming 1 in 10 requests writes the cache and the other 9 read it:

  • Cache writes: 1,000 x 2,500 = 2.5 MTok x $2.50 = $6.25
  • Cache reads: 9,000 x 2,500 = 22.5 MTok x $0.10 = $2.25
  • Uncached input: 10,000 x 500 = 5 MTok x $2 = $10.00
  • Output: 4 MTok x $10 = $40.00
  • Total: $58.50 a month, which saves $41.50

Example 2: one coding agent run on Opus 5.5

An agent run resends its growing context on every turn, so input adds up fast. Assume one task uses 2,000,000 input tokens in total: 1,800,000 read from cache, 150,000 written to a 5-minute cache and 50,000 uncached. It produces 60,000 output tokens.

  • Uncached input: 0.05 MTok x $4 = $0.20
  • Cache writes: 0.15 MTok x $5 = $0.75
  • Cache reads: 1.8 MTok x $0.20 = $0.36
  • Output: 0.06 MTok x $20 = $1.20
  • Total: $2.51 for the run

Without caching, the same run costs 2 MTok x $4 = $8.00 for input plus $1.20 for output, so $9.20. On Sonnet 5.5 with the same caching it's $0.10 + $0.375 + $0.18 + $0.60 = $1.255, about $1.26.

If you run Claude Code with an API key, this is the kind of bill you'll see. Our Claude Code cost calculator estimates it from your own usage, and how much Claude Code costs compares API billing with plans.

Example 3: a batch classification job on Haiku 5.5

Assume you classify 100,000 support tickets. Each request has 800 input tokens, well under the 100,000-token threshold, and returns 50 output tokens. You send them through the Batch API.

  • Input: 100,000 x 800 = 80,000,000 tokens = 80 MTok x $0.05 = $4.00
  • Output: 100,000 x 50 = 5,000,000 tokens = 5 MTok x $0.25 = $1.25
  • Total: $5.25

At standard rates the same job costs 80 x $0.10 = $8.00 plus 5 x $0.50 = $2.50, so $10.50. The Batch API halves it.

How to keep Claude API costs down

From the cost tips in the pricing docs:

  1. Pick the right model. Haiku for simple, high-volume tasks, Sonnet for most production work, Opus for the hardest reasoning.
  2. Cache repeated context. System prompts, tool definitions and long documents are the usual candidates.
  3. Batch anything that can wait. It's 50% off.
  4. Watch usage in the Claude Console.

Rate limits also cap how many tokens you can spend per minute. See Claude API rate limits for the tiers.

Paying for the Claude API

Billing is based on actual monthly usage, paid in US dollars by card or invoice. You buy credits and manage payment methods on the Billing page of the Claude Console. Max, Ultra and Team plans include monthly API credits that can pay for API usage; the Claude credits guide explains which credits cover what.

Ready to make your first call? Follow our Claude API tutorial. Comparing providers? See Gemini API pricing vs Claude.

Learn to build with Claude Code

The Stride AI Coding course teaches Claude Code and Codex for building client tools, written for non-programmers, with weekly live calls to review your builds. Many of the free guides cover Claude Code setups, and the Claude Code community is where members compare theirs.

FAQ

How much does the Claude API cost?

It depends on the model. On November 22, 2026, Opus 5.5 is $4 per million input tokens and $20 per million output tokens, Sonnet 5.5 is $2 and $10, Haiku 5.5 starts at $0.10 and $0.50, and Fable 5.2 is $8 and $40.

Is the Claude API free?

No, but new users get free credits to test it. After that you pay per token through the Claude Console.

How much does prompt caching save?

Cache reads cost 0.1x the input price on most models, and 0.05x on Opus 5.5 and Sonnet 5.5. Writes cost 1.25x for a 5-minute cache or 2x for a 1-hour cache, so a 5-minute cache pays off after one read.

What is the Claude Batch API discount?

50% off both input and output tokens for requests processed asynchronously. It stacks with prompt caching but not with fast mode.

Does a Claude Pro subscription include API usage?

No. The API is billed separately per token. Max, Ultra and Team plans include monthly API credits, but Pro doesn't.

Why does the same prompt cost more tokens on newer models?

Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text. Count tokens with the target model's ID to know the real cost.

Build it with us in Stride AI Academy

Four courses, weekly live calls and a community of people building and selling AI. Or start with 320+ free guides.

Keep reading

Free AI Coding guides