How to cut Claude API costs
Short version: most Claude bills shrink the most from three changes: use the smallest Claude model that does the job, turn on prompt caching, and stop the model from writing more than you need. The steps below show how, with numbers from our daily-checked prices.
First, know what you pay for
Claude charges per million tokens (a token is roughly ¾ of a word). You pay for three things:
- Input: everything you send, including instructions, tool descriptions and chat history.
- Output: everything Claude writes back. It costs about 5× more per token than input.
- Cached input: repeated input that Claude reads from its cache, at a much lower price.
| Model | Input / 1M | Output / 1M | Cached input / 1M |
|---|---|---|---|
| Claude Opus 5.5 | $4 | $20 | $0.2 |
| Claude Sonnet 5.5 | $2 | $10 | $0.1 |
| Claude Haiku 5.5 | $0.1 | $0.5 | $0.01 |
Check your own split in the Claude Console under Usage. If most tokens are input, focus on caching and trimming context. If output is a big share, focus on shorter answers.
1. Use the smallest model that passes your test
Our example agent (500 tasks a day, 6 steps per task, 3,000 input and 400 output tokens per step) costs very different amounts on each Claude model:
| Model | No caching | 70% cached |
|---|---|---|
| Claude Opus 5.5 | $1,800/mo | $1,082/mo |
| Claude Sonnet 5.5 | $900/mo | $541/mo |
| Claude Haiku 5.5 | $45.00/mo | $27.99/mo |
How to test it: pick 20 real tasks, run them on the cheaper model, and compare the answers with what you get today. If the small model passes most of them, switch, and keep the bigger one for the cases it fails.
2. Turn on prompt caching
Agents resend the same instructions and tool list on every step. With caching, that repeated part is billed at the cached price (Claude Sonnet 5.5: $0.1 instead of $2 per million). On the Claude API you add cache_control to your request; Claude Code does it for you. Keep the parts that never change at the start of the prompt and anything that changes (dates, the user's message) at the end, or the cache won't match.
Note: writing to the cache costs a bit more than normal input the first time, and the default cache lasts about 5 minutes. Caching pays off when the same prefix is reused within that window. Full details: Prompt caching explained.
3. Route easy steps to a cheaper model
Many agent steps are simple: picking a tool, extracting a field, summarising a result. Send those to Claude Haiku 5.5 and keep Claude Sonnet 5.5 for planning and hard reasoning. If 80% of steps go to Haiku and 20% to Sonnet (both 70% cached), our example agent costs about $131/mo instead of $541/mo on Sonnet alone.
4. Ask for shorter answers
Output is the expensive side. Ask for "the diff only", "JSON with these 3 fields" or "answer in 3 sentences", and set max_tokens so a runaway answer can't cost a fortune. Cutting output from 400 to 250 tokens per step brings the Sonnet example from $541 to $406/mo.
5. Keep the context small
- Don't resend the full chat history every step; pass a short summary or a small "state" object instead.
- Trim big tool results (long JSON, whole web pages) before they go back to Claude.
- Only load the tools the agent needs for this task. Every tool description is input you pay for on every step.
Watch out with Claude Haiku 5.5: Anthropic lists a higher price for prompts over 100,000 tokens, so very long contexts lose part of its price advantage.
6. Use the Batch API for work that can wait
If results don't need to come back in seconds (nightly reports, tagging a backlog, evaluations), Anthropic's Message Batches API processes requests asynchronously at a discount. Check the current discount on Anthropic's pricing page before you plan around it.
7. Set limits so a bug can't drain your account
- Set a monthly spend limit and an email alert in the Claude Console.
- Cap steps per task in your agent loop (for example 15) and stop if the same tool is called with the same arguments twice in a row.
- Log tokens per task, not just per month, so you can see which workflow is expensive.
Try your own numbers
Plug your tasks per day, steps and tokens into the calculator with these three Claude models to see your own monthly cost. For more general tips, see How to reduce LLM token costs.
Try it with your own numbers: the free AI agent cost calculator shows the monthly cost for 10 popular models in seconds.
Want a step-by-step method? The AI Agent Cost Playbook (29-page PDF + spreadsheet, $29 + tax) walks you through cutting your bill in one afternoon. Free sample.
Prices are list prices per million tokens from our pricing table (last refresh 2026-11-02); check providers before you commit. This guide was written with help from AI tools and checked by a human. See also: model vs model cost comparisons and recent price changes.
Newsletter
Weekly LLM & agent pricing changes and cost tips. Free.