If you are building an application on top of large language models in 2026, you are facing an unprecedented landscape. A single API call can cost anywhere from a fraction of a cent to over a dollar, and the gap between the cheapest and most expensive flagship models now exceeds 100x. Choosing the wrong model for your workload is not a minor optimization problem; it is the difference between a profitable product and an unsustainable burn rate.
This guide compares API pricing across every major model provider, including OpenAI, Anthropic, Google, DeepSeek, Kimi, MiMo, MiniMax, and others, with real prices, not just headline rates. We cover prompt caching mechanics in detail, explain why tokens-per-second matters as much as cost-per-token, and highlight the hidden costs that most pricing pages ignore. For a broader look at how AI subscription costs compare, see our analysis of why AI subscriptions are so expensive and how to find value.
How LLM API Pricing Works
Every major LLM provider charges by the token, a fragment of a word that the model processes. You pay separately for two directions:
- Input tokens: everything you send to the model: your prompt, conversation history, system instructions, and any documents or images you include.
- Output tokens: everything the model generates in response, including reasoning tokens that chain-of-thought models produce internally before giving you an answer.
Output tokens are almost always more expensive than input tokens, typically 3x to 12x, because each one requires a full forward pass through the model. Input tokens, by contrast, can be processed in parallel and are computationally cheaper.
Prices are quoted per million tokens (MTok). To put that in perspective: one million tokens is roughly 750,000 words, or about three copies of The Great Gatsby. A short, single-turn question-and-answer exchange might use 200 to 500 tokens. But real-world conversations are rarely that simple, and here is the catch that surprises most developers: because every previous message in a conversation must be sent back to the model as context for each new turn, the token cost of an ongoing conversation grows exponentially, not linearly. Turn 1 might cost 500 tokens. By turn 10, with the full history appended, a single exchange could cost 5,000. By turn 50, you could be sending 25,000 tokens just to ask a follow-up question and paying for all of them as input every single time. This is why conversation length is the single biggest hidden cost driver in production chatbots and why prompt caching and context management are not optional for anything that scales.
Context windows, the maximum number of tokens a model can process in one request, also affect your bill. Larger contexts let you send more data per request, but every token you send counts toward your input cost. A 1-million-token context window is powerful, but filling it at $5 per million input tokens costs $5 per request before the model generates a single word.
Providers also differ in their billing models. Most, including OpenAI, Anthropic, and Google, operate on a post-pay basis: you use the API and are billed at the end of the month. Others, like OpenRouter and several Chinese providers, use a pre-pay model where you purchase credits upfront and consume them as you go. Muse operates on a pure pay-as-you-go model with no upfront commitment. Understanding your provider’s billing model matters for cash flow planning and avoiding unexpected service interruptions when credits run dry.
Master Pricing Table: Every Major Model Compared
The table below covers current-generation flagship and notable models from every major provider.

