LLM API Pricing Comparison
Last reviewed
Sources
10 citations
Review status
Source-backed
Revision
v1 · 1,918 words
As of July 2026, the cheapest credible LLM API depends on the capability tier you need, so here is the direct answer. For frontier-class intelligence, the lowest-cost model is DeepSeek V4 Pro at $0.44 input and $0.87 output per 1,000,000 tokens, an open-weight (MIT) release [4][9]. Among the proprietary flagships of the three largest US labs, xAI's Grok 4.3 is by far the cheapest at $1.25 input and $2.50 output [5], undercutting OpenAI's GPT-5.5 ($5 / $30) [1] and Anthropic's Claude Opus 4.8 ($5 / $25) [2] by roughly 4x on input and more than 10x on output. For high-throughput mid-tier work, DeepSeek V4 Flash ($0.14 / $0.28) [4] and Grok 4.1 Fast ($0.20 / $0.50) [5] lead on cost, while Google's Gemini 2.5 Flash ($0.30 / $2.50) [3] is the cheapest workhorse from a big-three lab. For the cheapest usable budget tier, Alibaba's Qwen-Flash posts the lowest headline input rate at $0.05 per 1M [6], and Google's Gemini 2.5 Flash-Lite ($0.10 / $0.40) [3] is the cheapest from a major Western lab. Every price in this article is a USD list rate per 1,000,000 tokens on the standard synchronous tier, verified against each provider's official pricing page in July 2026.
This is the developer, per-token API pricing hub. For the broader economics of AI subscriptions, consumer plans, and market pricing, see the AI pricing concept page.
The full LLM API price table
Prices below are list rates in US dollars per 1,000,000 tokens on the standard, synchronous API tier (batch and off-peak discounts are covered later). "Cached input" is the discounted rate charged when a request hits the prompt cache. "Context" is the maximum advertised input window. Rows are sorted from the cheapest output price upward, because output tokens usually dominate a real bill. Last verified: July 2026 (currency: USD).
| Model | Developer | Input $/1M | Output $/1M | Cached input | Context | Access |
|---|---|---|---|---|---|---|
| DeepSeek V4 Flash | DeepSeek | 0.14 | 0.28 | 0.0028 | 1M | Open weight (MIT) |
| Qwen-Flash | Alibaba | 0.05 | 0.40 | n/r | 1M | Proprietary |
| Gemini 2.5 Flash-Lite | 0.10 | 0.40 | 0.01 | 1M | Proprietary | |
| Grok 4.1 Fast | xAI | 0.20 | 0.50 | 0.05 | 2M | Proprietary |
| Mistral Small 4 | Mistral AI | 0.15 | 0.60 | n/r | 128K | Open weight |
| DeepSeek V4 Pro | DeepSeek | 0.435 | 0.87 | 0.0036 | 1M | Open weight (MIT) |
| GPT-5.4 nano | OpenAI | 0.20 | 1.25 | 0.02 | 400K | Proprietary |
| Mistral Large 3 | Mistral AI | 0.50 | 1.50 | n/r | 128K | Proprietary |
| Grok 4.3 | xAI | 1.25 | 2.50 | n/r | 1M | Proprietary |
| Gemini 2.5 Flash | 0.30 | 2.50 | 0.03 | 1M | Proprietary | |
| Qwen3-Max | Alibaba | 0.86 | 3.44 | n/r | 262K | Proprietary |
| GPT-5.4 mini | OpenAI | 0.75 | 4.50 | 0.075 | 400K | Proprietary |
| Claude Haiku 4.5 | Anthropic | 1.00 | 5.00 | 0.10 | 200K | Proprietary |
| Mistral Medium 3.5 | Mistral AI | 1.50 | 7.50 | n/r | 128K | Proprietary |
| Gemini 3.5 Flash | 1.50 | 9.00 | 0.15 | 1M | Proprietary | |
| Gemini 3.1 Pro | 2.00 | 12.00 | 0.20 | 1M | Proprietary | |
| GPT-5.4 | OpenAI | 2.50 | 15.00 | 0.25 | 1M | Proprietary |
| Claude Sonnet 4.6 | Anthropic | 3.00 | 15.00 | 0.30 | 1M | Proprietary |
| Claude Opus 4.8 | Anthropic | 5.00 | 25.00 | 0.50 | 1M | Proprietary |
| GPT-5.5 | OpenAI | 5.00 | 30.00 | 0.50 | 1M | Proprietary |
| GPT-5.5 Pro | OpenAI | 30.00 | 180.00 | n/r | 1M | Proprietary |
Notes on the table: a blank cache rate ("n/r") means the provider does not publish a distinct prompt-cache-hit price. Prices are the base tier; several models charge more for very long prompts (see Caveats). Context is the maximum advertised input window and, for some models, requires an opt-in long-context mode.
Which LLM API is cheapest overall?
The single cheapest capable API in July 2026 is DeepSeek V4 Flash at $0.14 input and $0.28 output per 1M tokens [4]. It is a 284B-parameter mixture-of-experts model (about 13B active) with a 1,000,000-token context window, shipped open weight under an MIT license in April 2026 [9], so you can also self-host it and pay nothing per token. On DeepSeek's own API a prompt-cache hit drops the input rate to $0.0028 per 1M, a 98% discount [4], the deepest cache discount of any major provider.
If you only care about the raw input rate, Alibaba's Qwen-Flash is cheaper still at $0.05 per 1M input [6], although its $0.40 output rate and per-request length tiers (see Caveats) make it less dramatic on a full bill. Mistral's smallest current model, Ministral 3 3B, is priced symmetrically at $0.10 input and $0.10 output [7], which is attractive for output-heavy chat where responses run long.
What is the cheapest frontier model API?
"Frontier" here means the flagship, highest-intelligence tier. The premium proprietary flagships cluster around $5 input: GPT-5.5 at $5 / $30 [1] and Claude Opus 4.8 at $5 / $25 [2], with Gemini 3.1 Pro notably cheaper at $2 / $12 [3]. The cheapest frontier-class option overall, however, is open weight: DeepSeek V4 Pro at $0.435 / $0.87 [4], roughly one-tenth the input price and one-thirtieth the output price of GPT-5.5. Among proprietary US-lab models, xAI's Grok 4.3 is the value leader at $1.25 / $2.50 [5]. Alibaba's Qwen3-Max ($0.86 / $3.44, base tier) [6] and Mistral AI's Mistral Large 3 ($0.50 / $1.50) [7] round out the low-cost near-frontier group.
Note that GPT-5.5 Pro and similar "pro" reasoning variants cost dramatically more, at $30 input and $180 output per 1M [1], and are reserved for the hardest problems where extra test-time compute earns its keep.
What is the cheapest mid-tier and budget API?
For the mid-tier "workhorse" class (fast, cheap, good enough for most production traffic), the leaders are DeepSeek V4 Flash ($0.14 / $0.28) [4] and Grok 4.1 Fast ($0.20 / $0.50), the latter with a 2,000,000-token context and a $0.05 cached-input rate [5][8]. From the three largest US labs, Gemini 2.5 Flash ($0.30 / $2.50) [3], GPT-5.4 mini ($0.75 / $4.50) [1], and Claude Haiku 4.5 ($1 / $5) [2] are the standard picks, cheapest to most expensive in that order.
At the budget tier, the lowest rates come from Qwen-Flash ($0.05 / $0.40) [6], Gemini 2.5 Flash-Lite ($0.10 / $0.40) [3], Mistral Small 4 ($0.15 / $0.60) [7], and GPT-5.4 nano ($0.20 / $1.25) [1]. For output-heavy workloads, DeepSeek V4 Flash's $0.28 output and Gemini 2.5 Flash-Lite's $0.40 output are the numbers to beat.
How do cached input and batch pricing change the ranking?
Two levers cut the list prices above substantially.
Prompt caching. When consecutive requests share a long prefix (a system prompt, a document, a conversation history), providers charge a reduced rate for the cached portion. Anthropic charges cache reads at 0.1x the base input price (so $0.50 per 1M on Opus 4.8) but adds a one-time cache-write surcharge of 1.25x for a 5-minute cache or 2x for a 1-hour cache [2]. OpenAI and Google apply automatic cache discounts of roughly 90% on input, for example $0.50 cached on GPT-5.5 and $0.20 cached on Gemini 3.1 Pro [1][3]. DeepSeek is the outlier, with a 98% cache discount to $0.0028 per 1M on V4 Flash [4]. See prompt caching for the mechanics.
Batch processing. OpenAI, Anthropic, Google, and Mistral all offer an asynchronous Batch API at a flat 50% discount on both input and output, with results returned within a few hours to 24 hours [1][2][3][7]. For any non-interactive job such as evaluations, bulk extraction, or data labeling, batch mode halves every price in the table.
Caveats: tiered pricing, tokenizers, and blended cost
List prices are not the whole story, so read the fine print before you commit.
Long-context surcharges. Several models charge more once a single prompt crosses a length threshold. GPT-5.5 and GPT-5.4 bill prompts above 272K input tokens at 2x input and 1.5x output for that request [10]. Gemini 3.1 Pro and Gemini 2.5 Pro roughly double their rates above 200K tokens (3.1 Pro from $2 / $12 to $4 / $18) [3]. Qwen3-Max is tiered by input length on Alibaba's international endpoint: about $0.86 / $3.44 for 0-32K tokens, rising to roughly $1.43 / $5.74 for 32K-128K and $2.15 / $8.60 for 128K-252K [6]. Qwen-Flash similarly steps up from $0.05 / $0.40 to about $0.25 / $2.00 above 256K tokens [6].
Tokenizers differ. A "per-token" price is only comparable if the token count is comparable. Anthropic notes that Claude Opus 4.8, Opus 4.7, and Claude Sonnet 5 use a newer tokenizer that produces roughly 30% more tokens for the same text than Claude Sonnet 4.6 and earlier [2], which erodes part of the apparent savings from a lower headline rate. Compare on your own text before committing.
Output weighting. Output tokens run about 2x to 8x more expensive than input across nearly every model, so a model's output price matters most for chat and generation, while its input price matters most for retrieval, classification, and long-context reading. That is why this table is sorted by output price.
Introductory and promotional rates. Anthropic's Claude Sonnet 5 carries introductory pricing of $2 / $10 per 1M through August 31, 2026, reverting to $3 / $15 on September 1, 2026 [2]. Anthropic also lists a specialized creative model, Claude Fable 5, at $10 / $50 [2]. DeepSeek periodically runs off-peak discounts. Treat every time-limited rate as temporary.
How these prices were verified
Every figure was checked in July 2026 against the provider's official pricing page: OpenAI [1], Anthropic [2], Google [3], DeepSeek [4], xAI [5], Alibaba Cloud Model Studio [6], and Mistral AI [7]. Where a provider quotes prices per 1,000 tokens or in another currency, the value was normalized to USD per 1,000,000 tokens. Third-party aggregators were used only to locate the official pages, not as price sources, because several of them still quote retired models, for example the previous-generation Mistral Large 2 at $2 / $6 rather than the current Mistral Large 3 at $0.50 / $1.50 [7]. If a model's price could not be confirmed on an official page, it was left out rather than estimated. For the broader topic of AI product and subscription economics, see AI pricing.
References
- OpenAI, "API Pricing," developers.openai.com/api/docs/pricing (accessed July 2026). https://developers.openai.com/api/docs/pricing ↩
- Anthropic, "Pricing," Claude Platform Docs, platform.claude.com (accessed July 2026). https://platform.claude.com/docs/en/about-claude/pricing ↩
- Google, "Gemini Developer API pricing," Google AI for Developers (accessed July 2026). https://ai.google.dev/gemini-api/docs/pricing ↩
- DeepSeek, "Models and Pricing," DeepSeek API Docs (accessed July 2026). https://api-docs.deepseek.com/quick_start/pricing ↩
- xAI, "Models," xAI Docs (accessed July 2026). https://docs.x.ai/developers/models ↩
- Alibaba Cloud, "Model Studio model pricing" (accessed July 2026). https://www.alibabacloud.com/help/en/model-studio/model-pricing ↩
- Mistral AI, "API Pricing," La Plateforme (accessed July 2026). https://mistral.ai/pricing/api/ ↩
- xAI, "Grok 4.1 Fast and Agent Tools API" (accessed July 2026). https://x.ai/news/grok-4-1-fast ↩
- DeepSeek, "DeepSeek-V4-Pro and DeepSeek-V4-Flash, MIT-licensed open weights," Hugging Face (accessed July 2026). https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro ↩
- OpenAI, "GPT-5.5 model," OpenAI API docs (accessed July 2026). https://developers.openai.com/api/docs/models/gpt-5.5 ↩
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation.