Choose the cheapest model that passes your own quality tests, then route only the hard requests to a more expensive one. Price differences between model tiers are large (in the example below the cheapest and most expensive models are 100 times apart), while quality differences on routine tasks can be small, so the savings come from matching the model to the task rather than picking one winner.
The three things you are billed for
Almost every hosted model API charges per token, with separate rates for different kinds of tokens. Understanding the three drivers tells you where to look when a bill surprises you.
- Input tokens: everything you send, including the system prompt, instructions, examples, retrieved documents and the conversation history.
- Output tokens: everything the model writes back.
- Reasoning (thinking) tokens: on models that think before answering, the hidden reasoning is generally billed at the output rate even if you never see it.
Output is priced several times higher than input because generating a token is more expensive than reading one. Input tokens can be processed in parallel in a single pass, while output tokens are produced one at a time, each depending on the last. In the list prices used below, output costs five times as much as input for every model. A verbose answer or a long reasoning chain therefore moves your bill far more than a long prompt does.
You can measure token counts before committing to a design with the token estimator. For background on counting, see the post on estimating ChatGPT token usage.
Think in tiers, not brands
Vendors sell models in roughly three tiers, and the tier matters more than the logo.
| Tier | Typical jobs | Cost profile |
|---|---|---|
| Small | Classification, extraction, tagging, short rewrites, routing | Cheapest, fastest |
| Mid | Drafting, summarising, most chat and coding assistance | Moderate |
| Frontier | Hard reasoning, long multi-step work, ambiguous problems | Most expensive, often slower |
The practical pattern is routing. Send every request to the small model first, or use simple rules (input length, task type, a confidence score) to decide. Escalate to the mid or frontier tier only when the cheap answer fails a check, such as invalid JSON, a low confidence score or a user asking for a retry. If most of your traffic is routine, the expensive model handles a small share of requests and your average cost falls sharply.
Context window versus what you actually send
A large context window is a ceiling, not a recommendation. You pay for every token you place in it, on every call. Sending a 40-page document with each question means paying for those pages again each time, and long inputs can also dilute the model's attention on the part that matters. Retrieve only the relevant passages, trim boilerplate and keep conversation history short. Converting source text to compact formats helps too, as covered in reducing AI token costs with Markdown compression.
Batch and caching discounts
Many vendors offer two levers that cut cost without changing quality. Batch processing runs requests asynchronously, often within hours, at a reduced rate, which suits reports, backfills and nightly jobs. Prompt caching lowers the price of repeated prefix content, such as a long system prompt or reference document that appears at the start of every request. The exact discounts, minimum sizes, cache lifetimes and any extra write charges differ by vendor and change over time, so read the current pricing page before you build a budget around them.
Build a 20-prompt test set
Public benchmarks measure general ability. Your project has specific inputs, formats and tolerances, so test on those.
- Collect 20 real or realistic prompts, covering typical cases, a few awkward edge cases and at least two that you know are hard.
- Write a pass or fail rule for each. For extraction, compare to the correct values. For writing, use a short rubric such as accurate, right length, right tone.
- Run all 20 through one model per tier, keeping the prompt identical.
- Record the pass count, the average input and output tokens, and the cost per request.
- Divide cost by passes to get cost per successful answer, and compare tiers on that figure.
Twenty prompts will not give statistical certainty, but they are enough to reveal a cheap model that fails badly or an expensive one that adds nothing. Re-run the set whenever you change the prompt or a vendor releases a new version.
Worked example: 50,000 requests a month
Assume each request sends 1,500 input tokens and receives 400 output tokens. Over 50,000 requests that is 75 million input tokens and 20 million output tokens a month. The cost is (75 x input price) plus (20 x output price), with prices in USD per million tokens. The list prices below are standard API rates as of December 2026.
| Model | Input / output per 1M | Monthly cost | Per request |
|---|---|---|---|
| Claude Haiku 5.5 | $0.10 / $0.50 | $17.50 | $0.00035 |
| GPT-6 Luna | $0.10 / $0.50 | $17.50 | $0.00035 |
| GPT-6.1 Terra | $1 / $5 | $175 | $0.0035 |
| Claude Sonnet 5.5 | $2 / $10 | $350 | $0.007 |
| GPT-6.1 Sol | $2 / $10 | $350 | $0.007 |
| Claude Opus 5.5 | $4 / $20 | $700 | $0.014 |
| Claude Fable 5.2 | $8 / $40 | $1,400 | $0.028 |
| GPT-6 Astra | $10 / $50 | $1,750 | $0.035 |
For Claude Sonnet 5.5 the working is 75 x $2 = $150 for input plus 20 x $10 = $200 for output, which totals $350. The spread from cheapest to dearest is 100x. Now apply routing: if 90 percent of requests pass on the $17.50-a-month tier and 10 percent need a $350 model, the blended cost is 0.9 x $17.50 + 0.1 x $350 = $50.75, assuming similar token counts. That figure ignores the cost of failed first attempts that must be retried, which add a little.
Prices change, and vendors adjust tiers and discounts often. Treat these numbers as an illustration of the method and confirm current rates on each vendor's pricing page. The model comparison tool lets you plug in your own token counts.
Common mistakes
- Choosing by benchmark headlines alone. A leaderboard score says little about your data, format or latency needs.
- Ignoring output length. With output priced at several times input, an instruction like "answer in two sentences" or a maximum token limit can save more than switching models.
- Sending whole documents every call. Retrieve or summarise first, and cache any content that repeats.
- No fallback plan. Models get deprecated, rate-limited or briefly unavailable. Keep a second model tested and a way to switch.
Frequently Asked Questions
Is the most expensive model always the best choice?
No. For routine tasks such as classification or extraction, smaller models often perform adequately at a fraction of the price. Test on your own prompts before paying for the top tier.
Why does my bill exceed my token estimate?
The usual causes are reasoning tokens billed as output, conversation history resent on every turn, and retries. Check the usage fields returned by the API rather than relying only on estimates.
Should I use one model or several?
Several is usually cheaper at scale. A small model handles easy cases and a stronger one handles the rest, as long as you have a reliable check to decide when to escalate.
How often should I revisit my choice?
Whenever prices or model versions change, or your prompts change. Keeping the 20-prompt test set makes this a short job rather than a project.
Comments
Leave a Comment
No comments yet. Be the first to comment!