Pricing & Plans
Claude API pricing
The API bills per million tokens, in and out, at different rates per model. Everything expensive about an API bill comes from one of three places: the model you chose, the context you re-send, and the output length you never capped.
This page is part of the Pricing & Plans hub, which covers the whole topic end to end.
Unlike a subscription, the API has no allowance and no cap — you are billed for exactly what you send and receive. That is either the best or the worst property of the API depending on whether anyone is watching the context length.
Rates by model
| Model class | Input / 1M | Output / 1M | Use it for |
|---|---|---|---|
| Opus-class | ~$15 | ~$75 | Hard reasoning, long agentic runs you cannot supervise |
| Sonnet-class | ~$3 | ~$15 | Almost everything; the default |
| Haiku-class | ~$0.80 | ~$4 | Classification, extraction, high-volume simple calls |
Output costs several times what input does across every model. That asymmetry is why “be concise” in a system prompt is a real cost control and not just a style preference, and why asking for a diff instead of a whole rewritten file often halves a call.
The three discounts worth knowing
Prompt caching
If the same long prefix — a system prompt, a document, a codebase summary — is sent on every call, caching it makes repeat reads dramatically cheaper than fresh input. The win is largest for exactly the pattern that hurts most without it.
Batch processing
Work that does not need an immediate answer can be submitted asynchronously at a substantial discount. Nightly enrichment, evaluations and backfills belong here; most teams never move them.
Model downgrade
The largest single lever is usually not a discount at all. A task running on Opus-class that would pass on Sonnet-class is roughly a fivefold overspend, repeated every call.
A worked example
A support-triage feature handles 50,000 messages a month. Each call sends a 2,000-token system prompt plus a 500-token message, and returns 300 tokens.
- Input: 125M tokens a month. Output: 15M tokens a month.
- On Sonnet-class: roughly $375 input + $225 output ≈ $600 a month.
- With the system prompt cached: input drops toward the cached rate — often a majority of that $375.
- On Haiku-class where the task allows it: the whole thing lands near $160.
Same feature, same output quality, a threefold swing — decided entirely by choices nobody revisits after launch.
What usually goes wrong
- No
max_tokensceiling, so a verbose answer costs five times a terse one. - Whole conversation history re-sent on every turn when only the last two turns matter.
- Retries on failure that silently double the spend of any flaky path.
- A prototype’s model choice shipped to production untouched.
If you are not on the API
Subscription users never see these rates, but the mechanics are identical — you are spending the same tokens against a usage limit instead of a bill. Compare tiers on Pro vs Max.