All prices are per million tokens and were verified as of July 2026. Where a provider offers prompt caching, the cached input price is listed alongside the standard rate. The Ratio column shows output price as a multiple of input price; a wider spread means you should optimize your prompts more aggressively.
| Provider | Model | Input / MTok | Cached Input / MTok | Output / MTok | Ratio | Context |
|---|---|---|---|---|---|---|
| OpenAI | GPT-5.6 Sol | $5.00 | $0.50 | $30.00 | 6.0x | 1.05M |
| OpenAI | GPT-5.6 Terra | $2.50 | $0.25 | $15.00 | 6.0x | 1.05M |
| OpenAI | GPT-5.6 Luna | $1.00 | $0.10 | $6.00 | 6.0x | 1.05M |
| Anthropic | Claude Opus 4.8 | $5.00 | $0.50 | $25.00 | 5.0x | 1M |
| Anthropic | Claude Opus 4.8 Fast | $10.00 | $1.00 | $50.00 | 5.0x | 1M |
| Anthropic | Claude Fable 5 | $10.00 | $1.00 | $50.00 | 5.0x | 1M |
| Anthropic | Claude Sonnet 5* | $2.00 | $0.20 | $10.00 | 5.0x | 1M |
| Anthropic | Claude Haiku 4.5 | $1.00 | $0.10 | $5.00 | 5.0x | 200K |
| Gemini 3.1 Pro | $2.00 | $0.20 | $12.00 | 6.0x | 1M | |
| Gemini 3.5 Flash | $1.50 | $0.15 | $9.00 | 6.0x | 1M | |
| Gemini 3.1 Flash-Lite | $0.25 | $0.025 | $1.50 | 6.0x | 1M | |
| DeepSeek | DeepSeek V4 Pro | $0.435 | $0.003625 | $0.87 | 2.0x | 1M |
| DeepSeek | DeepSeek V4 Flash | $0.14 | $0.0028 | $0.28 | 2.0x | 1M |
| Kimi | Kimi K2.7 Code | $0.95 | $0.19 | $4.00 | 4.2x | 262K |
| Kimi | Kimi K2.7 Code HS | $1.90 | $0.38 | $8.00 | 4.2x | 262K |
| Kimi | Kimi K2.6 | $0.95 | $0.16 | $4.00 | 4.2x | 262K |
| Kimi | Kimi K2.5 | $0.60 | $0.10 | $3.00 | 5.0x | 262K |
| MiMo | MiMo V2.5 Pro | $0.435 | $0.0036 | $0.87 | 2.0x | 1M |
| MiMo | MiMo V2.5 | $0.14 | $0.0028 | $0.28 | 2.5x | 1M |
| MiniMax | MiniMax M3 (<512K) | $0.30 | $0.06 | $1.20 | 4.0x | 1M |
| MiniMax | MiniMax M3 (>512K) | $0.60 | $0.12 | $2.40 | 4.0x | 1M |
| MiniMax | MiniMax M2.7 | $0.30 | $0.06 | $1.20 | 4.0x | 205K |
| MiniMax | MiniMax M2.7 HS | $0.60 | $0.06 | $2.40 | 4.0x | 205K |
| xAI | Grok 4.5 | $2.00 | $0.50 | $6.00 | 3.0x | 500K |
| xAI | Grok 4.3 | $1.25 | $0.20 | $2.50 | 2.0x | 1M |
| Muse | Muse Spark 1.1 | $1.25 | $0.15 | $4.25 | 3.4x | 1M |
| Zhipu | GLM-5.2 | $1.40 | $0.26 | $4.40 | 3.1x | 1M |
| Alibaba | Qwen 3.7 Plus (<256K) | $0.40 | $0.08 | $1.60 | 4.0x | 1M |
| Alibaba | Qwen 3.7 Plus (>256K) | $1.20 | $0.24 | $4.80 | 4.0x | 1M |
| NVIDIA | Nemotron 3 Ultra | $0.50 | $0.10 | $2.20 | 4.4x | 1M |
* Claude Sonnet 5 pricing shown is introductory: $2/$10 through Aug 31, 2026; standard from Sept 1: $3/$15. Anthropic’s cache prices shown are read prices (90% discount); write prices vary by model and TTL duration. MiniMax M3 uses tiered pricing by input length. HS = highspeed. MiniMax also offers a Priority tier at 1.5x standard pricing for faster responses. * Claude Sonnet 5 introductory pricing shown: $2/$10 through Aug 31, 2026; standard from Sept 1: $3/$15. Anthropic’s cache prices shown are read prices (90% discount); write prices vary by model and TTL duration. MiniMax M3 uses tiered pricing by input length. HS = highspeed. Nemotron 3 Ultra pricing shown is via OpenRouter; see provider section for alternatives.
Several things jump out immediately. The price spread between the most expensive flagship (GPT-5.6 Sol at $30/MTok output) and the cheapest capable model (MiMo V2.5 at $0.28/MTok output) is over 100x. Chinese providers consistently offer the narrowest input-to-output price ratios; DeepSeek and MiMo charge only about 2x more for output than input, compared to 5x to 6x for Western providers. And prompt caching, which we cover in detail later, can slash input costs by 75% to 99% depending on the provider.
OpenAI API Pricing: The GPT-5.6 Family
OpenAI’s current-generation lineup is the GPT-5.6 series, launched in mid-2026. Pricing is available on OpenAI’s official API pricing page. It follows the three-tier structure OpenAI has standardized across recent generations: a flagship model for complex professional work, a balanced model, and a cost-optimized entry point.
GPT-5.6 Sol
Sol is the frontier model, the one you reach for when accuracy matters more than budget. At $5 per million input tokens and $30 per million output tokens, it sits at the premium end of the market, comparable to Claude Opus 4.8. It supports six reasoning levels (none through max), a 1.05-million-token context window, and up to 128,000 output tokens per request. Tools include function calling, web search, file search, and computer use.
Cached input tokens cost $0.50 per million, a 90% discount from the standard rate. Like all GPT-5.6 models, caching is automatic: any prompt prefix that has been processed recently is reused without you writing any code. OpenAI operates on a post-pay billing model: you are invoiced at the end of each billing period for what you used.
GPT-5.6 Terra
Terra balances intelligence and cost at $2.50 per million input and $15 per million output. It matches Sol’s 1.05M context window, 128K max output, and full reasoning and tool support. Cached input costs $0.25 per million tokens. For most production workloads that do not require the absolute best reasoning performance, Terra is the pragmatic choice.
GPT-5.6 Luna
Luna is the cost-sensitive tier at $1 per million input and $6 per million output, with cached input at $0.10 per million. It shares the same context window, output limits, and tool support as its siblings. For high-volume applications like classification, data extraction, and straightforward chatbots, Luna delivers GPT-5.6-level tool compatibility at a fraction of the price.
Key takeaway: The GPT-5.6 family uses a consistent 10% cache price across all three tiers. If your application sends the same system prompt or context prefix repeatedly, you can expect roughly a 90% reduction on input costs for those cached portions, but only if the model and conversation prefix remain unchanged. Switching models, even within the same family, resets the cache.
Anthropic API Pricing: Claude Opus, Sonnet, Haiku and Fable
Anthropic’s model lineup spans four current-generation tiers, each targeting a different point on the quality-speed-cost curve. Full pricing details are on Anthropic’s official pricing page. Anthropic uses post-pay billing like OpenAI but also offers a pre-pay credit option for teams that prefer budget caps.
Claude Opus 4.8
Opus 4.8 is Anthropic’s most capable model, priced at $5 per million input and $25 per million output tokens. It features adaptive thinking, where the model decides how much reasoning to apply based on the complexity of the task, and a 1-million-token context window. Opus 4.8 also offers a Fast Mode at $10 input and $50 output per million tokens, which Anthropic claims is roughly 2.5x faster than standard mode.
Claude Fable 5
Fable 5 is Anthropic’s flagship reasoning model, priced at $10 per million input and $50 per million output tokens. It shares Opus 4.8’s context window and pricing structure but is optimized for tasks that benefit from variable reasoning depth. Anthropic also offers the limited-availability Claude Mythos 5 at the same pricing tier, designed for enterprise deployments. Fable 5 cache writes cost $12.50 per million tokens for 5-minute TTLs or $20 per million for 1-hour TTLs. At max reasoning effort, it achieves the highest Artificial Analysis Intelligence Index score of any current model.
Claude Sonnet 5
Sonnet 5 launched with introductory pricing of $2 per million input and $10 per million output through August 31, 2026. From September 1, standard pricing of $3 input and $15 output applies. It is available through the API, Claude Code, and the Claude Platform and represents Anthropic’s best balance of cost and capability for coding and analysis workloads. Claude Code can also be accessed through a monthly subscription plan rather than per-token billing, which is worth evaluating for individual developers who code heavily.
Claude Haiku 4.5
Haiku 4.5 is Anthropic’s fastest and cheapest model at $1 per million input and $5 per million output. It is designed for high-throughput, cost-sensitive applications where speed is paramount.
Anthropic Prompt Caching: How It Works
Anthropic’s caching model is fundamentally different from OpenAI’s. It is manual, not automatic. You explicitly mark which parts of your prompt should be cached, and you pay for the duration you want the cache to persist, typically 5 minutes, refreshed each time the cache is accessed. There is a surcharge on cache writes that varies by model and TTL duration. For Opus 4.8, write costs are $6.25 per million for 5-minute TTLs or $10 per million for 1-hour TTLs. For Fable 5 and Mythos 5, write costs are $12.50 per million for 5-minute TTLs or $20 per million for 1-hour TTLs. Subsequent reads receive a 90% discount regardless of model.
This means Anthropic caching rewards thoughtful architecture: if you design your prompts to front-load a large, reusable system context and keep read patterns consistent, your effective input cost for a Sonnet 5 request can drop from $3 per million to $0.30. But if your cache misses frequently, because you change system prompts, modify the cached prefix, or let the TTL expire, you pay the write surcharge repeatedly and lose the discount.
Batch Processing
All Anthropic models support batch API processing with a 50% discount on both input and output tokens. Results are returned asynchronously within 24 hours. For non-real-time workloads like evaluation runs, data extraction pipelines, and content generation at scale, batching is the single largest cost lever available.
Google Gemini API Pricing: Pro, Flash, and Flash-Lite
Google offers Gemini models through a free tier (rate-limited, with Google’s standard data usage policy) and a paid tier with per-token pricing. Current rates are listed on Google’s Gemini API pricing page. The current-generation lineup spans three tiers. Google bills on a post-pay model with a monthly invoicing cycle.
Gemini 3.1 Pro
Gemini 3.1 Pro costs $2 per million input tokens and $12 per million output tokens for prompts up to 200,000 tokens. Beyond 200K tokens, input doubles to $4 per million and output rises to $18 per million. This tiered structure means you pay a premium for long-context reasoning, which matters if you routinely send entire codebases or document sets. Context caching costs $0.20 per million tokens for storage, with cached reads at a 90% discount.
Gemini 3.5 Flash
Launched in May 2026, Gemini 3.5 Flash is Google’s newest model and currently beats 3.1 Pro on several coding benchmarks despite costing less: $1.50 per million input and $9 per million output, with cached input at $0.15. It represents the best value in Google’s lineup for most workloads.
Gemini 3.1 Flash-Lite
At $0.25 per million input and $1.50 per million output, with cached input at just $0.025, Flash-Lite is Google’s budget option. It is available through the free tier with rate limits and is ideal for high-volume, simple tasks.
Google Caching: Automatic and Manual Options
Google supports both automatic and manual caching. For most users, automatic context caching kicks in when prompts exceed 32,768 tokens, with a 75% discount on cached reads. Google also offers a manual caching API where you can configure the TTL and pay a storage rate of $1 per million tokens per hour. Manual caches refresh on access, and unused caches expire according to the TTL you set.
Google also integrates API access with its subscription products. Google Antigravity, available through a Gemini subscription, provides a pathway to use Gemini models without direct per-token billing, though with usage limits.
Grounding and Search
If you use Google Search grounding with Gemini models, the first 5,000 search queries per month are free across the Gemini 3 family. Beyond that, it costs $14 per 1,000 search queries. Google Maps grounding follows the same structure.
DeepSeek, Kimi, MiMo and MiniMax: Chinese AI API Costs
Chinese AI labs have reshaped the global API pricing landscape. Their models consistently undercut Western providers by 10x to 100x on output tokens, largely due to differences in electricity costs, caching technology, and infrastructure efficiency. Most Chinese providers use a pre-pay credits model: you top up your account and consume credits as you go, which avoids surprises but requires monitoring your balance.
DeepSeek
DeepSeek V4 Pro costs $0.435 per million input and $0.87 per million output, with an extraordinary cached input price of just $0.003625 per million, a 99.2% discount on cache hits. Its smaller sibling, DeepSeek V4 Flash, is the market leader in cost efficiency at just $0.14 per million input and $0.28 per million output, making it roughly 100x cheaper than GPT-5.6 Sol on output. Cached input for V4 Flash costs $0.0028 per million tokens — a 98% discount. Both models support a 1-million-token context window and use automatic caching.
Both models feature a 1-million-token context window and are particularly strong at coding and mathematics. On the SWE-Bench Verified coding benchmark, V4 Pro scores 81%, putting it in the same league as models costing 10x more.
Kimi (Moonshot AI)
Kimi K2.6, Moonshot’s flagship, costs $0.95 per million input and $4 per million output, with cached input at $0.16. Its 262K context window is narrower than Western flagships, but the automatic caching discount of approximately 83% makes it competitive for workloads with high cache-hit rates. K2.5 is the cheaper alternative at $0.60 input and $3 output, with cached input at $0.10.
Kimi K2.7 Code is a dedicated coding variant. It costs $0.95 per million input (cache miss) and $0.19 for cache hits, with $4 per million output. A highspeed variant (K2.7 Code-highspeed) doubles those prices to $1.90 cache-miss input, $0.38 cache-hit, and $8 output for reduced latency. All Kimi models use automatic caching. Kimi also charges $0.004 per invocation for web search, billed independently of token consumption, and offers a membership plan that bundles API access with coding-focused features.
MiMo (Xiaomi)
MiMo V2.5 Pro and MiMo V2.5 are among the most aggressively priced models on the market following Xiaomi’s permanent price reduction in May 2026. MiMo V2.5 Pro costs $0.435 per million input and $0.87 per million output, with an extraordinary cached input price of $0.0036 per million, a 99.2% discount. MiMo V2.5 is cheaper still at $0.14 input and $0.28 output, with cached input at $0.0028 (98% discount). Both models feature a 1-million-token context window and use automatic caching.
MiniMax
MiniMax offers two model generations. The newer MiniMax M3 costs $0.30 per million input and $1.20 per million output for prompts up to 512,000 tokens, doubling to $0.60 input and $2.40 output beyond that threshold. Cached reads are $0.06 per million, an 80% discount. MiniMax M3 also offers a Priority tier at 1.5x standard pricing, which provides faster response times and improved request reliability through priority admission scheduling. The previous-generation MiniMax M2.7 costs $0.30 per million input and $1.20 per million output with a 205K context window. Its highspeed variant (M2.7-highspeed) doubles the price to $0.60 input and $2.40 output for reduced latency. MiniMax M2.7 supports both automatic and manual caching. Automatic caching activates for repeated context prefixes without any configuration changes. Manual caching allows you to explicitly create caches with write costs of $0.375 per million tokens and reads at $0.06. This hybrid approach gives power users finer control while the automatic mode works for everyone else. MiniMax M3, by contrast, uses automatic caching only, with read costs of $0.06 per million and no write surcharge.
Why are Chinese LLMs cheaper? A combination of factors: lower electricity costs in China, aggressive cache-hit technology, and an open-weight ecosystem that enables third-party providers like DeepInfra, Fireworks, and Parasail to host the same models at competing prices. For a deeper analysis, read our breakdown of why Chinese AI models are cheaper than OpenAI and other Western providers.
Grok, Muse, GLM, Qwen and Nemotron: The Mid-Tier Contenders
Beyond the big three Western providers and the Chinese price leaders, a group of mid-tier models offers competitive pricing with distinct strengths. These models sit in the $1 to $2 per million input range, making them viable alternatives to GPT-5.6 Luna or Claude Haiku 4.5 for specific workloads.
Grok (xAI)
xAI’s current flagship is Grok 4.5, priced at $2 per million input and $6 per million output with a 500K context window and cached input at $0.50. Its predecessor, Grok 4.3, remains available at $1.25 input and $2.50 output with a larger 1-million-token context window and cached input at $0.20. Grok 4.3’s narrow 2x input-to-output ratio makes it one of the most output-efficient models available. xAI no longer displays pricing for older or smaller Grok variants. Both models use automatic caching.
Muse Spark 1.1
Muse Spark 1.1 costs $1.25 per million input tokens and $4.25 per million output, with cached input at $0.15. It supports a 1-million-token context window with up to 256,000 output tokens per request. Web search grounding costs $2.50 per 1,000 search queries. Muse operates on a pure pay-as-you-go billing model with no upfront commitment.
GLM-5.2 (Zhipu AI)
GLM-5.2 from Zhipu AI costs $1.40 per million input tokens and $4.40 per million output, with cached input at $0.26. Cache storage is currently free for a limited time. It supports up to 128,000 output tokens per request (sometimes listed as 131,072 depending on the provider) and a 1-million-token context window.
Qwen (Alibaba)
Qwen 3.7 Plus is Alibaba’s current-generation model, priced at $0.40 per million input and $1.60 per million output for prompts up to 256,000 tokens. Beyond 256K tokens (up to 1 million), input rises to $1.20 and output to $4.80 per million. Alibaba offers both implicit (automatic) and explicit (manual) caching: implicit cache hits cost $0.08 per million input (80% discount), while explicit caching allows you to create caches at $0.50 per million with reads at just $0.04. This dual caching architecture gives developers fine-grained control over cost optimization. Qwen 3.7 Plus is available through Alibaba Cloud’s API and through OpenRouter and other third-party providers.
Nemotron 3 Ultra (NVIDIA)
NVIDIA’s Nemotron 3 Ultra (550B parameters, 55B active) does not have a direct per-token API plan from NVIDIA itself but is widely available through third-party inference providers. OpenRouter offers it at $0.50 per million input, $0.10 cached input, and $2.20 per million output. NVIDIA NIM provides it at $0.50 input, $0.15 cached, and $2.50 output, with a free developer plan available. Together AI charges $0.60 for input, $0.20 for cache, and $3.60 for output. All three providers include free cache storage. For self-hosted deployments, NVIDIA charges approximately $4,500 per GPU per year. On the speed front, Blackbox AI hosts Nemotron 3 Ultra at 460 t/s, Nebius at 319 t/s, and CoreWeave at 229 t/s, making it one of the fastest-served open-weight models when hosted on optimized infrastructure.
OpenRouter and Third-Party Inference Providers
Not all API access goes through the model developer’s own servers. A growing ecosystem of third-party providers hosts the same open-weight models (and sometimes proprietary ones) with different speed, pricing, and reliability characteristics.
OpenRouter
OpenRouter is a unified API gateway that gives you access to over 300 models from dozens of providers through a single endpoint. Instead of managing separate API keys, billing accounts, and rate limits for each provider, you add credits to OpenRouter and route requests to whichever model you choose.
As of mid-2026, OpenRouter’s catalog rates match provider-published pricing for most major closed-source models. Claude Opus 4.8, Sonnet 5, Haiku 4.5, GPT-5.6 models, and Gemini models all pass through at cost with no markup. For open-weight models like DeepSeek, Kimi, Qwen, and GLM, OpenRouter offers access through multiple competing inference hosts, each with its own price and speed profile. This is where OpenRouter’s value proposition is strongest: you can choose between providers like Fireworks, DeepInfra, Together AI, and Parasail for the same model, trading off cost against speed. OpenRouter adds approximately 50ms to 150ms of routing overhead per request compared to calling the underlying provider directly. It uses a prepaid credits model.
When OpenRouter makes sense: if you need access to many different models and the overhead of managing multiple provider accounts outweighs the per-token savings; if you are prototyping and want to switch between models without rewriting integration code; or if you want to compare inference providers for an open-weight model without opening multiple accounts.
Dedicated Inference Providers
For open-weight models, dedicated inference providers consistently outperform first-party APIs on speed. Fireworks AI, Together AI, DeepInfra, Groq, SambaNova, and Cerebras each optimize their infrastructure for specific model architectures, often delivering 3x to 10x higher throughput than the model developer’s own API. The trade-off is that these providers typically only host open-weight models, not proprietary ones like GPT or Claude.
Key third-party hosts and their specialties:
- Fireworks AI: Consistently among the fastest for Kimi K2.5 (330 t/s), DeepSeek V4 Pro (167 t/s), and Llama models. Strong custom kernel optimizations.
- DeepInfra: Competitive pricing with private deployment options. Fastest for MiMo V2.5 Pro at 81 t/s.
- Together AI: Broad model catalog with token-bucket rate limiting. Strong for MiniMax M2.7 (207 t/s) and Kimi K2.7 Code (237 t/s).
- Groq: Fastest overall for Llama models (330+ t/s) with sub-200ms TTFT. Limited to specific architectures due to custom hardware.
- SambaNova: Exceptional speed on MiniMax M2.7 (443 t/s). Uses custom RDU architecture.
- Cerebras: Plans to host GPT-5.6 Sol at 750 t/s. Wafer-scale hardware enables extreme throughput.
- Crusoe: Fastest for Kimi K2.7 Code (432 t/s) using NVFP4 quantization. Specializes in low-precision, high-throughput inference.
When choosing a third-party provider, check the quantization level. Many providers use FP8 or NVFP4 precision, which reduces quality slightly in exchange for much higher speed. If your workload is sensitive to precision loss, stick with FP16 or BF16 providers. If throughput is paramount, FP8 and NVFP4 can deliver dramatic speed gains at minimal quality cost for most tasks.
Prompt Caching: The Hidden Cost Multiplier
Prompt caching is the single most important cost optimization that most developers overlook. When you send the same prompt prefix, a system message, a large document, or a set of few-shot examples, the provider can reuse its internal computation rather than reprocessing those tokens from scratch. The discounts are dramatic, but the mechanics differ significantly across providers.
Automatic vs. Manual Caching
| Provider | Caching Type | Cache Discount | Write Cost | TTL / Refresh | Min Tokens |
|---|---|---|---|---|---|
| OpenAI | Automatic | 90% off input | None | 5-10 min, refreshes on hit | 1,024 |
| Anthropic | Manual | 90% off reads | 25% surcharge on write | 5 min, refreshes on hit | 1,024 (Haiku) / 2,048 (Sonnet, Opus) |
| Auto + Manual | 75% off (auto); 90% (manual) | None (auto); Storage $1/MTok/hr (manual) | Configurable (manual) | 32,768 (auto) | |
| DeepSeek | Automatic | 75-99% off input | None | Refreshes on hit | – |
| Kimi | Automatic | ~83% off input | None | Refreshes on hit | – |
| MiMo | Automatic | 98-99% off input | None | Refreshes on hit | – |
| MiniMax M2.7 | Auto + Manual | 80% off reads | $0.375/MTok write | Refreshes on hit | – |
| MiniMax M3 | Automatic | 80% off input | None | Refreshes on hit | – |
Cache discounts vary by provider and model. Anthropic and MiniMax M2.7 use manual caching with write costs; all others shown here use automatic caching.

