Claude bills by the token — a token being a chunk of text, roughly three-quarters of an English word on average. But "tokens" on your bill is not one number. Every Messages API response carries a usage object with distinct counters, each priced differently. Understanding those counters is the whole game of Claude cost management, and they behave the same way whether you call Claude first-party or through Amazon Bedrock, Google Vertex AI, Microsoft Foundry, or Claude Platform on AWS.
The four core line items
input_tokens — often called prompt tokens — is everything you send that was not served from cache: your system prompt, conversation history, tool definitions, tool results, images, and documents. With prompt caching in play, this field counts only the tokens after the last cache breakpoint.
output_tokens — completion tokens — is everything the model generates: the visible answer, tool-call arguments, and any reasoning ("thinking") tokens. Thinking tokens are billed as output even when the reasoning text is summarized or omitted from the response, and usage.output_tokens_details.thinking_tokens tells you how many of your output tokens were reasoning.
cache_creation_input_tokens appears when a request writes a prompt prefix into the cache. Cache writes cost more than plain input: 1.25x the base input price for a 5-minute cache, 2x for a 1-hour cache.
cache_read_input_tokens appears when a later request reuses that prefix. Cache reads cost 0.1x the base input price — the discount that makes the write premium worthwhile.
input_tokens + cache_creation_input_tokens + cache_read_input_tokens. All three also count toward the context window — caching changes what you pay, not whether tokens count.What each line item costs
List prices per million tokens on the current models (identical list pricing across the cloud marketplaces):
| Model | Input | Output | 5m cache write | Cache read |
|---|---|---|---|---|
| Claude Fable 5 | $10.00 | $50.00 | $12.50 | $1.00 |
| Claude Opus 4.8 | $5.00 | $25.00 | $6.25 | $0.50 |
| Claude Sonnet 5 | $3.00 ($2.00 intro to Aug 31, 2026) | $15.00 ($10.00 intro) | $3.75 ($2.50 intro) | $0.30 ($0.20 intro) |
| Claude Haiku 4.5 | $1.00 | $5.00 | $1.25 | $0.10 |
Worked example on Claude Opus 4.8: a request with 40,000 fresh input tokens and 2,000 output tokens costs 40,000 × $5/1M + 2,000 × $25/1M = $0.20 + $0.05 = $0.25. If 35,000 of those input tokens had been a cache read instead, the input side drops to 5,000 × $5/1M + 35,000 × $0.50/1M = $0.0425.
Modifiers that multiply the line items
Several pricing modifiers stack on top of the base rates. The Batch API halves both input and output prices for asynchronous jobs (see the Batch API discount). US-only data residency (inference_geo: "us") applies a 1.1x multiplier to every token category on Claude Opus 4.6, Sonnet 4.6, and later. On Bedrock and Google Cloud, regional and multi-region endpoints carry a 10% premium over global endpoints from Sonnet 4.5, Haiku 4.5, and Opus 4.5 onward. Notably, there is no long-context surcharge: on the 1M-context models a 900k-token request bills at the same per-token rate as a 9k-token one.
Beyond tokens, a few tools add their own line items: web search bills $10 per 1,000 searches on top of token costs, and code execution is billed by container time after a free monthly allowance. Tool definitions themselves also consume input tokens on every request — enabling tools adds a few hundred tokens of system-prompt overhead before you send a single word.
Where to see the breakdown
On the first-party API, the Usage and Cost Admin API reports token consumption broken down by model, workspace, and service tier, with a separate cost endpoint in USD. On the cloud platforms you read the same story through the provider's billing tooling instead — for example, AWS Cost Explorer for Bedrock or Bedrock's billing line items. Either way, the per-response usage object is your ground truth: log it on every call and the monthly invoice stops being a surprise.
Where to go next
Dig into the two biggest levers next: input vs. output economics and the cache break-even math. For a first call, start at the quickstart.