How to reduce LLM token costs

You don't need to be an ML engineer to cut your AI bill. Here are 8 steps, roughly in order of how much they usually save, with a worked example at the end.

1. Measure first

Log tokens in and out per task and per step. Without this you are guessing. Observability tools like those in our directory do this for you, many with free tiers.

2. Use a cheaper model for easy steps

Classifying, extracting and summarising rarely need the most expensive model. Send those steps to a small model and keep the big one for hard reasoning. This is called model routing.

3. Turn on prompt caching

Agents repeat the same instructions on every step. Cached input is often about 90% cheaper. See Prompt caching explained.

4. Shorten prompts and history

Remove examples the model doesn't need, summarise old conversation turns, and only pass the parts of a document that matter.

5. Limit output length

Output tokens usually cost 4–5× more than input. Ask for short answers or structured JSON, and set a max-tokens limit.

6. Cap steps and retries

Set a maximum number of steps per task and a daily spending alert, so a stuck agent can't run up a surprise bill.

7. Batch work that can wait

Many providers offer about 50% off for batch jobs that finish within 24 hours, ideal for nightly reports or bulk processing.

8. Re-check prices every month

Prices change often, up and down. Our pricing table is refreshed regularly and our newsletter flags changes.

Worked example

Example agent: 500 tasks/day, 6 steps per task, 3,000 input / 400 output tokens per step.

ChangeMonthly cost
All steps on Claude Sonnet 5.5$900
+ 60% of steps routed to Claude Haiku 5.5$387
+ 70% of input cached$233
+ prompts trimmed to 2,200 tokens, 5 steps instead of 6$177

That's about 80% less on paper. Your result depends on whether the cheaper model handles those steps well, so test on real tasks before switching.

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-01); check providers before you commit. This guide was written with help from AI tools and checked by a human.