Cheapest LLM API in 2026: Verified Rates and Real Cost per Workload
- Sticker price is quoted per million tokens, but your bill is decided by four things: cache hits, peak windows, output length, and failed calls you pay for.
- Off-peak DeepSeek Flash and GPT-4o-mini both list at $0.15 input / $0.60 output per million tokens (verified 2026-10-02).
- The same 1M-input / 3M-output coding job costs about $1.95 on off-peak Flash and about $156 on a frontier tier — roughly 80x for the same token count.
- Output tokens dominate most bills. Halving output length usually beats switching models.
"Cheapest AI API" gets answered badly almost everywhere, because most comparison pages rank providers by a single headline number and ignore the way that number turns into an invoice. This page does the opposite: it lists published rates, then walks through what real workloads cost, then shows the levers that move the total. Prices below are list prices per million tokens and were verified on 2026-10-02; treat them as a snapshot, not a contract.
Cheapest LLM API: published rates, side by side
| Provider | Model | Input / 1M | Output / 1M | Best for |
|---|---|---|---|---|
| DeepSeek | Flash (off-peak) | $0.15 | $0.60 | High-volume chat, extraction, light coding |
| DeepSeek | Flash (peak) | $0.30 | $1.20 | Same work, 2x rate |
| DeepSeek | V4 Pro (off-peak) | $0.66 | $1.98 | Multi-step reasoning |
| OpenAI | GPT-4o-mini | $0.15 | $0.60 | Simple tasks, classification |
| OpenAI | GPT-6 Luna | $1.20 | $4.80 | Fast, capable general use |
| OpenAI | GPT-5 | $5.00 | $20.00 | Hard reasoning |
| OpenAI | GPT-6 Terra | $12.00 | $48.00 | Frontier reasoning, long outputs |
| AI24X | Flash (managed tier) | — | $0.35 | Everyday production work |
| AI24X | Pro (managed tier) | — | $1.05 | Reasoning-heavy runs |
Official rates are list prices as published by each provider on 2026-10-02 and can change. AI24X managed-tier figures are flat output rates per million tokens; input is billed separately — check the pricing page for current numbers before you budget.
What a workload actually costs
Token counts alone tell you nothing, because input and output are priced differently and the input:output ratio varies wildly by task. Start with an even split — one million input tokens and one million output tokens:
| Model | Input line | Output line | Total |
|---|---|---|---|
| DeepSeek Flash (off-peak) | $0.15 | $0.60 | $0.75 |
| DeepSeek Flash (peak) | $0.30 | $1.20 | $1.50 |
| GPT-4o-mini | $0.15 | $0.60 | $0.75 |
| GPT-6 Luna | $1.20 | $4.80 | $6.00 |
| GPT-5 | $5.00 | $20.00 | $25.00 |
| GPT-6 Terra | $12.00 | $48.00 | $60.00 |
That is the easy case. Most production traffic is not balanced — it is either input-heavy (retrieval, long documents) or output-heavy (agents, code generation, structured extraction).
Input-heavy: document Q&A
Four million retrieved tokens in, half a million tokens of answers out, per month:
- DeepSeek Flash off-peak: 4 × $0.15 + 0.5 × $0.60 = $0.90
- DeepSeek Flash peak: 4 × $0.30 + 0.5 × $1.20 = $1.80
- GPT-6 Luna: 4 × $1.20 + 0.5 × $4.80 = $7.20
Output-heavy: a coding agent
One million tokens of context in, three million tokens of generated code and reasoning out:
- DeepSeek Flash off-peak: 1 × $0.15 + 3 × $0.60 = $1.95
- DeepSeek Flash peak: 1 × $0.30 + 3 × $1.20 = $3.90
- AI24X Flash output line at the flat $0.35/M rate: 3 × $0.35 = $1.05
- GPT-6 Terra: 1 × $12.00 + 3 × $48.00 = $156.00
Identical token counts, an 80x spread between off-peak Flash and a frontier tier. This is why "which API is cheapest" is the wrong question. The useful question is: for this specific workload shape, which tier clears the quality bar at the lowest total?
Four levers that decide your real bill
1. Cache hits
DeepSeek prices cache-hit input at $0.003/M against $0.15/M for a cache miss off-peak — a 50x difference on the input line. If 70% of your input is a stable prefix (system prompt, retrieved corpus, long instructions), that mix costs 0.3 × $0.15 + 0.7 × $0.003 = $0.047 instead of $0.15, about a 69% saving. Cache hits are free money if you order prompts stable-first and avoid rewriting the system prompt on every deploy.
2. Peak windows
DeepSeek's peak window (01:00–04:00 and 06:00–10:00 UTC, Monday to Friday) is priced at 2x. Anything that can wait — batch enrichment, backfills, nightly evals — should be scheduled outside it. A tier with flat pricing removes this planning burden entirely, which matters more than the headline rate once your team stops remembering to schedule around it.
3. Output length
Output is priced several times higher than input almost everywhere ($0.60 vs $0.15, $4.80 vs $1.20, $48 vs $12 in the tables above). A schema change that trims JSON verbosity, or a prompt that asks for a two-sentence answer instead of a paragraph, often beats swapping to a cheaper model. Measure output tokens per request before you shop for a cheaper provider — the biggest line item is usually self-inflicted.
4. Failed calls and retries
Rate limits, timeouts and truncation all produce tokens you paid for and cannot use. A 5% retry rate is a 5% tax on every token, and a provider that returns 429s during your busiest hour costs more than its list price suggests. This is the one place where paying slightly above the floor buys real money back.
Three ways to buy cheap capacity
| Approach | What you get | What it costs you in practice |
|---|---|---|
| Direct with each provider | Lowest sticker price, full model access | One account, key, invoice and rate-limit policy per provider; regional payment and phone-number requirements; no automatic failover |
| Managed gateway credits | One OpenAI-compatible key across many models, flat tiers, routing and failover | A tier rate instead of raw list price (for example $0.35/M output on Flash, $1.05/M on Pro) |
| BYOK gateway | You keep your own provider keys; the gateway handles routing, caching and usage reporting | A flat platform fee (BYOK Pro is $9.9/month) with no per-token markup |
The right answer depends on volume. Below roughly a few hundred million tokens a month, the engineering time spent juggling five provider accounts usually costs more than the saving. Above that, BYOK plus your own negotiated rates tends to win — which is why AI24X offers both: managed credits for teams that want one line item, and BYOK for teams that already have keys.
What "cheap" should not cost you
- Silent substitution. A cheap endpoint that quietly routes your request to a smaller model will look great on the invoice and terrible in production. Check which model actually answered.
- Rate limits you cannot see. Published limits and clear 429 behaviour matter more than a 20% discount. See our notes on DeepSeek rate limits and errors.
- Payment friction. A provider that needs a local card or phone number is not cheap if it costs you a week of onboarding. See paying for Chinese LLM APIs with PayPal.
- Lock-in by protocol. An OpenAI-compatible interface means you can move providers by changing a base URL and a key — that optionality is worth real money. See OpenAI-compatible APIs.
FAQ
What is the cheapest AI API right now?
On published list prices, DeepSeek Flash off-peak and GPT-4o-mini both sit at $0.15 input / $0.60 output per million tokens. A managed tier with a flat output rate ($0.35/M, for example) can end up cheaper than list once peak windows, retries and integration time are counted. Prices change — re-check before you commit a budget.
Is a cheap AI API lower quality?
Not automatically. Price tracks model size, context window and host margin more than it tracks output quality. The real risk with very cheap access is silent model substitution and aggressive rate limiting, not the model family itself.
Are cheap AI API keys safe to buy?
Resold or shared keys are the risky category: they can be revoked, throttled, or tied to someone else's billing. Use an official account, or a gateway where you keep your own keys and only the transport is managed.
What is the cheapest way to run high-volume batch inference?
Stack the three levers: run batch work in off-peak windows, structure prompts so the stable prefix hits the cache, and keep output short. Output usually dominates the bill, so trimming output beats switching models.
Can I use these APIs from outside the US or China?
Several Chinese providers require a local phone number or card. International gateways remove that blocker and bill in USD, which is often the difference between a pilot and a production launch. See using Chinese LLM APIs from outside China.
Next steps
- Estimate your own split: input tokens, output tokens, cache-hit share, and how much traffic can move off-peak.
- Pick two tiers — one cheap default and one escalation tier — instead of one model for everything.
- Re-run the comparison quarterly. List prices moved several times in 2026.
Educational content. Rates quoted are list prices published by each provider on 2026-10-02 and are shown for comparison only; AI24X is an independent gateway and is not affiliated with DeepSeek, OpenAI or any other provider named here.
Model pages: all supported models · DeepSeek · Qwen · Kimi