LLM API Cost Comparison 2026
Token prices differ by an order of magnitude between providers, and the cheapest one changes every quarter. Input, output and cached input are billed separately, so picking a model by sticker price usually goes wrong.
📜 Table of Contents
LLM API Cost Comparison 2026: Per-Token Pricing for OpenAI, Claude, Gemini and DeepSeek
Token prices differ by an order of magnitude between providers, and the cheapest one changes every quarter. Input, output and cached input are billed separately, so picking by sticker price usually goes wrong. This is a method rather than a price table that expires.
Three Tiers
| Tier | Examples | Input magnitude per 1M tokens | Output magnitude | Typical use |
|---|---|---|---|---|
| Frontier | top GPT / Claude / Gemini | single-digit to low-teens USD | teens to tens USD | hard reasoning, long-form, refactors |
| Mid | mini / flash / fast variants | under a dollar | a few dollars | most product traffic |
| Budget | DeepSeek-class, hosted open models | cents | tens of cents to ~2 USD | classification, extraction, summarisation |
Magnitudes are for intuition only; verify current prices on official pages. What stays stable is the ratio between tiers - one to two orders of magnitude - and that output costs several times input.
Five Billing Items People Miss
- Cached input - stable prefixes are usually much cheaper when cached. Low hit rate usually means dynamic content leaked into the prefix.
- Output tokens - priced above input; verbose agents burn their budget here.
- Tool definitions - function schemas are resent on every call. Many verbose tools means paying for documentation nobody reads.
- History resend - every turn resends the conversation. A 20-turn session costs far more than intuition suggests.
- Batch channels - many providers trade latency for price. Use them for offline datasets.
A Five-Step Comparison
- Sample 100 real requests from logs, not toy prompts.
- Count tokens with the target model's tokenizer, separately for input and output.
- Plug the counts into official pricing (most have calculators).
- Re-run with your expected cache hit rate - 30% versus 80% can halve the bill.
- Price quality: cheaper only counts if it passes your eval set.
Choosing by Scenario
| Scenario | Tier | Why |
|---|---|---|
| High-volume classification | budget | differences often invisible on evals |
| Main product chat | mid | balanced, reversible |
| Complex reasoning, code, contracts | frontier | savings return as rework |
| Offline batch | budget + batch channel | latency insensitive |
Add a routing layer that sends simple requests to cheaper models, then roll it out behind an eval gate so quality does not drift.
FAQ
Is self-hosting always cheaper? Only at high GPU utilisation. Idle GPUs are expensive; pay-per-call wins at low volume.
Do cheap models quietly get worse? Yes, especially on long context and multi-step instructions. Test on your own data.
How do I catch overspend? Tag every call with task, model and cost, set per-session budgets, alert on spikes.
How often do prices change? Quarterly. Keep prices in configuration, not in code.
Note: tiers and methods only; exact prices, free quotas and cache discounts follow each provider's official pricing page.
Related
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.