OverpayingForAIPricing desk

Lesson 8 of 8 · 10 min read · Beginner

Cost control: the cheapest way to get the same result

Model routing, caching, batching, effort settings and the plan-audit habit — the lessons buyers learn after their first surprising invoice, in one place.

In this lesson you will

  • Rank the six things that drive a Claude bill
  • Apply routing, caching and batch to cut API cost by half or more without losing quality
  • Run the quarterly plan audit that catches idle subscriptions

Almost nobody overpays for Claude because the prices are hidden. They overpay because the meter is measuring something they did not think about: output length, re-sent history, the wrong tier, retries, idle seats, agent loops. Fix those six in order and most bills fall by half without any change to the answers you get.

What actually drives an AI billRoughly ordered by how often they surprise people.1Output length
Output tokens cost 3–5× input. Verbose answers and long reports dominate.
2Re-sent history
Every chat turn re-bills the whole conversation and any pasted files.
3Wrong tier
Flagship model on tasks a small model does identically.
4Retries
Vague prompts → three attempts → three bills.
5Idle subscriptions
Seats and plans nobody used this month.
6Agents & tools
Multi-step loops multiply calls silently.
Figure 1.The six cost drivers, roughly in the order they surprise people. Output length and re-sent history dominate most invoices.

1. Route by difficulty

Model routing: pay for the top model only when the task needs itSend easy work to the cheap tier, hard work to the expensive tier. Most teams find 70–90% of requests are easy.Incoming taskclassify difficultysimple / shortmoderatehard / longSmall modelcheapest tierMid modelworkhorse tierFlagship modelmost expensive tierTypical blended savingAll traffic on the flagship: 100% of cost80% small · 15% mid · 5% flagship~ 20% of costIllustrative only — run your own mix in theAI Cost Calculator with live catalogue prices.
Figure 2.Send easy requests to Haiku, normal ones to Sonnet, and only hard ones to Opus or Fable. Most workloads are mostly easy.

Classify each request by difficulty — even a simple rule like length or task type — and send it to the cheapest tier that handles it. The ladder in lesson 2 makes the arithmetic vivid: at the time of writing Haiku 4.5 input is a fifth of Opus 5 and a tenth of Fable 5.1. Measure the cheaper tier's answers against the expensive one on a sample before you trust it, then stop paying for the top tier on routine work.

Before you build a cascade, test the simpler thing: the newest Sonnet at a lower effort setting. On current models lower effort often matches an older model at full effort, and one model means one price list and one cache.

2. Cache the stable prefix

Anything that repeats — system prompt, reference documents, tool definitions — goes first in the request with a cache breakpoint. Later calls read it at about a tenth of the input price. Check cache_read_input_tokens in the usage object; if it is zero on repeated calls, something in the prefix is changing every time, usually a timestamp.

3. Batch what can wait

Nightly jobs, bulk classification, evaluations and report generation do not need an answer in seconds. The Batch API halves the price of every one of them. It stacks with caching.

4. Shorten the output

Output tokens are five times the price of input on every Claude tier. Ask for the format you need — a table, five bullets, a word limit, JSON with a schema — and set max_tokens to match. This is the only optimisation that also makes the answers better.

Same task, four ways — illustrative monthly costUS$ per month for 2,000 requests/day: 1,500 input + 500 output tokens each, catalogue rates at the time of writingOpus 5, no caching, no batch1,200Sonnet 5, no caching480Sonnet 5 + cached 1,000-token pre…372 ≈ 22% lessSonnet 5 + caching + batch186 ≈ 61% less than Sonnet, 85% less than OpusHaiku 4.5 + caching + batch93
Figure 3.The levers stack. The bottom bar is the same request volume as the top bar at less than a tenth of the cost; whether Haiku's answers are good enough is the only question left.

5. Cap the agents

The agent loop — why agents cost more than chatsEach step is a full model call that re-reads everything so far. Ten tool calls can bill 10× a single answer.Goalone instructionModel plansreads full historytool callTool runssearch, code, filesresultModel reads resultanother billed callrepeat until done — cap the number of steps and the token budget
Figure 4.Every loop iteration is a full model call that re-reads the whole history. Cap the steps and the token budget, or a stuck agent becomes a stuck invoice.

Claude Code and API agents multiply calls silently. Set a maximum number of steps, give the model a token budget it can see, and put a spend limit on the API key. On the app side, this is exactly the usage Max is priced for — so if you are running agents all day on Pro and hitting limits, Max is not an overpayment; it is the cheaper meter.

6. Audit the plans quarterly

Red flags that you are overpaying for Claude
SymptomLikely causeFix
Max plan, never hit a limitBought allowance you do not useDowngrade to Pro; re-upgrade if warnings return
API bill grows with conversation lengthRe-sent history, no cachingCache the prefix; trim history
Every request on Opus or FableNo routingDefault to Sonnet; route up on failure
Answers cut off mid-sentencemax_tokens too low → retriesRaise it to match the format
Cache reads always zeroVolatile prefix (timestamp, ID)Move changing content after the breakpoint
Weekend spend same as weekdayRunaway agent or cron jobStep caps, key spend limits

Knowledge check

Which single change most often halves a Claude API bill without changing the answers?

Lesson FAQ

Does prompt caching change the answers?

No. The cached prefix is exactly the text you sent; only the price of reading it changes.

How do I know if Haiku is good enough?

Run a sample of real requests through Haiku and Sonnet, compare the outputs (Claude can grade them for you), and look at the disagreement rate. If it is low and the disagreements do not matter, route to Haiku.

Should I cancel Pro if I mostly use the API?

If you are not hitting free-tier limits in the app, yes. The API and the app are billed separately; paying for both to do the same casual chat is the most common double-payment we see.

Finished reading?

Mark it done to track your progress through the course.

Compare, calculate, decide — for Claude

If our calculators helped you cut down on hidden AI wallet leaks, consider buying us a coffee. A tiny fraction of your savings keeps our pricing indexes updated daily.

Not sure which AI is cheapest for your use case? Find out in 30 seconds — no signup required.

AI cost intelligence

Stop overpaying for AI tools

Join the OverpayingForAI list for pricing updates, cheaper alternatives, and practical buying guidance.

Now tracking 50+ AI tools, models, platforms, subscriptions, coding tools, and automation products.

We use your email only for OverpayingForAI updates. Unsubscribe anytime.