Claude AI API Token Price: What Each Token Costs
Claude's API is priced per token, not per request or per conversation. Every model has two separate rates: one for input tokens (the text you send) and one for output tokens (the text Claude generates), and output tokens almost always cost more than input tokens because they require more compute to produce.
The actual token price depends on which model you call. Anthropic publishes rates per million tokens, and they range from fractions of a cent per thousand tokens on Haiku models to several cents on Opus. Below is a breakdown of how the pricing works, roughly what each model family costs, and how to turn a token count into a real dollar figure.
How Claude token pricing works
Anthropic bills in tokens per million (MTok), and that unit shows up everywhere in the docs and dashboard. A token is a chunk of text — roughly 4 characters or 0.75 words in English, though code and non-English text tokenize differently.
The pricing structure has three layers:
- Input tokens — the prompt, system message, conversation history, and any documents or context you send
- Output tokens — everything Claude writes back, including text inside tool calls
- Cache tokens — if you use prompt caching, cached input reads cost a fraction of normal input, while writing to the cache costs more than normal input for that turn
This last point matters a lot in practice. If your app resends a large system prompt or document on every request, prompt caching can cut your effective token price significantly, since only the first call pays full price to write the cache.
Approximate per-model rates
Anthropic's published pricing (check the official page for the current numbers, since rates do shift) roughly breaks down like this per million tokens:
- Claude Opus models — the highest-reasoning tier, priced around $15 input / $75 output per million tokens
- Claude Sonnet models — the balanced default for most production apps, around $3 input / $15 output per million tokens
- Claude Haiku models — the fast, cheap tier, ranging from under $1 to a few dollars input, with output priced proportionally higher
The gap between tiers is large on purpose. Opus costs roughly 5x Sonnet and 15–20x Haiku on input alone. That's why picking the right model for the task — not defaulting to the biggest one — is usually the single biggest lever on your bill.
Turning token counts into a real price
The math is straightforward once you have token counts:
cost = (input_tokens / 1,000,000) * input_price
+ (output_tokens / 1,000,000) * output_price
For example, a support-bot request with a 2,000-token system prompt, 300-token user message, and a 500-token reply on a Sonnet-tier model at $3/$15 per million:
input: 2,300 / 1,000,000 * $3 = $0.0069
output: 500 / 1,000,000 * $15 = $0.0075
total: $0.0144
That's under two cents per call, but it scales fast. At 50,000 requests a month, this single flow costs roughly $720. Long system prompts, verbose tool schemas, and full conversation history sent on every turn are the usual culprits behind surprising bills — not the per-token price itself.
Why token price is easy to underestimate
A few things routinely blow up the effective cost per request:
- Conversation history — if you resend the full chat log each turn, token count (and cost) grows with every message
- Tool definitions — tool schemas sent with every call count as input tokens, even when the tool isn't used
- System prompts — a detailed 3,000-token system prompt gets billed on every single request unless it's cached
- Output verbosity — Claude's default response length varies by prompt; unconstrained prompts can produce longer, more expensive outputs than needed
Setting max_tokens deliberately, trimming history, and using prompt caching for static context are the three cheapest ways to control token spend without changing models.
Where a token-billing wrapper fits in
Anthropic's console shows usage in aggregate, but if you're shipping Claude inside a product — with multiple team members, multiple app environments, or customers who need their own usage visibility — raw console numbers aren't enough. SubToAPI sits on top of your existing Claude access and gives you sub_live_... API keys per application, so you can see token usage and cost broken out by key instead of guessing which feature is driving the bill.
It doesn't change Anthropic's per-token pricing — it's a layer for issuing keys, tracking usage, and managing team seats around the access you already have. Plans start at Solo €9, Team €19/seat, and Scale €49/seat, with a free trial at signup. If you're trying to attribute token spend to specific apps or teammates, the pricing page and quickstart docs walk through the setup.
Practical ways to lower your effective token price
- Default to Sonnet or Haiku; reserve Opus for tasks that genuinely need the extra reasoning
- Cache long, repeated context (system prompts, reference documents) instead of resending it
- Cap
max_tokensto match the expected output length - Summarize or truncate conversation history instead of sending the full transcript every turn
- Strip unused tool definitions from requests where they won't be called — see the tools docs for how tool-call tokens are counted
Questions
Is the Claude API priced per token or per request? Per token. You're billed separately for input tokens (what you send) and output tokens (what Claude generates), based on the model you call — there's no flat per-request fee.
Why is output more expensive than input? Generating tokens requires more compute per token than reading them, so every Claude model prices output at roughly 4–5x the input rate.
Does prompt caching actually reduce token price? Yes. Cached input tokens are billed at a fraction of the normal input rate on repeat calls, though the first call that writes to the cache costs more than a normal input token that turn.