To reduce Claude API costs, measure which token type is spending the money first, then work through eight levers in order: cache the stable prefix, batch anything that can wait, pick the model per request, set the reasoning effort per request, cap and shrink the output, trim the input, turn off fast mode where nobody is waiting, and only then add a router. Caching and batching change the price of tokens you already send. The other levers change how many you send, or which model reads them.
This is a checklist, not a benchmark. It contains no savings percentage, because the result depends on your traffic. Multipliers are from Anthropic's pricing and API docs as of November 2026. Confirm them on [Anthropic's pricing page](https://www.anthropic.com/pricing) before you plan around them.
Where a Claude API bill comes from.
Each request bills four token types, at four different rates:
| Token type | What it is | Rate relative to base input |
|---|---|---|
| Cache read | A cached prefix the model reads again | 0.1x |
| Cache write | A prefix written to the cache | 1.25x (five-minute cache), 2x (one-hour cache) |
| Uncached input | Input with no cache | 1x |
| Output | The answer, tool calls and thinking | Several times input, varies by model |
Two discounts sit on top. The Message Batches API halves the price of every token type, in exchange for results within 24 hours. Fast mode, where a model offers it, doubles the price, caching included.
Step 0: measure before you change anything.
- The `usage` block on every response reports
input_tokens,cache_creation_input_tokens,cache_read_input_tokensandoutput_tokens. Log it per request with the feature or endpoint that sent it. - The token counting endpoint (
/v1/messages/count_tokens) prices a prompt before you send it, which is how you size a change without paying for it. - The Anthropic Console usage and cost pages break spend down by model and API key. Give each service its own key and the breakdown becomes per service.
If uncached input is the largest share, start with levers 1 and 6. If output is, start with levers 4 and 5. If one model is most of the bill, start with lever 3.
The eight levers.
1. Cache the stable prefix
Put everything that does not change between requests first: system prompt, tool definitions, reference documents, few-shot examples. Mark the end of it with cache_control. A cache read then costs a tenth of fresh input. The cache matches on an exact prefix, so a timestamp, a request ID or a reordered tool list near the top breaks it for everything after. The five-minute cache refreshes each time it is read. Use the one-hour cache, at a higher write price, only when the gap between requests is longer than five minutes and the prefix is read often enough to repay the write. Check cache_read_input_tokens in the usage block. If it stays at zero, the prefix is not matching.
2. Batch anything that can wait
Evaluations, backfills, classification, enrichment, nightly reports: if nobody is waiting on the answer, send it through the Message Batches API at half price. Caching still applies inside a batch. Fast mode does not. We compared batch discounts across providers in The 50% Discount Nobody Uses.
3. Pick the model per request
The price gap between Haiku, Sonnet, Opus and Fable is larger than any other lever on this list. Classification, extraction, short rewrites and routing decisions rarely need the largest model. Choose the model in code, per request type, instead of one model for the whole service. Watch the fine print on each rate card: Haiku 5.5 has a long-context price step at 100K tokens, so the cheapest model is not always cheapest on long inputs. In a multi-turn conversation, choose at the start. The cache is keyed to the model, so a mid-conversation switch re-writes the whole prefix. The break-even math is in Your Router Is Fighting Your Prompt Cache.
4. Set the reasoning effort per request
Thinking tokens bill as output, the most expensive token type. Set effort, or the thinking budget, per request type, not once for the whole service. A lookup at high effort pays for reasoning nobody reads. On one illustrative Fable 5.2 task, effort alone moved the cost more than the November price cut did.
5. Cap and shrink the output
Set max_tokens to what the feature needs, not the model's maximum. Ask for the format you will parse: a label, a JSON object with only the fields you read, no preamble and no restated question. Use structured outputs or a tool schema when you parse the result, so a malformed answer does not cost a retry. More patterns are in Reduce LLM Output Tokens.
6. Trim the input
Send the relevant chunk, not the whole document. Drop tool definitions the request cannot use. In long conversations, clear old tool results instead of carrying them forward. Each of these lowers the bill on every later turn too, because every turn re-sends the history. Trimming inside the cached prefix changes the prefix, so trim at a deploy, not request by request.
7. Turn off fast mode where nobody is waiting
Fast mode buys latency at twice the price. It pays only when a person is waiting on the answer. Background jobs, agents running unattended and anything batch-shaped should run in standard mode.
8. Add a router last
Choosing the model in code (lever 3) works until the request types blur and nobody can say which ones need the large model. A router makes that choice per request. It helps when your traffic is a real mix of easy and hard requests and you would otherwise leave the largest model on. It does not help when the cheap model already passes nearly everything, when the candidate models are near peers in price, or when a switch would throw away a warm cache. We published our own negative results in When LLM Routing Does Not Help, and compared the products in How to Choose an LLM Router.
A team is a different problem.
For one service, the levers above are code changes. For a team, they are policy: a model allowlist, a budget per service or developer, and spend broken out by owner. A gateway such as LiteLLM, Bifrost or Portkey enforces the budget and the allowlist. A router decides the model inside those limits. The two are different layers, compared in AI gateway vs model router.
Where Nadir fits.
Nadir covers lever 8 and part of step 0.
- Lever 8. Nadir is a decision layer for the model and reasoning effort of each request. It runs beside your existing gateway, including LiteLLM as the native
nadir/autoprovider, starts in shadow mode, and returns a receipt per decision covering model, effort, cache, policy and economics. The decision API returns the plan without calling your model provider, and the managed OpenAI-compatible proxy can also execute it. It costs $0.002 per request with the first 50 a month free, and takes no markup on model spend. - Step 0 for coding agents.
npx nadir-receiptprices your local Claude Code and Codex history at API list prices. It runs locally and makes no network calls. Details are on the receipt page.
Nadir does not do levers 1, 2, 5, 6 or 7 for you. Caching, batching, output size, input size and fast mode are yours, and on many workloads they are the larger share. Nadir publishes no universal savings rate. Measure first, then decide whether a router is worth adding.
If you use Claude through Claude Code rather than the API directly, the session-level version of this checklist is How to Reduce Claude Code Costs.
Conclusion.
Measure which token type is spending the money. Cache the prefix and batch what can wait before you change anything else. Choose the model and effort per request, cap the output, and add a router when the choice needs to happen without anyone maintaining it by hand.