Tool

LLM API Pricing Calculator (All Major Providers)

Estimating your LLM API bill means multiplying expected input and output tokens by each provider's published per-token rate, then adjusting for caching and any off-peak or batch discounts. DeepSeek's off-peak rates and Anthropic's cache pricing move the real number the most, often by 2-10x versus the sticker rate.

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
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
OpenRouterFree — InferenceOpenRouter passes through provider pricing without markup on API usage2026-08-28

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

Current API prices side by side

Here's the verified, per-million-token pricing across the four providers we've checked directly, at their cheapest documented rate for each.

ProviderCheapest inputCheapest outputCheapest cache hit
DeepSeek (v4-flash, off-peak)$0.22/MTok$0.66/MTok$0.007/MTok
Gemini API (Flash-Lite)$0.30/MTok$2.50/MTokNot detailed in fact sheet
Anthropic API (Haiku 4.5)$1/MTok$5/MTok$0.10/MTok
OpenRouterPass-through, no markupPass-through, no markupDepends on underlying provider

At the higher end, Anthropic's Claude Opus 5 runs $5/MTok input and $25/MTok output, and Claude Sonnet 5 runs $2/MTok input and $10/MTok output — with cache hits on Sonnet 5 at $0.20/MTok and on Opus 5 at $0.50/MTok. Gemini's Flash model is $1.50/MTok input and $9.00/MTok output, above the cheaper Flash-Lite tier. DeepSeek's larger v4-pro model costs $1.32/MTok input and $3.96/MTok output at peak, dropping to $0.66/MTok input and $1.98/MTok output off-peak.

How to estimate your monthly bill

Estimating your bill starts with your expected monthly token volume, split into input and output, since the two are priced very differently across every provider here — Anthropic's output costs five times its input on every model, and DeepSeek's off-peak output is three times its off-peak input. Multiply expected input tokens by the input rate and expected output tokens by the output rate, then add the two together for a naive baseline estimate.

From there, adjust for the discounts that actually apply to your workload. If you reuse context — a system prompt, a large document, a codebase — factor in caching: Anthropic's cache reads cost 0.1x the base input price, so a workload with a large, frequently reused prompt can see the effective input cost drop to a tenth of the naive estimate. DeepSeek's cache hits are roughly 30x cheaper than cache misses, an even bigger swing for cache-friendly workloads. If your work can run asynchronously, Anthropic's Batch API cuts both input and output cost by 50%, and it stacks with caching for compounding savings.

If your workload can tolerate scheduling, DeepSeek's off-peak pricing — half of peak rates, with peak defined as 01:00-04:00 and 06:00-10:00 UTC, Monday through Friday — is the single biggest lever available in this comparison. Shifting a batch job from peak to off-peak roughly halves that portion of your bill without touching model choice or caching at all.

Finally, decide how you're funding the account. Going direct to a provider avoids any markup, while OpenRouter's inference itself carries no markup but its credit-purchase fees do: 5.5% with an $0.80 minimum via Stripe, or 5% via crypto through Coinbase. For usage past $25,000/month, OpenRouter's bring-your-own-key pay-as-you-go tier is free up to that threshold and 5% above it, with the enterprise BYOK allowance raising the free ceiling to $200,000/month.

Where the estimates go wrong

The most common estimation error is using a flat per-token rate without accounting for the output/input split, since a workload that skews toward long generations — code, long-form writing, detailed reports — will be dominated by the more expensive output rate, not the input rate most estimates lead with. On Anthropic's models, that's a 5x gap; on DeepSeek's off-peak pricing, it's still a 3x gap.

A second common error is estimating from a stale token count. Claude 4.7 and later models use a tokenizer that produces roughly 30% more tokens for the same text than older tokenizers, so a token-volume estimate carried over from an older model or an older article will understate your real usage on current Claude models.

A third error is ignoring caching entirely, which can be the single biggest swing in the whole estimate — Anthropic's cache hits at 0.1x input price and DeepSeek's roughly-30x cache discount both mean that a workload with high context reuse can cost dramatically less than a naive multiply-tokens-by-rate calculation suggests, while a workload with no reuse gets none of that benefit no matter how the rest of the math is done. Run your actual prompt structure — not just a token count — through the numbers here, and check our best LLM API for coding tasks roundup and OpenRouter vs direct API access comparison for deeper reads on picking a provider once you have a real estimate.

Frequently asked questions

How do I estimate my monthly LLM API bill?

Multiply your expected monthly input tokens by the provider's input rate, do the same for output tokens at the output rate, then subtract savings from caching or batch processing. Anthropic's cache hits cost 0.1x input price, and its Batch API cuts both input and output by 50%.

Which provider is cheapest for a high-volume, non-urgent workload?

DeepSeek, if you can schedule work outside peak hours (01:00-04:00 and 06:00-10:00 UTC, Monday through Friday). Off-peak rates are half of peak, and deepseek-v4-flash drops to $0.22/MTok input and $0.66/MTok output off-peak.

Does prompt caching change the estimate a lot?

Yes, often dramatically. Anthropic's cache reads cost 0.1x the base input price, and DeepSeek's cache hits are roughly 30x cheaper than cache misses, so a workload with heavy context reuse can cost a fraction of a naive per-token estimate.

Is there a free tier I can use to test my estimate before paying?

Google's Gemini API has a free tier with limited model access and free input and output tokens, though content is used to improve Google's products. OpenRouter also offers free models at 50 requests per day, rising to 1,000 after a $10 credit purchase.

Why would OpenRouter cost more than going direct to a provider?

OpenRouter doesn't mark up inference, but funding your account costs a 5.5% fee with an $0.80 minimum via Stripe, or 5% via crypto through Coinbase — a cost a direct provider account doesn't have, which matters most for smaller, frequent top-ups.