Roundup

Cheapest LLM API in 2026 (Real Price Math)

DeepSeek is the cheapest LLM API by raw per-token price: deepseek-v4-flash costs $0.22 per million input tokens off-peak, with cache hits as low as $0.007 per million tokens. Google's Gemini API is the cheapest if you need a genuinely free tier instead of a scheduling-dependent discount.

ToolEntry planPaid fromNotesVerified
Anthropic API$1/MTok input (Claude Haiku 4.5)Output $5 per MTok; cache hits $0.10 per MTok; batch $0.50 in / $2.50 out2026-08-28
Google Gemini APIFree — Free tier$0.3/MTok input (Gemini 3.5 Flash-Lite)Output $2.50 per MTok2026-08-28
OpenRouterFree — InferenceOpenRouter passes through provider pricing without markup on API usage2026-08-28
DeepSeek$0.44/MTok input (cache miss, peak) (deepseek-v4-flash)Off-peak $0.22 per MTok. Cache hit $0.014 peak / $0.007 off-peak. Output $1.32 peak / $0.66 off-peak2026-08-28

Pricing verified: 2026-08-28 — fromAnthropic APIGoogle Gemini APIOpenRouterDeepSeek

How we picked

We picked based on verified per-token pricing across four providers, checked directly against each vendor's own pricing page rather than a secondhand comparison — and we prioritized real cost mechanics like caching and time-of-day discounts over headline numbers alone, since those mechanics change the actual bill more than the sticker price does.

Anthropic's Claude API, Google's Gemini API, OpenRouter, and DeepSeek all made the list because we have verified numbers for each. We're intentionally not including providers we haven't checked directly, since a "cheapest LLM API" list built on unverified prices defeats its own purpose.

We also weighted mechanics that change the real bill over the headline number a vendor leads with. A provider that advertises a low input price but charges five times as much for output, or one whose discount only applies during a narrow overnight window, isn't necessarily cheaper in practice than a provider with a flatter, less dramatic rate. That's why the table below breaks out input, output, and cache pricing separately instead of collapsing everything into one number.

The shortlist

Raw per-token price only tells part of the story — caching, off-peak discounts, and how you fund the account all move the real number. Here's what each provider actually charges, in the cheapest form each offers.

ProviderCheapest input rateCheapest output rateCheapest cache hitFree option
DeepSeek$0.22/MTok (v4-flash, off-peak)$0.66/MTok (v4-flash, off-peak)$0.007/MTok (v4-flash, off-peak)None documented
Gemini API$0.30/MTok (Flash-Lite)$2.50/MTok (Flash-Lite)Not detailed in fact sheetFree tier: limited models
Anthropic API$1/MTok (Haiku 4.5)$5/MTok (Haiku 4.5)$0.10/MTok (Haiku 4.5, 0.1x input)Small credit grant only
OpenRouterPass-through, no markupPass-through, no markupDepends on underlying providerFree models, 50 req/day

DeepSeek wins on raw price by a wide margin. deepseek-v4-flash costs $0.44 per million input tokens at peak on a cache miss, dropping to $0.22 off-peak, with output at $1.32 peak and $0.66 off-peak. Cache hits go even lower — $0.014 per million tokens at peak, $0.007 off-peak — roughly 30x cheaper than a cache miss. The catch is that off-peak hours are fixed in UTC (01:00-04:00 and 06:00-10:00, Monday through Friday), so this discount only helps workloads that can be scheduled or that tolerate variable latency-sensitivity.

Gemini's free tier is the cheapest option that isn't schedule-dependent: limited model access with free input and output tokens plus Google AI Studio access, at zero cost, though content is used to improve Google's products. Paid Gemini pricing bottoms out at Flash-Lite: $0.30 per million input tokens and $2.50 per million output tokens, among the cheapest paid per-token rates of any hosted frontier-lab model.

