Claude API Pricing Explained: Tokens and Savings
Claude pricing starts with three token buckets
If you want to control Claude API spend, you need to understand the three things you are billed for: input tokens, output tokens, and cache tokens. The short version is simple: input tokens are what you send, output tokens are what Claude generates, and cache tokens are reused context that does not need to be resent in full every time.
A practical rule of thumb is that 1,000 tokens is roughly 750 words of English text. That means a long prompt, a big system instruction, or a pasted document can become expensive fast, especially on higher-end models.
What each token type means in real usage
Input tokens include your user message, system prompt, tool definitions, and any document text you attach. If you send 8,000 tokens to a model, you pay for all 8,000 even if the answer is short.
Output tokens are the assistant's generated text. This is where costs can jump if you ask for long explanations, code dumps, or multi-part reports. On Claude, output is often the most expensive part of a request.
Cache tokens are repeated tokens stored so you do not have to keep resending the same long prompt. They are especially useful for apps with fixed policies, large reference docs, or repeated instructions in every chat turn.
Concrete cost examples you can budget around
Using widely cited Claude pricing as a reference point, Sonnet is about $3 per 1 million input tokens and $15 per 1 million output tokens. Haiku is about $0.25 per 1 million input tokens and $1.25 per 1 million output tokens. Opus is much higher, at roughly $15 per 1 million input tokens and $75 per 1 million output tokens.
Here is what that looks like for one request with 8,000 input tokens and 2,000 output tokens:
- Sonnet: input $0.024 + output $0.030 = $0.054
- Haiku: input $0.002 + output $0.0025 = $0.0045
- Opus: input $0.12 + output $0.15 = $0.27
That same request on Opus costs 60 times more than Haiku and 5 times more than Sonnet. If your app makes 10,000 similar calls per month, the difference between Sonnet and Opus is about $2,160 versus $540 in this example.
How cache tokens save money
Cache savings come from not paying full input cost for the same repeated text over and over. Suppose 6,000 of your 8,000 input tokens are a static product manual, policy doc, or coding guide. If you stop resending that block every time, your fresh input drops from 8,000 tokens to 2,000 tokens.
On Sonnet, that means the input portion falls from $0.024 to $0.006 per call, a saving of $0.018 before any additional cache-hit discount is applied. Over 1,000 calls, that is $18 saved just from reducing repeated prompt traffic. On larger workloads, the savings compound quickly.
To get the most from cache tokens, keep reusable instructions stable, avoid rewriting long prompts every turn, and put variable user data in a small message at the end. This makes the cache easier to hit and keeps your bill predictable.
Five practical ways to cut Claude API spend
- Use the smallest model that fits the task. Reserve Opus for hard reasoning, use Sonnet for most production work, and use Haiku for classification, extraction, and draft generation.
- Shorten outputs aggressively. Asking for a 500-token answer instead of a 2,000-token answer can save real money. On Sonnet, that is about $0.0075 instead of $0.030.
- Cache fixed context. Long policies, style guides, and reference docs should not be resent on every call.
- Measure token use per endpoint. Log average input and output tokens so you can spot expensive requests quickly.
- Use a low-cost relay when you can. 59API offers pay-as-you-go access to Claude models through the base URL https://api.59api.com, with native official-quality models, OpenAI SDK compatibility, and one of the cheapest relay pricing structures available.
Why 59API is a smart cost-optimization choice
If you are building with Claude Code, Codex, or any OpenAI-compatible SDK, 59API lets you switch providers without rewriting your app. That matters because the cheapest way to save on Claude is not only better prompt design, but also better infrastructure pricing. With 59API, you get cheap pay-as-you-go access, no downgrade in model quality, and a referral rebate that can reduce effective spend even further.
If you want to benchmark your real workload, sign up for 59API and test the same prompts, outputs, and cache-heavy flows against your current setup. A small pricing difference per token can become a big monthly saving once your app scales.
Prêt à commencer ?
Connectez Claude et GPT en quelques minutes aux prix les plus bas, sans bridage. Inscrivez-vous pour votre clé API.
Inscription gratuite