Usage & Billing

Claude API Pricing in 2026: Rates, Caching Discounts, and What Actually Drives Your Bill

Ethan Cole

What "Claude API pricing" actually means

Anthropic sells access to Claude models through a single API. "Claude API pricing" and "Anthropic API pricing" are two names for the same price list — there is no separate product behind either phrase.

Every price is quoted per million tokens (MTok), and input and output are billed at different rates. A token is roughly three-quarters of an English word; code and non-English text tokenize less efficiently, so the same visible text can cost noticeably more in Chinese, Japanese, or JSON-heavy payloads than in plain English prose.

The figures below reflect Anthropic's published list prices as of August 2026. Prices change with model launches, so confirm against Anthropic's own pricing page before you commit a budget to them.

The price table

Model

Model ID

Context

Input / MTok

Output / MTok

Claude Fable 5

claude-fable-5

1M

$10.00

$50.00

Claude Opus 5

claude-opus-5

1M

$5.00

$25.00

Claude Opus 4.8

claude-opus-4-8

1M

$5.00

$25.00

Claude Opus 4.7

claude-opus-4-7

1M

$5.00

$25.00

Claude Sonnet 5

claude-sonnet-5

1M

$3.00

$15.00

Claude Sonnet 4.6

claude-sonnet-4-6

1M

$3.00

$15.00

Claude Haiku 4.5

claude-haiku-4-5

200K

$1.00

$5.00

Three things in that table matter more than the numbers themselves.

Output costs five times input, on every tier. Cost control is therefore mostly about how much the model writes, not how much you send it. A prompt that triggers a 4,000-token essay when 400 tokens would do is more expensive than a prompt with an extra page of context attached.

Sonnet 5 carries introductory pricing. Anthropic listed it at $2.00 / $10.00 per MTok through 2026-08-31, reverting to $3.00 / $15.00 afterwards. If your cost model was built during the introductory window, rebuild it at standard rates.

Model IDs are exact strings with no date suffix. claude-opus-5 is complete as written. Appending a date (claude-opus-5-20260601) returns a 404 — a common source of "the API stopped working after I updated the config" reports.

Thinking tokens are output tokens

Current Claude models reason before answering, and that reasoning is billed as output. This is the single largest surprise in a first month's invoice for teams migrating from an older model.

Two controls exist:

  • thinking{"type": "adaptive"} lets the model decide how much to think per request. On Claude Opus 5 this is the default; omitting the parameter does not mean thinking is off.
  • output_config.effortlow, medium, high, xhigh, or max. This is the primary spend dial. Lower effort means shallower reasoning, fewer and more consolidated tool calls, and terser output.

Because max_tokens caps thinking plus response text together, a limit sized tightly around the expected answer can truncate mid-response once thinking is on. Budget headroom rather than discovering it in production.

Prompt caching: the largest single discount

Prompt caching stores a prefix of your request server-side so repeated calls do not re-process it.

  • Cache reads cost roughly 0.1× the base input rate.
  • Cache writes cost 1.25× for the default 5-minute TTL, or for the 1-hour TTL.

Break-even follows directly. At 5-minute TTL, two requests against the same prefix already pay for themselves (1.25× + 0.1× = 1.35×, versus 2× uncached). At 1-hour TTL you need three or more (2× + 0.2× = 2.2×, versus 3×).

The mechanism is a prefix match: any byte that changes anywhere in the prefix invalidates everything after it. The classic silent killers are a timestamp interpolated into the system prompt, a UUID near the top of the message array, a json.dumps() without sorted keys, or a tool list assembled in non-deterministic order. Each of these produces a cache hit rate of exactly zero while looking perfectly correct.

There is also a minimum cacheable prefix, and it is not monotonic across generations:

Model

Minimum cacheable prefix

Claude Opus 5, Claude Fable 5

512 tokens

Claude Opus 4.8, Sonnet 5, Sonnet 4.6

1,024 tokens

Claude Opus 4.7

2,048 tokens

Claude Opus 4.6, Haiku 4.5

4,096 tokens

A 3,000-token system prompt caches on Opus 5 and silently does not on Haiku 4.5 — no error, just cache_creation_input_tokens: 0.

