Almost every guide to controlling an AI bill opens the same way: trim your prompt. Cut the few-shot examples. Tighten the system message. It is reasonable advice, but it is the fourth most useful thing you can do. The problem is that it is the only one most people ever try.
Here is the arithmetic that reorders it. Take a workload of ten thousand calls a month, each with a 1,500-token system prompt, a 500-token user message and a 400-token reply. On Claude Opus 5 that costs $200.00 a month. Start with three of the levers, one at a time:
| What you change | New monthly cost | Saved |
|---|---|---|
| Nothing — the baseline | $200.00 | — |
| Halve every reply (400 → 200 tokens) | $150.00 | 25% |
| Delete the entire 1,500-token system prompt | $125.00 | 38% |
| Change nothing, and call Claude Sonnet 5 instead | $80.00 | 60% |
Deleting every word of your system prompt — not trimming it, deleting it — saves 38%. Switching model, while sending byte-for-byte the same request, saves 60%. And the spread across the whole price list is far wider than that: the same workload runs from $3.60 a month to $400.00 a month depending only on which model you name in the API call. That is a factor of 111.
So this guide is about spending fewer tokens, and its first finding is that the token count is the smallest of the numbers you control. The cost of a prompt is mostly decided before anyone tries to shorten it.
What kind of claim each number here is
This guide keeps saying which is which, because the three are not equally strong.
A price comes from our house rate card at database/data/llm-rate-cards.php, where every row carries the provider page it was read from and the date it was read. Every price below was verified on 25 July 2026. A measurement is arithmetic we did over that rate card, shown so you can redo it. An open question is something we could not establish and are not going to round off.
The main caveat is that we did not re-read the vendors' pricing pages for this guide. The figures are 25 July prices, eight days old at publication, verified then against the pages listed in the rate card. That is a real constraint and it matters more in this subject than most — model prices moved repeatedly through 2026, and one of the numbers below has an expiry date attached to it. Where a price is time-limited, we say so.
Three things this guide will not re-explain, because we have already done them properly: what a token actually is and where per-token prices come from is tokens and context windows; what the sticker price leaves out is what an LLM actually costs you; and why the same sentence costs more in Malay, Thai or Chinese is AI in your own language, which measured it. If you are here because someone suggested fine-tuning a small model to save money, read do you need fine-tuning first — the answer is usually no, and for reasons of cost.
Model choice is not a lever. It is the whole board.
We ran that reference workload against all 27 chat models in the rate card. The full ranking is in our LLM price comparison, which does this live for any token counts you type. The ends of it:
| Model | Provider | Reference workload, per month |
|---|---|---|
| Gemini 2.5 Flash-Lite | $3.60 | |
| DeepSeek V4-Flash | DeepSeek | $3.92 |
| Claude Sonnet 5 | Anthropic | $80.00 |
| Claude Opus 5 | Anthropic | $200.00 |
| Claude Fable 5 | Anthropic | $400.00 |
Nobody should read that as "always use the cheapest". The models at the bottom of that table cost a hundred times less because they are doing something less demanding, and a cheap model that gets the answer wrong is infinitely expensive. The point is simpler: no amount of prompt engineering closes a 111× gap. If you are optimising tokens on a model you chose by habit, you are polishing the smallest term in the equation.
The practical version is routing. Send the work that needs a frontier model to a frontier model, and send classification, extraction, routing and formatting — which is usually most of the volume — to a cheap one. Added 3 August 2026: that was an assertion when this guide was published, not a measurement. We have since tested it: two cheap models did extraction, aggregation and format compliance correctly on every run. The advice holds, with one thing it was missing — the price of that work on a cheap model varies by up to two orders of magnitude depending on the task and which cheap model you pick. See what AI is actually good and bad at. That is one decision, made once, and it is worth more than every prompt you will ever shorten.
One price on that list expires next month
Claude Sonnet 5's $2 / $10 per million tokens is introductory pricing that ends on 31 August 2026. From 1 September the rate is $3 / $15. On the reference workload that moves Sonnet 5 from $80.00 a month to $120.00 a month, a 50% rise, for a request that has not changed.
We are flagging it this prominently because our own calculators did not. The expiry was recorded in our rate card the whole time and was dropped on the way to the tools. More on that below.
Output is where the money is
Input and output are priced separately, and not close to equally. Across the 27 models, we measured the ratio of output price to input price:
- Median: 5.0× — the typical model charges five times as much per output token as per input token.
- 19 of 27 models charge 5× or more. Only three charge 2× or less.
- The range runs from 2.0× (Grok 4.3) to 8.33× (Gemini 2.5 Flash).
This has a consequence most cost advice gets backwards. Removing a token from the prompt saves one unit; stopping the model generating one saves five. If you are going to spend an afternoon on this, spend it on output.
In practice, this means setting max_tokens — an unbounded generation is an unbounded bill — and asking for the exact output shape you want. "Answer in one sentence" and "return only the JSON, no preamble" are cost controls, not style preferences. A model that opens with "Certainly! Here's a breakdown of your request:" is charging you five times the input rate to say nothing.
There is a second-order effect worth knowing if you are on a long-context model. Four models in our rate card are context-tiered: past a threshold, usually 200,000 input tokens, both rates jump. Gemini 3.1 Pro goes from $2 / $12 to $4 / $18. Both Grok models double outright. So on those models a large prompt does not cost proportionally more, it costs more than proportionally more, and the step is invisible until you cross it. Our LLM cost calculator now switches tiers as you type.
The system prompt is the token you buy ten thousand times
In the reference workload the system prompt is 1,500 of the 2,000 input tokens — 75% of everything you send — and you send it on every single call. That is what makes it different from the user's message. A wasteful user message costs you once. A wasteful system prompt is a standing order.
This is the one place where classic prompt-trimming earns its reputation, because the saving multiplies by your call volume rather than being a one-off. Few-shot examples are the usual culprit: five examples that made a demo work in March are five examples you have now paid for a hundred thousand times.
But before deleting them, check if you can pay less. Most providers now sell cached input — you mark the stable prefix of your prompt, and repeat sends of it bill at a steep discount. In our rate card, 17 of 27 models carry a cached-input rate, and the median discount is 10×: cached input costs 90% less than fresh input.
On the reference workload, caching the system prompt takes Claude Opus 5 from $200.00 to $132.50 a month — a 34% saving, which is most of what you would get by deleting the system prompt entirely, while keeping it. That is the best-value change in this guide, and it is a configuration flag rather than a rewrite.
Ten of the 27 models have no cached-input tier at all in our data, including both Grok models, the Gemini 2.5 family, GPT-4o and Mistral Large 3. If caching is central to your budget, it belongs in the model decision.
The new order of operations
- Pick the model per task, not per project. Route the cheap work to a cheap model. This is worth up to 111× and nothing else comes close.
- Cache the stable prefix. Median 10× off the part of your prompt that never changes; 34% off the reference bill for a flag.
- Cap and shape the output. Output tokens cost a median 5× input tokens, so this is where trimming pays five times over.
- Then trim the system prompt — knowing it buys you less than the three above, and that deleting all of it saves 38%.
- Check whether the price you budgeted still holds. One of the 27 changes on 1 September.
To put your own numbers through this, the cost calculator does one request, the monthly spend projector does a year, and the token counter tells you how long your prompt actually is rather than how long it looks.
What auditing our own tools found
We audited the five tools behind those links before publishing this, on the principle that a guide about trustworthy price data should not link to price data nobody checked. The audit is honest in both directions, and the good news came first.
What was right. The prices themselves were correct — every model in the cost calculator matched the house rate card exactly, with zero mismatches. We had half expected to find stale prices and said so in our notes beforehand; we did not find them, and we are not going to manufacture a defect to make a better story. The tokenisers were correct too: the rate card marks an exact encoding for OpenAI models only, and both the token counter and the context-window visualizer honour that, labelling Claude, Gemini and Mistral counts as estimates rather than passing them off as exact. The embedding calculator's "16 June 2026" date, which looked stale beside everything else, turned out to be right — embedding prices are maintained separately from chat prices, and that is genuinely their date.
What was wrong, and it was not the prices. We found four other problems, each of which understated cost:
The cost calculator kept its own hand-copied model list rather than reading the shared rate card, and the copy had fallen behind: it offered 16 of 27 models. The eleven missing were the entire current generation — Claude Opus 5 and Sonnet 5, the GPT-5.6 family, Gemini 3.x, both Grok models, with xAI absent as a provider altogether. It never quoted a wrong number. It omitted the cheap current ones, which pushes an estimate the expensive way: Sonnet 5 at $2 / $10 was invisible while Sonnet 4.6 at $3 / $15 was on the menu.
Three of the four context-tiered models declared their tier only as a sentence of prose, with no machine-readable threshold behind it. So the calculators quoted the low rate at any prompt length. A 500,000-token Gemini 3.1 Pro prompt was costed at $2 / $12 when the real rate above the threshold is $4 / $18, and both Grok models understated by half. Long context is exactly when someone opens a cost calculator.
The expiry on Claude Sonnet 5's introductory price was in our rate card, whose own documentation says such caveats are "rendered as a footnote, never silently folded into the numbers". It was rendered nowhere. Anyone projecting a year of Sonnet 5 spend from our projector was around 50% low for eleven of the twelve months.
And the shared rate card — the single source of truth all ten of these tools read — was served with a one-year immutable cache header at a URL with no version string. A returning reader's browser was instructed never to re-check it. Updating the prices in one place reached first-time visitors and nobody else, which is the opposite of what a single source of truth is for.
All four are fixed, and the fixes carry tests that fail if the defect returns — each test was checked by reintroducing the defect and confirming it goes red, because a guard that cannot fail guards nothing.
To be clear, none of those four defects changed the numbers in this guide. The reference workload sends 2,000 input tokens, nowhere near the 200,000-token tier boundary, and Sonnet 5's introductory price is still in force today. The tables above would have read the same before the fixes. What the defects would have done is mislead a reader who typed a long prompt into the calculator, or who budgeted past August.
We found one issue we did not fix, as it is a larger decision than this audit: the disclaimer_text stored in the database for each tool is never displayed. The banner a reader actually sees comes from text hardcoded in each tool's template, so the two can disagree silently, and on two of these tools an FAQ pointed readers at "the date in the disclaimer" — a disclaimer that does not appear on the page. Those two FAQs now point at something that exists. The underlying dead column is filed as its own piece of work.
Spend tokens fourth
Spend fewer tokens by all means. But do it fourth. Choose the model per task, cache what repeats, cap what the model generates, and only then start cutting words — and check the date on whatever price list you are budgeting from, including ours, which now prints it under the model dropdown where you can see it.