Choosing an LLM by cost
Work out your input-to-output ratio before you compare anything. Output costs four to six times input on most models, so a table ranked on input price alone points the wrong way for any generation-heavy workload. The same two models can swap places depending only on the shape of your traffic.
And treat the calculated saving as the budget for evaluating a swap, not as the decision. This is the one cost lever that can make your product worse.
The same two models, two workloads, opposite answers
Take Claude Opus 5 at $5.00 in / $25.00 out, and Claude Haiku 4.5 at $1.00 in / $5.00 out. On a blended rate Claude Haiku 4.5 is 5.0x cheaper. Fine. Now price two workloads with opposite shapes, per million requests:
| Workload | Claude Opus 5 | Claude Haiku 4.5 | Ratio |
|---|---|---|---|
|
Retrieval-heavy
20,000 input, 300 output per request | $107,500 | $21,500 | 5.0x |
|
Generation-heavy
500 input, 2,000 output per request | $52,500 | $10,500 | 5.0x |
The multiple between the two models is not constant, because the mix of rates being applied changes. That is the mechanism behind most bad model-selection decisions: a comparison done on one workload shape, applied to another.
Models whose ranking is most shape-sensitive
The wider a model's gap between input and output rates, the more its position in any ranking depends on your workload. These have the steepest output premiums tracked here:
| Model | Provider | Input | Output | Output premium |
|---|---|---|---|---|
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | 8.3x | |
| GPT-5.4 nano | OpenAI | $0.20 | $1.25 | 6.3x |
| GPT-5.6 Sol | OpenAI | $5.00 | $30.00 | 6.0x |
| GPT-5.6 Terra | OpenAI | $2.00 | $12.00 | 6.0x |
| GPT-5.5 | OpenAI | $5.00 | $30.00 | 6.0x |
At the opposite extreme, Sonar Huge Online, Sonar, Sonar Small Online charge the same rate for input and output. For generation-heavy work that is a structural advantage, though on Perplexity's Sonar tiers it comes with a per-request search fee that changes the arithmetic entirely.
Three ways a cheaper model costs more
All three are invisible on a rate card and all three are common enough to plan for.
It answers at greater length
The most frequent and least noticed. If a cheaper model produces 40% more tokens to say the same thing, a good part of the headline saving is gone before quality enters the discussion — and it is gone at the output rate, the expensive one. Measure output length on real traffic during evaluation, not just correctness.
It needs a second attempt
A retry doubles the cost of that request, and a workload that retries 20% of the time on the cheap model but 2% on the expensive one has closed most of the gap. Failed calls still bill for what they generated.
Someone downstream fixes the output
The cost that never appears in any API dashboard. If a human reviews or corrects output, the model that needs more correction is more expensive at any token price, usually by a wide margin.
A workable sequence
- Measure your ratio. Pull real input and output token counts from a week of traffic. Use the p50 and the p90, not your intended numbers.
- Shortlist on that ratio, not on input price. The every model compared on price gives the rates; the model switching savings calculator prices two candidates against your own mix.
- Check the cheap levers first. If caching repeated context or asynchronous batch discounts gets you most of the saving with no quality risk, stop there.
- Evaluate on real traffic, tracking correctness and output length.
- Route rather than replace. Most products do not need one model. Sending simple requests to a cheap tier and hard ones to a flagship captures most of the saving on most of the volume while keeping quality where it matters.
Where the cheap tiers are
If step five is where you land, this is the floor of each provider's lineup — the models built for routing, classification and short completions.
| Provider | Entry model | Input | Output |
|---|---|---|---|
| Alibaba | Qwen3.7 Flash | $0.03 | $0.13 |
| Groq | Llama 3.1 8B Instant (via Groq) | $0.05 | $0.08 |
| Amazon | Nova Micro | $0.035 | $0.14 |
| Cohere | Command R7B | $0.0375 | $0.15 |
| Meta | Llama 4 Scout | $0.08 | $0.30 |
| StepFun | Step 3.5 Flash | $0.10 | $0.30 |
| OpenAI | GPT-4.1 nano | $0.10 | $0.40 |
| Gemini 2.5 Flash-Lite | $0.10 | $0.40 | |
| DeepSeek | DeepSeek V4 Flash | $0.14 | $0.28 |
| Perplexity | Sonar Small Online | $0.20 | $0.20 |
Model selection questions
How do I choose an LLM model based on cost?
Work out your input-to-output token ratio first, then compare candidates on that ratio rather than on the headline input price. A model with cheap input and expensive output is excellent value for retrieval and poor value for drafting, and a table ranked on input alone will point you the wrong way for half of all workloads.
Is the cheapest model always the right choice?
No. A cheaper model that needs two attempts, produces output someone has to correct, or answers at twice the length can cost more in total than the model that got it right first time. Only the first of those shows up on the API bill.
What is a blended rate?
A single figure that weights input and output by how much of each a typical workload uses — this site uses three input tokens per output token. It is a better default ranking than input price alone, but it is still an assumption: if your own ratio is far from 3:1, price your actual mix instead.
How do I evaluate a cheaper model safely?
Take a sample of real production traffic, run it through both models, and compare on the dimension that matters for your task. Watch specifically for hallucinated fields in extraction, missed edge cases in classification, and outputs that run longer — the last one eats the saving before quality even enters the discussion.
Does switching models change my token counts?
Slightly. Different model families tokenise differently, so identical text can come out 10-35% longer or shorter depending on the pair. For a rough comparison that is within noise; for a tight budget, measure token counts on both rather than assuming they match.