Verify with the usage block on every response: cache_read_input_tokens above zero on repeated calls means the cache is working; a persistent zero means something in the prefix is changing.

Batch API: 50% off, at the cost of latency

Requests submitted through the Message Batches endpoint are billed at half the standard rate for both input and output. Limits: up to 100,000 requests or 256 MB per batch, most batches finish within an hour, the ceiling is 24 hours, and results stay retrievable for 29 days.

Batching stacks with prompt caching, so a classification or enrichment job over a shared document can combine both discounts. It is the wrong tool for anything a user is waiting on.

Fast mode: paying for speed

Fast mode runs the same model at up to 2.5× higher output throughput, at premium pricing — $10 / $50 per MTok on Claude Opus 5. It is a research preview on Anthropic's first-party API and is supported on Claude Opus 5 and Opus 4.8 only. It has its own rate-limit pool, and switching speed mid-conversation invalidates the prompt cache.

Working out what a feature will cost

The arithmetic is straightforward once you have token counts:

cost = (uncached_input / 1e6 × input_rate)
     + (cache_read / 1e6 × input_rate × 0.1)
     + (cache_write / 1e6 × input_rate × 1.25)
     + (output / 1e6 × output_rate)

Get the token counts from the API, not from an estimate. The count_tokens endpoint returns exact, model-specific counts:

resp = client.messages.count_tokens(
    model="claude-opus-5",
    messages=[{"role": "user", "content": prompt}],
)
print(resp.input_tokens)

Do not use tiktoken or other OpenAI tokenizers to size Claude prompts — they undercount Claude tokens by roughly 15–20% on ordinary English and by considerably more on code or non-English text. Note also that Opus 4.7 and later use a different tokenizer than Opus 4.6, so counts measured on an older model do not transfer.

Five levers that actually reduce the bill

  1. Tier the models. Route classification, extraction, and routing decisions to Haiku 4.5; reserve Opus for work that genuinely needs it. A five-times price gap between tiers is worth an if-statement.
  2. Cache the stable prefix. Freeze the system prompt, sort your JSON, keep the tool list deterministic, and put everything volatile after the last breakpoint.
  3. Batch anything asynchronous. Nightly enrichment, evals, and bulk classification have no reason to pay full price.
  4. Tune effort per route. Sweep low/medium/high on your own evaluation set instead of leaving everything at the default. Lower tiers are stronger than most teams assume.
  5. Instrument usage from day one. Without per-route token accounting, every other lever is guesswork.

Where the price you pay may differ

The rates above are Anthropic's first-party API rates, and they also apply to Claude on Microsoft Foundry, which bills at standard API rates through the Microsoft Marketplace. Amazon Bedrock and Google Vertex AI are partner-operated with their own pricing and their own model-ID formats (Bedrock prefixes IDs with anthropic.). If you are comparing quotes across platforms, confirm which price list applies before treating the numbers as equivalent.

Gateways and aggregators sit in a third category: they resell first-party capacity under their own billing, so the per-token figure you see there is set by the gateway, not by Anthropic.

Frequently asked questions

Is there a free tier? No. Access is prepaid or invoiced usage, billed per token. Prompt caching, batching, and model tiering are the cost controls, not a free allowance.

Does the 1M-token context window cost extra? On the current generation the 1M window is available at standard rates, with no long-context premium. You still pay for every token you actually send, which is the real constraint.

Are failed or refused requests billed? A request declined by safety classifiers before any output is produced is not billed at all. A refusal that occurs mid-stream bills the output already streamed.

How do I compare Claude with another provider on price? Compare on task cost, not per-token cost. Run the same evaluation set through both, count real input and output tokens with each provider's own tokenizer, and include caching and batch discounts. Per-token comparisons across different tokenizers are close to meaningless.

Getting a single view of spend

If you call Claude alongside other model families, the accounting problem multiplies: separate credentials, separate dashboards, separate token conventions. That is the gap ROIBest AI addresses — one OpenAI-compatible endpoint, one key, and per-key usage records across models, so cost attribution lives in one place instead of three.

If you are wiring up an integration, connecting Claude Code and the OpenAI-compatible protocol notes cover the setup end; what an LLM API gateway does covers the architecture question of whether you need one at all.