Cheap LLM API under $0.06 per million
How to cut inference cost with small and flash-tier models, cached input pricing and a cost calculator before you commit.
A cheap LLM API has to do more than quote a low token price. It needs stable routing, automatic failover, long context and prepaid billing that cannot surprise you. Otherwise the savings disappear into retries and timeouts.
This page is the arithmetic side: which models are actually cheap, what a run costs, and where to spend the extra cent.
The cheapest models, with real rates
| Model | Input / 1M | Output / 1M | Context |
|---|---|---|---|
| Ling 3.0 Tiny | $0.0195 | $0.058 | 262K |
| GPT-OSS 20B | $0.0234 | $0.117 | 131K |
| Llama 3.1 8B Instruct | $0.026 | $0.052 | 131K |
| Gemma 4 26B A4B | $0.046 | $0.123 | 262K |
| DeepSeek V4.1 Flash | $0.0503 | $0.520 | 1.05M |
| Claude Haiku 5.5 | $0.130 | $0.650 | 1M |
Below $0.03 input you are in small-model territory: fine for classification, extraction, tagging, short summaries and routing. Above $0.05 the models start to hold long instructions and structured output reliably.
What a volume actually costs
At $0.02/M input, one million input tokens costs two cents. That sounds free until you multiply.
Ticket classifier, 600 input / 30 output, 200,000 tickets a month
- Input: 120M tokens → $2.40
- Output: 6M tokens → $0.35
- Monthly: $2.75
Product description generator, 1K input / 300 output, 30,000 a month
- Input: 30M tokens → $0.60
- Output: 9M tokens → $1.05
- Monthly: $1.65
Chat with 15K history, 4,000 turns
- Input: 60M tokens → $1.20
- Output: 0.8M tokens → $0.19
- Total: $1.39
The third example is the one that bites. History resend, not generation, drives high-turn chat cost. Trim or summarize.
Cheaper than cheaper models
Model choice is the second lever. These cut cost without switching models:
- Cache the stable prefix. System prompts and style guides bill at the cached input rate on supported models. Keep them byte-identical and put the variable part last.
- Bound output.
max_tokensof 200 instead of 1,000 removes 80% of the worst-case output bill. - Batch instead of converse. One request with 20 items beats 20 requests with repeated instructions.
- Skip the model when you can. Regex, a lookup table or a tiny classifier handles a surprising share of traffic for free.
- Summarize history. Replace old turns with a rolling summary once a chat passes a few thousand tokens.
Tier the stack
The durable pattern is three tiers:
- Tier 0, no model: rules and lookups.
- Tier 1, cheap model: classification, extraction, short replies — the models at the top of the table.
- Tier 2, frontier model: long-form reasoning, ambiguous briefs, anything the cheap tier fails validation on.
Route on a confidence check, not on vibes. If the cheap model's JSON does not parse or a required field is missing, retry once on the fallback. Cap the retry at one hop so a broken prompt does not burn both tiers forever.
For the frontier tier see Claude Sonnet 5.5 or DeepSeek V4.1 Flash Private. For uncensored workloads on a budget, the uncensored page starts at $0.156/M.
Reliability is part of the price
A model that returns malformed JSON every twentieth call costs more than its rate suggests. Before rolling out a cheap model:
- Run 200 of your real prompts and count failures.
- Check the failure mode: refusal, truncation, format drift or timeout.
- Compare total cost including retries against the next tier up. A model that is half the price and fails 10% of the time is often a loss.
Watch 429s. Cheap models attract volume and rate limits; the error codes guide covers backoff.
Billing controls
- Prepaid balance. Top up in small amounts; no invoice at month end.
- Per-key caps. One key per app, with a hard spend limit and expiry.
- Usage logs. Every request, model and token count is listed in the console for reconciliation.
- Cached input pricing. Repeated prefixes bill below the normal input rate.
The billing rules page spells out the formula. The pricing calculator projects a monthly figure from sliders.
When cheap is wrong
- Legal or medical text where a small model's miss is expensive.
- Long documents that need cross-section reasoning.
- Agent loops where a malformed tool call derails the whole run.
- Brand-voice copy that has to sound like a specific person.
In those cases use a cheap model for triage and a strong one for the final pass. Mixing is the point of a single endpoint; the comparison page makes the price gap visible before you commit.
FAQ
Is a cheap LLM API good enough for production?
Yes, with a validation step and a fallback. The failure rate matters more than the token price.
Can I mix cheap and premium models?
Yes. Route by task and retry on validation failure. Cap it at one retry hop.
Why is output so much more expensive than input?
Generation is the costly direction. Keep max_tokens tight and avoid asking for padding.
Do cached inputs really reduce the bill?
On supported models, yes — repeated prefixes bill at the cached rate. The prefix must stay identical.
Which model is the cheapest here?
Ling 3.0 Tiny at $0.0195/M input. It suits short classification and extraction, not long reasoning.
Is there a minimum top-up?
Check the console for the current minimum; credits are prepaid and deducted per token.
Start
Open Ling 3.0 Tiny for the rate card, DeepSeek V4.1 Flash for the reliable mid-tier, and the quickstart to run your first batch with a capped key.
Set alerts before the traffic
A cheap rate makes an unbounded retry loop look harmless. It is not. Before a batch:
- Set a daily spend cap on the key.
- Alert at 60% of the cap.
- Log token counts per request and watch the distribution; one 200K-token outlier is usually a prompt bug.
- Add a hard
max_tokensand a request timeout. - Kill the job if the failure rate exceeds 15%; retrying a broken prompt at volume just buys the same errors twice.
The break-even check
When comparing two models, the formula is:
cost per success = (input tokens × in price + output tokens × out price) / success rateA model at $0.02 with a 90% success rate costs $0.0222 per success. A model at $0.03 with 99% costs $0.0303. The cheaper model still wins, but by 27% instead of 33%, and the gap closes further once retry time is counted. Run the formula on your own measured success rate rather than assuming one.