Anthropic's cheapest paid model is Claude Haiku 4.5 at $1 per million input tokens and $5 per million output tokens, with cache hits at 0.1x input price — $0.10 per million tokens for Haiku. Stacking the Batch API's 50% discount with caching pushes the effective cost even lower for asynchronous, cache-friendly workloads, though there's no permanent free tier, only a small credit grant for new accounts.

OpenRouter doesn't set its own price — it passes through the underlying provider's rate with no markup, so its "cheapest" option is whichever model you route to underneath. Its free models are rate-limited to 50 requests per day, rising to 1,000 per day once you've purchased at least $10 in credits. The real cost with OpenRouter shows up in funding: a 5.5% fee with an $0.80 minimum on Stripe, or 5% via crypto through Coinbase, which a direct provider account doesn't charge at all. For teams that want to bring their own provider key instead of buying credits, OpenRouter's BYOK pay-as-you-go tier is free up to $25,000 per month in usage, with a 5% fee above that threshold — the enterprise BYOK allowance raises that ceiling to $200,000 per month before the same fee applies. That structure makes OpenRouter cheapest specifically for a team already spending well past the free-model tier but still under the BYOK allowance.

What to watch out for

The single biggest trap in "cheapest LLM API" comparisons is quoting only the input price and ignoring output, since output tokens are consistently the more expensive side of the ledger — Anthropic's output costs five times its input on every model, and DeepSeek's off-peak output at $0.66/MTok is still three times the off-peak input rate. A workload that generates a lot of text will be dominated by the output number, not the cheaper input number that usually gets quoted first.

DeepSeek's off-peak discount is real but operationally awkward: peak hours are fixed in UTC, so a team outside those time zones has to actively schedule work to capture the discount, and an unscheduled burst during peak hours costs exactly double what a planner might expect. Cost forecasting on DeepSeek requires modeling both cache-hit rate and time of day, not just token volume.

Gemini's free tier and OpenRouter's free models both come with strings: Gemini's free tier content is used to improve Google's products, ruling it out for anything confidential, and OpenRouter's free-model rate limit is a tight 50 requests per day until you've spent at least $10 in credits. Neither is a substitute for a real production budget once you scale past prototyping.

Finally, remember that "cheapest per token" and "cheapest per finished task" aren't the same number. Claude 4.7 and later models use a tokenizer that produces roughly 30% more tokens for the same text, which changes the real cost of a Claude-based workflow even at a fixed per-token rate. Run your actual prompt and completion lengths through our LLM API cost calculator before picking a provider on price alone, and see our best LLM API for coding tasks roundup if capability matters as much as cost for your use case.

Frequently asked questions

What is the cheapest LLM API right now?

DeepSeek's deepseek-v4-flash is the cheapest by raw per-token price: $0.22 per million input tokens off-peak and $0.66 per million output tokens off-peak, with cache hits as low as $0.007 per million tokens off-peak.

Is there a free LLM API?

Google's Gemini API has a genuinely free tier with limited model access and free input and output tokens, though the content you send is used to improve Google's products. OpenRouter also offers free models at 50 requests per day.

How does DeepSeek's off-peak pricing work?

DeepSeek's off-peak rates are half of peak rates, and peak hours are defined as 01:00-04:00 and 06:00-10:00 UTC, Monday through Friday. Scheduling batch or non-latency-sensitive work outside those windows cuts your bill in half.

Does OpenRouter make LLM APIs cheaper?

Not on inference — OpenRouter passes through provider pricing with no markup. But funding the account costs a 5.5% Stripe fee with an $0.80 minimum, or 5% via crypto, so it can be more expensive than a direct account depending on how you pay.

Is prompt caching worth it for cost savings?

Yes, substantially. Anthropic's cache hits cost 0.1x the base input price, and DeepSeek's cache hits are roughly 30x cheaper than cache misses, so any workload that reuses context — system prompts, large files, long conversations — saves real money with caching.