Abed ManzaljiAI, Step by Step

Why is my AI bill so high?

You pay for every token, in and out. Long prompts sent over and over add up fast.

3 min to watch2 min to read

Based on official price lists, not a single incident: Anthropic's pricing1 and caching docs,5 and OpenAI's caching docs.2 The shop, its rulebook, its traffic and the screens are made up; the bills use real list prices for Claude Sonnet 5.5 and Haiku 4.5.

Read the walkthrough as text

Without any fixes

  1. You run an online shoe shop. You add an AI to your help page to answer customer questions.
  2. You test it with a typical customer question.
  3. Behind the scenes, your app sends the AI a request. It holds much more than the question.
  4. Those numbers are tokens: chunks of text about ¾ of a word. The AI is billed for every token it reads and writes.
  5. The answer comes back. It's billed too: about 300 tokens.
  6. Customers love it: 10,000 chats a day. Every request sends the same rulebook again.
  7. Halfway through the month, the bill is already $3,600.
  8. Day 30: the bill is $7,200 for one month.
  9. Look where it goes: $6,000 of it pays for reading the same rulebook, 300,000 times.

Every token is billed. Every time. AI is billed per token, in and out, on every request, even when the words never change. These are real list prices for Claude Sonnet 5.5: $2 per million tokens in, $10 out.

With three quick fixes

  1. Same shop, same question, same 10,000 chats a day. This time, with three quick fixes.
  2. Fix one: a cache, a saved copy of the rulebook. Re-reading it costs 10% of the normal price.
  3. The rulebook's share drops from $6,000 to $600. The month now costs $1,800.
  4. Fix two: half the questions are easy. They go to a smaller model that costs half as much.
  5. That brings the month down to $1,350.
  6. Fix three: ask for short answers, and set a hard limit. Answers shrink from about 300 tokens to 200.
  7. The new monthly bill: $1,125, down from $7,200.
  8. And the customer still gets the right answer.

Don't pay twice for the same words. Cache what repeats, send easy questions to a smaller model, and keep answers short. On most Claude models a cache re-read costs 10% of the normal input price.

Keep going:

Why it matters, what it costs, and what to ask your team.

How the meter runs

You pay for every token, in and out.

AI is billed by the token, a chunk of text about ¾ of a word.1 You pay for everything you send in, and for everything that comes back.

Answers cost more. Pick a model and compare:

Real list prices in US dollars per million tokens, from Anthropic's pricing page, fetched Oct 4, 2026.1 All bars use the same scale.

See the green bars? Re-reading a cached prompt costs a fraction of the price. Work that can wait a day costs half, at both Anthropic1 and OpenAI.3

In my defense, I do read every word you send me.

Try it

Build your own bill.

A bill is a multiplication: requests × tokens × price. The surprise is how much of every prompt is the same words, sent again and again.

Set your traffic. Then switch on the quick wins:

Model

Quick wins:

a month

Where the money goes

Input Cached Output

Real list prices for Claude Opus 5.5, Sonnet 5.5 and Haiku 4.5.1 Made-up assumptions: a 30-day month, every repeat hits the cache (the small cost of writing it is left out), half of all requests are easy, and shorter answers are half as long. Discounts stack, as the price list says.

This isn't just theory. In Anthropic's own tests, caching cut a small triage agent's bill by 83%.4

Same answers, smaller bill. I'll take that.

Ask your team

Three questions for your next meeting.

You don't need to read the code. These show whether anyone is watching the meter.

  1. What does one request cost, in and out?If nobody knows, start logging tokens per request. You can't cut what you don't measure.
  2. Which part of every prompt is the same each time?Instructions, rulebooks and documents that repeat can be cached and re-read for a fraction of the price.
  3. Which requests could be smaller, slower or shorter?Easy ones to a small model, non-urgent ones to a batch, and answers only as long as needed.

Under the hood, step by step: build a support bot that knows what each chat costs, and cuts it.

Build along

Build a support bot that watches its own bill, one step at a time

We start with the simplest bot and run it on the same day of traffic: 10,000 chats, one rulebook. Press Run it after each step and watch the daily cost drop.

Before you ship

A short checklist.

The build-along covers the code. These keep the bill in check as you grow.

  1. Log tokens and dollars per featureThe expensive feature is rarely the one you'd guess.
  2. Stable first, changing lastInstructions and documents at the top, the question at the end. Then cache the top.
  3. Watch the cache hit rateIf cache_read_input_tokens stays at zero, something at the top of the prompt keeps changing. A timestamp is the usual suspect.
  4. Prove the small model is good enoughRun your own test questions on it, and route to it only where it passes.
  5. Batch what can waitNightly reports, tagging, tests: half price at Anthropic and OpenAI.3
  6. Cap answers and set a spend limitmax_tokens per answer, and a monthly limit as the backstop.

References

  1. Pricing · Anthropic docs, fetched Oct 4, 2026. Prices per million tokens; cache reads 0.1× input (0.05× on Opus 5.5); Batch API 50% off input and output; discounts stack; 1 token is about 0.75 words.
  2. Prompt caching · OpenAI docs, fetched Oct 4, 2026. On by default for supported models; cached input "discounted up to 95%"; reuses work when requests share the same prefix.
  3. Batch API · OpenAI docs, fetched Oct 4, 2026. "50% cost discount compared to synchronous APIs", results within 24 hours.
  4. Optimizing for cost and intelligence · Anthropic docs. Caching cut a small triage agent's bill by 83%; a one-line answer format used 39% fewer output tokens than a two-line one.
  5. Prompt caching · Anthropic docs. cache_control, reuse of prompt prefixes, a 5-minute default lifetime refreshed on every hit, minimum cacheable length per model.

The shop, its rulebook, its traffic and its bills are made up; the prices are real list prices for Claude Sonnet 5.5 and Haiku 4.5. The walkthrough assumes a 30-day month, that every repeat hits the cache (the small cost of writing it is left out), that half the chats are easy, and that shorter answers average 200 tokens instead of 300. The calculator's assumptions are listed under it.

Made by Abed Manzalji, AI Engineer in Toronto.More about meContact