Cheapest LLM API in 2026 — workload-by-workload
The wrong question, and the right one
"What's the cheapest LLM right now?" is the wrong question. The right question is "what's the cheapest model that meets my quality bar for this specific workload?" because the cost gap between flagship and budget tiers (Opus 4.7 at $5/$25 vs Haiku 4.5 at $1/$5) is roughly 5x — but the quality gap on routine tasks like classification, extraction, or short summarization is often 2-5%. That's a 100x ROI on the downgrade.
This guide gives you a concrete recommendation per workload, with the all-in math (sticker + batch + cache, as applicable). Every number assumes the workload-appropriate optimisations are turned on, because those are 50-90% of real-world cost.
Workload 1: Customer-facing chat
Constraints: sub-1s first-token latency, streaming, conversational quality matters because users see every word.
Cheapest qualifying model: Claude Haiku 4.5 ($1 / $5 per 1M with caching at $0.10/1M reads). For workloads with a large stable system prompt (product docs, brand persona, safety guidelines) the cache reads make this remarkably cheap. Same conversational quality as Sonnet for short turns; visibly worse only on multi-step reasoning that doesn't usually appear in chat.
If quality bar is "no compromise": Claude Sonnet 4.6 ($3 / $15). Still 5x cheaper than Opus and indistinguishable for chat-shaped tasks.
Avoid: GPT-5.5 ($5 / $30) and Claude Opus 4.7 ($5 / $25) for chat. The extra capability rarely shows up in chat-length completions and the cost premium is real.
Workload 2: RAG over a knowledge base
Constraints: large system prompt (retrieved context + instructions), often 5K-50K input tokens per request, shorter completions.
Cheapest qualifying model: Claude Sonnet 4.6 with prompt caching. The cache read rate at $0.30/1M makes the per-request input cost ~10x cheaper than non-cached calls. For a 30K-token system prompt reused 1000 times/day, this saves about $25/day vs Sonnet without caching and $80/day vs Opus 4.7 without caching.
Runner-up: GPT-5.4 with implicit cache hits ($1.25/1M on cached input). Less savings than Anthropic's 90% off but zero engineering work to enable. Use if you have under 1K daily requests and the per-engineering-hour cost of wiring cache_control isn't justified.
Avoid: Gemini 2.5 Pro for high-volume RAG unless you can guarantee <200K context per request — the >200K tier doubles input price and most RAG pipelines don't realize they crossed the threshold.
Workload 3: Code generation (production tooling, not interactive editor)
Constraints: long completions (1K-10K output tokens), accuracy critical, multi-turn agent flow is common.
Cheapest qualifying model: Claude Sonnet 4.6. SWE-bench Verified shows Sonnet beats every other model in its price tier on real GitHub issues. The output tokens are the bulk of the bill ($15/1M output), so the model that produces correct code on the first try (no expensive retries) wins on TCO even at a higher per-token rate.
If using Cursor / Cline / similar coding agents: match what the agent's defaults expect (usually Sonnet); switching to a cheaper model inside an agent loop often breaks the agent's calibration on tool-call formats.
Specialist option: GPT-5.3 Codex ($2 / $8). Tuned for code specifically; cheaper output than Sonnet. Worth A/B testing on your specific code pattern.
Workload 4: High-volume classification / extraction
Constraints: short input + short output, throughput matters, quality bar is ">95% on hand-labeled validation set".
Cheapest qualifying model: GPT-5.4 nano ($0.20 / $1.25) or Gemini 2.5 Flash-Lite ($0.10 / $0.40). At this tier the question is which one matches your domain — there's no general winner; benchmark on 500 hand-labeled examples and pick.
Batch eligible: Almost always. Add the 50% batch discount and you get genuinely sub-cent per request even at modest token counts. A 10M classification/month workload on GPT-5.4 nano with batch lands at about $30/month — small enough that engineering time saved by going up a tier is rarely worth it.
Open-weight option: Llama 4 Scout via Groq ($0.11 / $0.34). Same price tier as the cheapest hosted options, with the upside of swapping providers later if Groq's specific deal changes.
Workload 5: Long-document analysis (legal, scientific, code repo)
Constraints: single requests with 100K-1M+ input tokens, deep reasoning, multi-document synthesis.
Cheapest qualifying model: Gemini 2.5 Pro in its standard tier (≤200K context, $1.25 / $10) is the cheapest option that handles real long documents well. The native multimodality also lets you pass PDFs + images directly without OCR plumbing.
If documents exceed 200K: Gemini 2.5 Pro long-context tier ($2.50 / $20) is still cheapest by far for million-token requests. Claude Opus 4.7 is capped at 200K context, so it's not even an option at this scale.
Quality fallback: If Gemini's responses on your specific document type aren't satisfactory, Claude Opus 4.7 via chunking + map-reduce is the next-best option but costs roughly 4-8x and requires explicit document chunking logic.
Workload 6: Batch analytics / overnight pipelines
Constraints: 24h latency acceptable, throughput matters, accuracy bar is "good enough for downstream consumption".
Cheapest qualifying model: GPT-5.4 mini in batch mode ($0.375 / $2.25 effective with the 50% batch discount). At 10M requests/month with typical token sizes this lands around $200/month total.
If quality bar is higher: Claude Sonnet 4.6 in batch ($1.50 / $7.50 effective). 4x more expensive than GPT-5.4 mini but Sonnet's higher accuracy means less downstream human review on the results — usually a clear win.
Honest gotcha: Batch jobs can take up to 24h. If your pipeline has a strict morning deadline, submit by 6 PM the previous day to give the queue time to clear.
Workload 7: Embedding generation
Constraints: very high throughput, batch eligible, latency irrelevant, no LLM reasoning involved.
Cheapest qualifying model: OpenAI text-embedding-3-small via batch (~$0.01 / 1M tokens effective with the 50% batch discount). At reasonable quality for most retrieval workloads.
For higher quality on multilingual or specialist domains: text-embedding-3-large via batch (still under $0.07/1M with batch). Embeddings are tracked separately from the chat-completions pricing on every provider; check the "Embeddings" tab of each pricing page rather than the chat-models tab.
The summary table
| Workload | Pick | Why |
|---|---|---|
| Customer chat | Claude Haiku 4.5 | Cheapest at chat quality + cache hits |
| RAG over KB | Claude Sonnet 4.6 + cache | 90% off cache reads dominate |
| Code generation | Claude Sonnet 4.6 | SWE-bench lead = fewer retries |
| Classification volume | GPT-5.4 nano + batch | $0.10/1M effective |
| Long documents | Gemini 2.5 Pro | Only option under $5/1M with native 1M context |
| Batch analytics | GPT-5.4 mini + batch | $0.375/1M effective |
| Embeddings | text-embedding-3-small batch | $0.01/1M effective |
Use the Migration ROI Simulator to model your specific workload against the full catalog; the recommendations above are good defaults but the simulator gives exact numbers for your token mix.
Frequently asked questions
Is the cheapest model always the right choice?
No. Cheapest by sticker price often makes the wrong tradeoffs for production: more retries, worse output quality leading to more downstream human review, longer outputs that erase the per-token savings. The right framing is cheapest model that meets your quality bar — quality first, then price among the qualifying models.
Does batch API really apply to my workload?
Most non-interactive workloads — overnight analytics, classification queues, data labeling, embedding generation — tolerate up to 24h latency and qualify for the 50% batch discount. Customer-facing chat, search autocomplete, and streaming completions do not.
How much does cache hit rate affect the answer?
Massively, for any workload with a large stable system prompt. A 50K-token system prompt reused 1000+ times per day flips most pricing comparisons toward Claude or GPT-5.4 (both 90% cache reads) regardless of per-token sticker price.
What about latency — is the cheap model fast enough?
Cheap models are often faster because they have fewer parameters and require less compute per token. Claude Haiku 4.5 and GPT-5.4 nano both routinely return first tokens in under 300ms. The exception is Gemini 2.5 Flash-Lite which can have higher first-token latency despite being cheap. Benchmark your specific workload.