What Breaks Your Cache
Understanding what invalidates the cache is critical. The most overlooked rule: changing the model resets the cache entirely. If you are building a conversation that switches from GPT-5.6 Sol to GPT-5.6 Luna midstream, perhaps to save money on simpler turns, every token must be reprocessed from scratch. Similarly, modifying any part of the cached prefix, even a single character, triggers a full cache miss.
Cache hit rates also vary with timing. Messages sent within a short window of each other have a much higher probability of hitting the cache. Function calls and their responses, which often contain structured, repeated data, are particularly cache-friendly. Conversely, long gaps between requests, longer than the provider’s TTL, mean the cache has expired and you start fresh.
Cache Hit Rate Variability
Even for the same model, cache hit rates can differ depending on which provider is hosting it. For example, Kimi K2.6 hosted directly by Moonshot may have a different cache hit profile than K2.6 hosted through OpenRouter or a third-party provider like DeepInfra. This is because each provider manages its own caching infrastructure, TTL policies, and cache eviction strategies.
Anthropic’s Unique Manual Caching Model
Anthropic’s approach is the most hands-on. You explicitly create a cache with a specified duration, and you are charged a 25% premium on the tokens you write to it. The trade-off is that cache reads receive the steepest discount in the industry: 90% off. This model rewards careful prompt architecture: if you structure your application so that a large, detailed system prompt is reused across many requests, the write surcharge is amortized quickly, and each subsequent call is dramatically cheaper.
Google’s manual caching works similarly but charges for storage rather than writes: $1 per million tokens per hour for stored caches. This makes it more cost-effective for very large contexts that are reused over extended periods. MiniMax M2.7 also uses manual caching, charging $0.375 per million tokens for cache writes and $0.06 for reads.
The distinction between automatic and manual caching is not just academic; it fundamentally changes how you architect your application. With automatic caching (OpenAI, DeepSeek, Kimi, MiMo, MiniMax M3), you get the discount for free but have no control over when the cache expires. With manual caching (Anthropic, Google, MiniMax M2.7), you pay for control, and that control can save you substantially if used correctly.
Tokens Per Second: Why Speed Changes the Real Cost
Cost per token is only half the equation. The other half is how fast those tokens arrive, because speed directly affects user experience, throughput capacity, and the practical economics of your application. A model that costs half as much per token but takes four times as long to respond may cost you more in engineering complexity, timeout handling, and user churn than the per-token savings justify.
The table below shows output tokens per second for every current-generation model, measured through each provider’s first-party API by Artificial Analysis as of July 2026. Where a third-party inference provider hosts the same model significantly faster, the best alternative speed is also shown.
| Provider | Model | 1st-Party Speed (t/s) | Fastest 3rd-Party | 3rd-Party Speed (t/s) |
|---|---|---|---|---|
| OpenAI | GPT-5.6 Luna | 216.4 | – | – |
| OpenAI | GPT-5.6 Terra | 141.1 | – | – |
| OpenAI | GPT-5.6 Sol | 69.2 | Cerebras (planned) | ~750 |
| NVIDIA | Nemotron 3 Ultra | 197.3 | Blackbox AI | 460.4 |
| Alibaba | Qwen 3.7 Max | 196.7 | – | – |
| Zhipu | GLM-5.2 | 195.9 | Blackbox AI | 450.1 |
| Gemini 3.5 Flash | 156.4 | – | – | |
| Gemini 3.1 Pro | 133.5 | – | – | |
| xAI | Grok 4.5 | 119.3 | – | – |
| Muse | Muse Spark 1.1 | 118.7 | – | – |
| MiniMax | MiniMax M3 | 110.9 | SiliconFlow | 112.6 |
| Anthropic | Claude Haiku 4.5 | 102.5 | Amazon | 110.9 |
| DeepSeek | DeepSeek V4 Flash | 101.3 | Makora | 202.3 |
| Anthropic | Claude Sonnet 5 | 79.0 | 84.1 | |
| DeepSeek | DeepSeek V4 Pro | 63.5 | Makora | 218.7 |
| Anthropic | Claude Fable 5 | 59.4 | 59.6 | |
| Anthropic | Claude Opus 4.8 | 56.1 | Fast Mode (~2.5x) | ~140 (est.) |
| Kimi | Kimi K2.5 | 55.7 | Fireworks | 330.3 |
| MiMo | MiMo V2.5 Pro | 50.8 | DeepInfra | 80.9 |
| Kimi | Kimi K2.7 Code | 48.0 | Crusoe (NVFP4) | 431.8 |
| MiMo | MiMo V2.5 | 78.9 | Novita | 83.0 |
| Kimi | Kimi K2.6 | 47.3 | Fireworks (K2.5) | 330.3 |
| MiniMax | MiniMax M2.7 | 47.1 | SambaNova | 442.5 |
Source: Artificial Analysis, accessed July 2026. First-party speeds measured through each model developer’s own API. 3rd-party speeds show the fastest alternative inference provider for the same or comparable model. NVFP4 = 4-bit floating-point quantization; higher speed with minimal quality loss. Grok 4.3 speeds from Amazon (229 t/s), xAI direct (109 t/s), and Azure (97 t/s). MiniMax M2.7-highspeed and Gemini 3.1 Flash-Lite speed data are not published on Artificial Analysis at the time of writing.

Several patterns stand out. First, Google’s Gemini models and OpenAI’s Luna are the speed leaders among proprietary models, with Luna (216 t/s) being the fastest model in the GPT-5.6 family by a wide margin. This makes Luna the best choice for high-throughput applications that still need frontier-level tool compatibility.
Second, third-party hosting can transform a model’s speed profile. DeepSeek V4 Pro generates just 64 t/s on DeepSeek’s own API, but Fireworks AI hosts it at 167 t/s, a 2.6x improvement. Kimi K2.5 goes from 56 t/s on Moonshot’s API to 330 t/s on Fireworks, nearly 6x faster. MiniMax M2.7 jumps from 47 t/s to 443 t/s on SambaNova, a 9.4x improvement. The model you choose matters, but your choice of inference provider can matter just as much.
Third, the GPT-5.6 family demonstrates an inverse relationship between intelligence and speed. Luna (216 t/s) is over 3x faster than Sol (69 t/s), while Terra (141 t/s) sits in the middle. If your workload involves straightforward tasks at high volume, Luna’s speed advantage combined with its $1/$6 pricing makes it an exceptional value proposition.
Fourth, Anthropic’s models are the slowest among frontier providers, with Opus 4.8 at 56 t/s and Fable 5 at 59 t/s. However, their Fast Mode (estimated 2.5x faster) partially addresses this, and Haiku 4.5 at 103 t/s provides a faster option for latency-sensitive Anthropic workloads. Claude Sonnet 5 at 79 t/s occupies a middle ground, being 34% faster than Opus 4.8 while costing 40% less at introductory pricing.
Fifth, quantization is a hidden speed lever. Crusoe achieves 432 t/s on Kimi K2.7 Code using NVFP4 (4-bit) precision, nearly 9x faster than Kimi’s own API. The quality loss from 4-bit quantization is minimal for most tasks, but if your workload demands full precision, verify the quantization level before choosing a provider.
Hidden Costs That Inflate Your API Bill
Headline per-token prices tell an incomplete story. Several less visible factors can add 10% to 50% to your actual costs.
Reasoning Tokens
When you use reasoning models at high effort levels, the model generates internal chain-of-thought tokens before producing its visible response. These reasoning tokens are billed as output tokens, at the full output rate, even though you never see them. A model that produces 5,000 reasoning tokens and 500 visible tokens costs you for 5,500 output tokens. This is why the “max” reasoning setting on GPT-5.6 Sol can produce dramatically higher bills than “low” or “none,” even when the final answer looks identical.
Tokenizer Differences
Not all tokens are created equal. Each provider uses a different tokenizer, which means the same text can produce a different number of tokens depending on which model processes it. A 1,000-word document that costs 1,300 tokens on OpenAI might cost 1,450 tokens on Anthropic or 1,200 on Google. These differences are typically 5% to 15%, but they compound at scale.
Cache Write Costs
Anthropic’s 25% write surcharge, Google’s storage fees, and MiniMax M2.7’s $0.375 write cost mean that even caching, which saves money overall, carries an upfront cost. If your application has a low cache hit rate because prompts vary frequently, you may pay the write premium without recouping it through discounted reads.
Rate Limits and Retry Costs
Every provider imposes rate limits: maximum requests per minute, tokens per minute, or both. Hitting these limits means failed requests, which you either retry (doubling your cost for that request) or queue (adding latency). Higher-tier models often have stricter rate limits than budget models, so your effective throughput may be lower than expected.
Cold Starts and Infrastructure Overhead
When a provider has not served a particular model recently, the first request incurs a cold start delay, the time needed to load the model into GPU memory. While most major providers have minimized this through always-warm infrastructure, smaller providers and newly released models may still experience cold starts. These do not directly cost money but add latency that can affect user experience.
Multi-Modal Input Costs
Token Efficiency: The Model That Costs More Per Token Can Cost Less Overall
A model’s per-token price tells you how much each individual token costs, but it does not tell you how many tokens the model needs to complete a given task. Some models are dramatically more token-efficient than others: they produce shorter, more concise responses that reach the same quality with fewer output tokens, and they may also require fewer input tokens through more efficient reasoning.
This is why comparing models solely on per-token pricing can be misleading. For example, Claude Opus 4.8 uses approximately 35% fewer output tokens than its predecessor to achieve the same benchmark results. GPT-5.6 Sol completes benchmark tasks in 61% less time than Claude Fable 5 while using fewer output tokens per task. A model that costs 2x more per token but uses 3x fewer tokens to complete your specific workload is actually cheaper overall. Token efficiency varies by task type, so the only reliable way to compare total cost is to run your actual workload through both models and measure tokens consumed, not just look at the price sheet.
Output Quality and Task Suitability
Not all models produce equal-quality output, even when they are in the same price tier. A cheaper model that produces more errors, hallucinations, or unusable responses will cost you more in retries, manual review, and lost user trust than the per-token savings justify. For straightforward classification or extraction, a budget model like DeepSeek V4 Flash or MiMo V2.5 may be perfectly adequate. For complex reasoning, code generation, or customer-facing content, the additional cost of Claude Opus 4.8 or GPT-5.6 Sol often pays for itself in accuracy alone. Always test on your specific task before committing to a model based on price.
Images, audio, and video inputs are tokenized differently than text and often at higher effective rates. Gemini 3.1 Pro, for example, charges the text rate for image inputs but a higher rate for audio. Gemini 3.1 Flash Image charges 1,120 tokens per input image regardless of resolution. If your application processes images alongside text, these costs can quickly dominate your bill.
How to Estimate Your Monthly API Spend
Use this formula to budget before committing to a provider:
Monthly Cost = (Daily Requests x Avg Input Tokens x Input Price/MTok / 1,000,000) + (Daily Requests x Avg Output Tokens x Output Price/MTok / 1,000,000) x 30
Example 1: Customer Support Chatbot
500 conversations per day, 800 input tokens on average (system prompt + user message), and 400 output tokens on average. Using Claude Sonnet 5 at introductory pricing ($2/$10):
- Input: 500 x 800 = 400,000 tokens/day = $0.80/day
- Output: 500 x 400 = 200,000 tokens/day = $2.00/day
- Monthly: ($0.80 + $2.00) x 30 = $84/month
With a 60% cache hit rate on the system prompt, input costs drop to approximately $0.32/day, bringing the monthly total to roughly $70/month.
Example 2: High-Volume Document Classification
50,000 documents per day, 200 input tokens on average, 50 output tokens on average. Using GPT-5.6 Luna ($1/$6):
- Input: 50,000 x 200 = 10,000,000 tokens/day = $10/day
- Output: 50,000 x 50 = 2,500,000 tokens/day = $15/day
- Monthly: ($10 + $15) x 30 = $750/month
Switching to DeepSeek V4 Flash ($0.14/$0.28) would reduce this to approximately $63/month, a 12x saving, assuming the quality is sufficient for the classification task.
Example 3: Coding Assistant with Reasoning
200 code-generation requests per day, 3,000 input tokens on average (codebase context), and 1,500 output tokens on average (including reasoning tokens). Using GPT-5.6 Terra ($2.50/$15):
- Input: 200 x 3,000 = 600,000 tokens/day = $1.50/day
- Output: 200 x 1,500 = 300,000 tokens/day = $4.50/day
- Monthly: ($1.50 + $4.50) x 30 = $180/month
Note: If reasoning tokens average 1,000 of the 1,500 output tokens, roughly $120 of the monthly cost is spent on tokens the user never sees. Using the “low” reasoning setting instead of “high” could cut output tokens, and therefore cost, by 30% to 50% with minimal quality impact for many tasks.
Frequently Asked Questions
Which LLM API is the cheapest in 2026?
DeepSeek V4 Flash is the cheapest capable model at $0.14 per million input and $0.28 per million output tokens, roughly 100x cheaper than GPT-5.6 Sol on output. MiMo V2.5 is comparably priced at $0.11 for input and $0.28 for output with a 1M context window. For the absolute lowest cost per request on simple tasks, Google’s Gemini 2.5 Flash-Lite at $0.10 input and $0.40 output is also competitive, especially with its generous free tier.
How much does it cost to use the OpenAI API vs. Claude API?
At the flagship tier, GPT-5.6 Sol ($5/$30) is more expensive than Claude Opus 4.8 ($5/$25), particularly on output where the gap is 20%. At the mid-range, GPT-5.6 Terra ($2.50/$15) and Claude Sonnet 5 ($3/$15 from September) are roughly comparable. At the budget tier, GPT-5.6 Luna ($1/$6) undercuts Claude Haiku 4.5 ($1/$5) on output by $1.
Is DeepSeek really cheaper than OpenAI?
Yes, by a factor of roughly 35x on input and 100x on output when comparing DeepSeek V4 Flash ($0.14/$0.28) to GPT-5.6 Sol ($5/$30). Even when comparing V4 Pro to GPT-5.6 Luna, DeepSeek is about 40% cheaper on output. The quality gap has narrowed significantly; V4 Pro scores competitively on coding benchmarks, but for tasks requiring nuanced reasoning or creative writing, the more expensive models still have an edge.
Does prompt caching work if I change models mid-conversation?
No. Changing the model, even within the same provider or the same model family, resets the cache entirely. Every token must be reprocessed from scratch. If your application switches between models, factor this into your cost calculations and consider whether the savings from using a cheaper model on some turns outweigh the lost cache efficiency.
Are there free LLM APIs?
Yes, but with limitations. Google offers free tiers for most Gemini models through AI Studio, with rate limits and a data usage policy that allows Google to use your inputs for product improvement. OpenRouter provides access to several free models, including DeepSeek R1 and Llama 3.3 70B, at zero cost. NVIDIA NIM API offers a free developer plan for Nemotron 3. These are suitable for prototyping and learning, but production applications typically need paid tiers for reliability and data privacy.
How do I get started with an LLM API?
Each provider requires an account and API key. OpenAI, Anthropic, and Google all offer developer dashboards where you can generate keys and monitor usage. Most providers offer pre-pay or post-pay options depending on your preference. For a step-by-step guide with code snippets for each major provider, see our forthcoming article on getting started with LLM APIs.
What is the difference between highspeed and standard variants?
Several providers, notably MiniMax and Kimi, offer highspeed variants of their models at roughly double the standard price. These variants use the same underlying model but are served with lower latency through prioritized infrastructure or optimized inference paths. MiniMax goes a step further with its Priority tier (1.5x standard pricing), which provides priority admission scheduling for faster response times and improved reliability without the full cost of the highspeed variant. The standard, highspeed, and priority tiers all produce identical-quality responses; you are paying purely for speed.
Should I use the first-party API or a third-party inference provider?
For proprietary models (GPT, Claude, Gemini), you have no choice: only the developer’s API is available. For open-weight models (Kimi, DeepSeek, MiMo, MiniMax, Qwen, Nemotron), third-party providers like Fireworks, Together AI, DeepInfra, and SambaNova often deliver significantly higher throughput at competitive or lower prices. The trade-off is that third-party providers may use lower-precision quantization (FP8, NVFP4) that slightly reduces quality, and their uptime and reliability guarantees may differ from the model developer’s own SLA. For production workloads, test both first-party and top third-party options on your specific task before committing.
Conclusion
The LLM API pricing landscape in mid-2026 offers more choice and a wider cost spread than ever before. The cheapest capable models, DeepSeek V4 Flash and MiMo V2.5, cost less than $0.30 per million output tokens, while the most powerful, GPT-5.6 Sol and Claude Opus 4.8, command $25 to $30 per million. The right choice depends entirely on your workload: classification and extraction can run on budget models at pennies per day, while complex agentic coding and reasoning justify the premium tier.
Four principles should guide your decision-making. First, prompt caching is the single largest cost lever available: a 90% discount on input tokens transforms the economics of any application with a consistent system prompt, but you must understand each provider’s caching model (automatic vs. manual) to capture those savings. Second, the cheapest model is rarely the best value: a model that costs 10x less per token but uses 3x more tokens to complete a task or produces 5x more errors requiring retries may cost you more in total spend, user frustration, and engineering time than the savings justify. Token efficiency and output quality are just as important as per-token pricing. Third, tokens-per-second matters as much as cost-per-token: GPT-5.6 Luna at 216 t/s and $1/$6 will often complete tasks faster and cheaper than a slower model with a lower sticker price. Fourth, your inference provider can matter as much as your model choice: the same open-weight model can run 3x to 9x faster on a dedicated inference provider than on the developer’s own API, transforming both the cost and user experience of your application.
This article will be updated as new models launch and prices change. For deeper dives into specific topics, see our companion articles on why Chinese LLM APIs cost less, the LLM market share landscape, and our forthcoming guides on how to choose between models across providers and code snippets for getting started with each API.
