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, cross-checked against LLM Price Hub, which transcribes every official provider pricing page into one machine-readable feed. 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. Because rates change monthly, treat this as a snapshot and confirm on the provider page or the live feed before budgeting.
| Provider | Model | Input / MTok | Cached Input / MTok | Output / MTok | Ratio | Context |
|---|---|---|---|---|---|---|
| OpenAI | GPT-6.2 Astra | $8.00 | $0.40 | $40.00 | 5.0x | 272K† |
| OpenAI | GPT-6.2 Sol | $2.00 | $0.10 | $10.00 | 5.0x | 272K† |
| OpenAI | GPT-6.1 Terra | $1.00 | $0.05 | $5.00 | 5.0x | 272K† |
| OpenAI | GPT-6 Luna | $0.10 | $0.01 | $0.50 | 5.0x | 272K† |
| Anthropic | Claude Fable 5.2 | $8.00 | $0.20 | $40.00 | 5.0x | 1M |
| Anthropic | Claude Opus 5.5 | $4.00 | $0.20 | $20.00 | 5.0x | 1M |
| Anthropic | Claude Sonnet 5.5 | $2.00 | $0.10 | $10.00 | 5.0x | 1M |
| Anthropic | Claude Haiku 5.5 | $0.10 | $0.01 | $0.50 | 5.0x | 1M |
| Gemini 4 Neon | $3.00 | $0.15 | $15.00 | 5.0x | 1M | |
| Gemini 4 Carbon* | $2.00 | $0.10 | $10.00 | 5.0x | 1M | |
| Gemini 4 Hydrogen | $1.50 | $0.075 | $7.50 | 5.0x | 1M | |
| Gemini 3.8 Flash* | $0.75 | $0.075 | $3.75 | 5.0x | 1M | |
| Kimi — Moonshot direct | Kimi K3.1 Pro | $2.00 | $0.20 | $10.00 | 5.0x | 1.05M |
| Kimi — Amazon Bedrock | Kimi K3.1 Pro | $4.40 | — | $22.00 | 5.0x | 1.05M |
| Alibaba — Model Studio | Qwen4 Max | $1.50 | $0.075 | $4.50 | 3.0x | 1M |
| Alibaba — Model Studio | Qwen 3.8 Max | $2.00 | $0.25 | $6.00 | 3.0x | 1M |
| Alibaba — Model Studio | Qwen 3.8 Flash | $0.15 | — | $0.47 | 3.1x | 1M |
| Tencent Cloud | Tencent Hy4 | $0.834 | $0.042 | $2.501 | 3.0x | 1M |
| Tencent Cloud | Tencent Hy4 Flash* | $0.07 | $0.003 | $0.281 | 4.0x | 1M |
| DeepSeek | DeepSeek Flash (peak) | $0.30 | $0.006 | $1.20 | 4.0x | 1M |
| Meta | Muse Wonder | $4.00 | $0.20 | $20.00 | 5.0x | 1M |
| Thinking Machines | Inkling 2 Small | $0.30 | $0.03 | $1.00 | 3.3x | 1M |
| DeepSeek | DeepSeek Pro (peak) | $0.66 | $0.022 | $1.98 | 3.0x | 1M |
| Kimi | Kimi K3 (previous gen) | $3.00 | $0.30 | $15.00 | 5.0x | 1.05M |
| MiMo — Xiaomi | MiMo V2.6 Pro | $0.435 | $0.0036 | $0.87 | 2.0x | 1M |
| MiMo — Xiaomi | MiMo V2.6 Flash | $0.14 | $0.0028 | $0.28 | 2.0x | 1M |
| MiniMax | MiniMax M3 | $0.30 | $0.06 | $1.20 | 4.0x | 1M |
| xAI | Grok 4.7 | $2.00 | $0.50 | $6.00 | 3.0x | 500K |
| Z.ai | GLM-5.3 | $1.40 | $0.26 | $4.40 | 3.1x | 1M |
| Z.ai | GLM-5.3 Flash | $0.15 | $0.03 | $0.50 | 3.3x | 1M |
| StepFun | Step 5 Preview | $1.00 | $0.05 | $2.70 | 2.7x | 1M |
| Agnes AI | Agnes 3.0 Flash | $0.05 | $0.005 | $0.15 | 3.0x | 512K |
| NVIDIA | Nemotron 3 Ultra | $0.50 | $0.10 | $2.20 | 4.4x | 1M |
Anthropic cache prices shown are read prices, which vary by model: 0.1x the base input rate for most models, 5% on Claude Opus 5.5 and Sonnet 5.5, and 2.5% on Claude Fable 5.2. Cache writes cost 1.25x (5-minute) or 2x (1-hour) the base input rate. GPT-6 and Claude prices reflect standard short-context tiers; OpenAI long-context rates roughly double. DeepSeek rates shown are off-peak; peak hours (weekday mornings UTC) cost double. Prices checked on 24 November 2026. This is a deliberately short list: each provider carries dozens more models at every price point, and the live feed linked above covers the long tail.
The Shape of the Market
Read the table as a market rather than a list and three things stand out. The first is the sheer range: input prices run from $0.05 to $8 per million, output prices from $0.15 to $40 — an 80x spread on input and a 266x spread on output for models that all claim to be frontier-adjacent. No other input cost in a software stack varies by two orders of magnitude.
The second is that there are two distinct pricing schools, and they are not about capability. OpenAI, Anthropic, Google, Meta and Kimi all price output at almost exactly 5x input. Alibaba, Tencent and DeepSeek price it at 3x. That single ratio tells you more about how a provider expects you to use the model than the absolute numbers do: a 5x spread punishes long outputs and rewards short answers from long prompts, while a 3x spread is far friendlier to output-heavy work like generation and code. If your workload is output-dominated, the 3x providers are structurally cheaper even before comparing headline rates.

The third is the difference between cheap because small and cheap because subsidised, and it is the distinction most price comparisons miss. Hy4 Flash is cheap because Tencent built a 12-billion-active-parameter model and charges accordingly. Inkling 2 Small is cheap because Thinking Machines released open weights and hosts compete to serve them. MiMo V2.6 Flash is cheap because Xiaomi engineered its cache down to almost nothing. None of those prices are going up. Contrast Gemini 4 Carbon, which doubles on 1 December, Gemini 3.8 Flash, which doubles on 1 January, Hy4 Flash’s own 50% launch discount, and Agnes 3.0 Flash’s free period. Those are pricing decisions, not cost structures, and they will revert. Budgeting on a promotional rate is the single most common way to get an AI cost model wrong.
Worth noting too: this generation went the opposite direction to the last one. Both OpenAI and Anthropic cut their flagship prices (Astra from $10 to $8, Fable from $10 to $8), Kimi K3.1 Pro undercuts the K3 it replaces, and even Google’s promotions land below the models they succeed. Note, too, that OpenAI and Anthropic have converged on identical rates at three of four tiers — $8/$40, $2/$10 and $0.10/$0.50 — which suggests the top of the market is being priced to match rather than to undercut. The price war is currently being fought at the top of the market, not the bottom.
OpenAI API Pricing: The GPT-6.2 Family
OpenAI’s current lineup is the GPT-6.2 generation, released on 17 November 2026. It keeps the same four-rung ladder and, unusually, cut the flagship’s price rather than raising it: GPT-6.2 Astra lists at $8 per million input and $40 per million output, below the $10/$50 of the GPT-6 Astra it replaces. Details are on OpenAI’s API pricing page. Every rate below is OpenAI’s short-context rate, which applies to prompts up to 272,000 tokens; longer prompts are billed higher.
GPT-6.2 Astra
Astra is the frontier model, at $8 per million input and $40 per million output with cached input at $0.40. Cache writes are billed separately, at $10 per million for a 30-minute cache or $20 for a 12-hour cache. It is the most expensive model in OpenAI’s catalogue and worth reserving for work that genuinely needs it.
GPT-6.2 Sol
Sol is the workhorse at $2 per million input and $10 per million output, with cached input at $0.10 — a fifth of Astra’s price on every rate, and unchanged from GPT-6.1 Sol. Cache writes are $2.50 for a 30-minute cache or $5 for a 12-hour cache. This is the default for most production workloads.
GPT-6.1 Terra
Terra, released 26 October 2026, sits between Sol and Luna at $1 per million input and $5 per million output, with cached input at $0.05. Cache writes are $1.25 (30-minute) or $2.50 (12-hour). It is the cheaper lane for work that still needs reliable instruction-following.
GPT-6 Luna
Luna is the floor at $0.10 per million input and $0.50 per million output, with cached input at $0.01 — 80 times cheaper than Astra on both input and output. It is the right pick for classification, extraction and high-volume chat.
Key takeaway: the GPT-6.2 and 6.1 models cache at 5% of standard input, while GPT-6 Luna and the older GPT-6 Astra cache at 10%. Caching is automatic, but it only pays off if the model and the conversation prefix stay unchanged, because switching models resets it.
Anthropic API Pricing: Claude Fable, Opus, Sonnet and Haiku
Anthropic’s current lineup runs across four tiers, and it has been moving in the same direction as OpenAI: the newest flagship is cheaper than the one it replaces. Claude Fable 5.2, released 9 November 2026, lists at $8 per million input and $40 per million output, down from Fable 5.1’s $10/$50. Rates are on Anthropic’s pricing page. One caveat applies across the whole range: the newer tokenizer counts roughly 30% more tokens for the same text than the Sonnet 4.6 era, so per-token prices are not directly comparable with older Claude models.
Claude Fable 5.2
Fable 5.2 is the maximum-reasoning model at $8 per million input and $40 per million output. Cache reads cost $0.20 per million, just 2.5% of the input price, and are the cheapest cache reads Anthropic offers. Cache writes are $10 per million for a 5-minute cache or $16 for a 1-hour cache. It shares the 1-million-token context window with the rest of the range.
Claude Opus 5.5
Opus 5.5 is the agentic-coding and knowledge-work tier at $4 per million input and $20 per million output, with cache reads at $0.20 (5%) and cache writes at $5 (5-minute) or $8 (1-hour). Anthropic positions it as performing at Fable 5.1’s level on most work for materially less money, which makes it the better-value flagship for most buyers.
Claude Sonnet 5.5
Sonnet 5.5 is the mid-tier default at $2 per million input and $10 per million output. Its cache-read price was cut from $0.20 to $0.10 per million on 7 October 2026, taking the read discount to 95%, with writes at $2.50 (5-minute) or $4 (1-hour).
Claude Haiku 5.5
Haiku 5.5, launched 7 October 2026, is the cheap tier at $0.10 per million input and $0.50 per million output, with cache reads at $0.01. That rate applies to prompts up to 100,000 tokens; above that it becomes $0.50 input, $0.05 cached and $2.50 output per million. It is the cheapest frontier-lab model in this guide.
Anthropic Prompt Caching: How It Works
Anthropic’s caching is manual, not automatic: you mark which parts of the prompt should be cached and pay for a TTL. Writes cost 1.25x the base input rate for 5 minutes or 2x for 1 hour, and the cache refreshes free on each hit. Read discounts now vary by model rather than being a flat 90% — 2.5% of base input on Fable 5.2, 5% on Opus 5.5 and Sonnet 5.5, and 10% on Haiku 5.5. That spread matters: a long, reused system prompt on Fable 5.2 is dramatically cheaper than the same prompt on Haiku 5.5.
Batch Processing
All Claude models support the Batch API at a 50% discount on both input and output, with results returned asynchronously. For non-real-time work — evaluation runs, extraction pipelines, bulk generation — batching is the largest single lever available.
Google Gemini API Pricing: The Gemini 4 Family
Google shipped four Gemini 4 models between mid-October and mid-November 2026, and its pricing is the most obviously promotional of any major provider. Three of the four are currently discounted, with the discount scheduled to expire. Rates are on Google’s Gemini API pricing page. All Gemini 4 models support a 1-million-token context window and use implicit caching only.
Gemini 4 Neon
Neon is the flagship, generally available since 18 November 2026 at $3 per million input and $15 per million output, with cached input at $0.15. It is paid-tier only and carries the highest price in Google’s catalogue — a third of what OpenAI charges for Astra, and roughly a fifth of Claude Fable 5.2’s input rate.
Gemini 4 Carbon
Carbon sits at $2 per million input and $10 per million output, with cached input at $0.10, but that is a promotional rate through 30 November 2026. From 1 December it doubles to $4 input, $0.20 cached and $20 output. Anyone budgeting on today’s number should plan for the increase.
Gemini 4 Hydrogen
Hydrogen is the value tier at $1.50 per million input and $7.50 per million output, with cached input at $0.075. Generally available since 12 November 2026, it is the only Gemini 4 model with a free tier, which makes it the sensible entry point for testing before committing.
Gemini 3.8 Flash
The previous-generation Flash — still the cheapest capable model Google sells at $0.75 per million input and $3.75 per million output, with cached input at $0.075. Like Carbon, this is promotional: it doubles on 1 January 2027. It is worth noting that Gemini 2.5 Pro, when it retires on 1 December 2026, will route to Gemini 3.8 Flash and bill at these same rates.
Key takeaway: Google’s current prices are unusually time-sensitive. Carbon and 3.8 Flash both double within the next five weeks, so the effective long-run price of Gemini 4 Carbon is $4/$20, not $2/$10. This is the clearest example in the market of a price that is low because the provider is buying share, not because the model is cheap to run.
DeepSeek, Kimi, MiMo and MiniMax: The Chinese Price Floor
Chinese labs undercut Western providers by 5x to 100x, but the more interesting pattern is structural: they price output at roughly 3x input, where the Western labs almost universally price it at 5x. That narrower spread means prompt length matters less to your bill, and it is why Chinese models look disproportionately cheap on output-heavy work. Most use prepaid credits rather than post-pay billing.
Kimi K3.1 Pro (Moonshot)
Kimi K3.1 Pro is $2 per million input and $10 per million output, with cached input at $0.20 and a 1.05-million-token context priced flat with no length tiering. Cache writes are $2 per million for 5 minutes or $4 for one hour, and batch inference bills at 60% of standard. Two comparisons matter here. First, K3.1 Pro is cheaper than the Kimi K3 it replaces ($3/$15), continuing the pattern of flagship price cuts. Second, the same model costs more on Amazon Bedrock, at $4.40 input and $22 output per million, so which endpoint you call changes the price by more than 2x. A highspeed variant runs $4/$20. Moonshot plans to retire the entire K2 series by the end of December 2026.
DeepSeek
DeepSeek bills on a peak/off-peak structure: peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday, and off-peak rates are exactly half. DeepSeek Flash is $0.30 input and $1.20 output per million at peak — $0.15 and $0.60 off-peak — with cache hits at $0.006. DeepSeek Pro is $0.66/$1.98 at peak with cache hits at $0.022. That time-of-day dial is unique among the major providers and is worth exploiting for any workload that can wait: simply scheduling batch jobs outside the peak windows halves the bill.
MiMo (Xiaomi)
MiMo V2.6 Pro is $0.435 per million input and $0.87 output, and MiMo V2.6 Flash is $0.14/$0.28. Their cache-hit prices are the lowest in this guide — $0.0036 and $0.0028 per million, discounts of 99.2% and 98% respectively — which makes them disproportionately strong for agentic workloads that resend a large, stable prefix on every step. Both run a 1-million-token context with automatic caching.
MiniMax
MiniMax M3 is $0.30 per million input and $1.20 output with cached reads at $0.06, across a 1-million-token context. MiniMax is unusual in offering both automatic and explicit caching on the same model, giving developers a choice between convenience and control.
Why the price floor sits here: lower electricity and datacentre costs, aggressive cache compression (MiMo’s near-free cache reads), and an open-weight ecosystem that lets hosts like DeepInfra, Fireworks and Parasail compete on the same model and drive inference margins down. For detail, see our analysis of why Chinese AI models are cheaper than OpenAI and other Western providers.
Mid-Tier and Specialist Providers
Between the frontier labs and the Chinese price floor sits a group of providers competing on a specific axis: reasoning depth, vision, long context, or an unusually low price for a specific workload.
Grok 4.7 (xAI)
Grok 4.7 is $2 per million input and $6 per million output with a 500K context and cached input at $0.50 — matching GPT-6.2 Sol on input and undercutting it on output. Requests of 200,000 prompt tokens or more are billed at double these rates. A fast variant at twice the token price exists but is available only inside Cursor and Grok Build, not the public API.
Muse Wonder (Meta)
Muse Wonder is Meta’s frontier coding and long-running-agent model at $4 per million input and $20 per million output, with cached input at $0.20 and a 1-million-token context. It lands exactly between Claude Opus 5.5 and GPT-6.2 Sol on price. There is also a Muse Wonder Full variant, which is not sold per token at all — it is bundled into a Muse Code subscription from $50 to $200 a month, which is the clearest example in the market of a provider pricing capability by seat rather than by token.
GLM-5.3 (Z.ai)
GLM-5.3 is $1.40 per million input and $4.40 output with cached input at $0.26. Its cheap sibling, GLM-5.3 Flash, is $0.15/$0.50 with cached input at $0.03 and accepts image input, making it one of the few sub-$1 vision-capable models available.
Qwen (Alibaba)
Qwen4 Max is Alibaba’s flagship at $1.50 per million input and $4.50 output with a 1-million-token context and cache reads at $0.075 — a 3:1 output ratio and the lowest input price of any frontier-class model here. Qwen 3.8 Max is $2/$6 and Qwen 3.8 Flash is $0.15/$0.47. Batch calls bill at 50%, and new Model Studio accounts get a million free tokens per model. Be aware that regional endpoints differ: the China (Beijing) deployment is substantially cheaper than Singapore/International, which is the rate quoted throughout this article.
Step 5 Preview (StepFun)
Step 5 Preview is StepFun’s agentic and reasoning model at $1.00 per million input and $2.70 output, with cache hits at $0.05 — a 95% read discount. It carries a 1-million-token context and up to 64K output, and output billing covers both the reasoning trace and the final answer, so the reasoning-effort setting is a direct cost dial.
Inkling 2 Small (Thinking Machines Lab)
Inkling 2 Small is an open-weight mixture-of-experts model — 17 billion active parameters out of 594 billion total — at $0.30 per million input and $1.00 output with a 1-million-token context. Because the weights are open, the same model is served by several hosts at different rates (Prime Intellect at $0.15/$0.50, Together, Cloudflare and Nebius at $0.30/$1.00), which makes it a good illustration of how open weights turn a model into a commodity.
Agnes 3.0 Flash (Agnes AI)
Agnes 3.0 Flash, from Singapore-based Agnes AI, lists at $0.05 per million input and $0.15 output with cached input at $0.005 across a 512K context window and up to 65,536 output tokens per request — and is currently free through the Agnes AI API during a promotional period. For the full breakdown, see how Agnes 3.0 Flash matches DeepSeek V4 Pro for free.
Nemotron 3 Ultra (NVIDIA)
Nemotron 3 Ultra has no per-token plan from NVIDIA itself. It is reached through third parties: OpenRouter at $0.50 input, $0.10 cached and $2.20 output, or NVIDIA’s own NIM API at $0.50/$0.15/$2.50 with a free developer tier. It is a good reminder that for open-weight models the hosting decision is separate from the model decision.
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.
OpenRouter’s catalog rates match provider-published pricing for most major closed-source models: Claude Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5, the GPT-6.2 family, and the Gemini 4 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 frontier-class models at up to 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-97.5% off reads (varies by model) | 1.25x (5-min) or 2x (1-hr) write | 5 min or 1 hr, 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-6.2 Sol to GPT-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 K3.1 Pro hosted directly by Moonshot will have a different cache hit profile than the same model 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 (5 minutes or 1 hour) and pay a write premium of 1.25x or 2x the base input rate. The trade-off is that cache reads are among the cheapest in the industry, falling as low as 2.5% of the input price on Fable 5.2. 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 is deliberately sparse. Throughput figures for the newest models are not yet published by Artificial Analysis or by the vendors themselves, and averaging numbers measured on different endpoints yields a figure that is precise but wrong. Each row therefore names the single source and endpoint it is quoted from, and blank cells are unverified.
| Provider | Model | Output speed (t/s) | Source / endpoint | Checked |
|---|---|---|---|---|
| Alibaba | Qwen 3.8 Max | 68 | OpenRouter — Alibaba international endpoint | Nov 2026 |
| Gemini 4 Neon (high) | 102 | Artificial Analysis | Nov 2026 | |
| Gemini 4 Carbon (high) | 49 | Artificial Analysis | Nov 2026 | |
| Gemini 4 Hydrogen (high) | 176 | Artificial Analysis | Nov 2026 | |
| Gemini 3.8 Flash (high) | 100 | Artificial Analysis | Nov 2026 | |
| OpenAI | GPT-6.2 Astra (max) | 45 | Artificial Analysis | Nov 2026 |
| OpenAI | GPT-6.2 Sol (max) | 64 | Artificial Analysis | Nov 2026 |
| OpenAI | GPT-6.1 Terra (max) | 66 | Artificial Analysis | Nov 2026 |
| OpenAI | GPT-6 Luna (max) | 123 | Artificial Analysis | Nov 2026 |
| Anthropic | Claude Fable 5.2 (max) | 113 | Artificial Analysis | Nov 2026 |
| Anthropic | Claude Opus 5.5 (max) | 116 | Artificial Analysis | Nov 2026 |
| Anthropic | Claude Sonnet 5.5 (max) | 153 | Artificial Analysis | Nov 2026 |
| Anthropic | Claude Haiku 5.5 | 256 | Artificial Analysis | Nov 2026 |
| Kimi | Kimi K3.1 Pro | 36 | Artificial Analysis | Nov 2026 |
| DeepSeek | DeepSeek v4.1 Flash 1017 (max) | 178 | Artificial Analysis | Nov 2026 |
| MiMo | MiMo V2.6 Pro | 38 | Artificial Analysis | Nov 2026 |
| MiMo | MiMo V2.6 Flash | 36 | Artificial Analysis | Nov 2026 |
| MiniMax | MiniMax M3 | 109 | Artificial Analysis | Nov 2026 |
| xAI | Grok 4.7 (xhigh) | 77 | Artificial Analysis | Nov 2026 |
| Z.ai | GLM-5.3 | 74 | Artificial Analysis | Nov 2026 |
| Alibaba | Qwen4 Max | 108 | Artificial Analysis | Nov 2026 |
| Tencent | Tencent Hy4 | 98 | Artificial Analysis | Nov 2026 |
| Tencent | Tencent Hy4 Flash | 96 | OpenRouter — Fireworks endpoint | Nov 2026 |
| Meta | Muse Wonder (max) | 91 | Artificial Analysis | Nov 2026 |
| Thinking Machines | Inkling 2 Small | 102 | Artificial Analysis | Nov 2026 |
| StepFun | Step 5 Preview | 78 | Artificial Analysis | Nov 2026 |
| Agnes AI | Agnes 3.0 Flash | 252.7 | Vendor reported | Sep 2026 |
Speeds measure output tokens per second on the single endpoint or source named in each row; where a model is served by several hosts, the fastest endpoint is quoted and named. One row needs a caveat: Agnes 3.0 Flash’s 252.7 t/s is vendor-reported rather than independently measured, and self-hosted runs of the same open weights on a single GPU land far lower (around 41 t/s at concurrency one). Treat it as a best case, not a typical one.
The pattern that survives is directional rather than numeric. The cheapest models tend to also be the fastest, because both cheapness and speed come from being small, while the flagship reasoning models are consistently the slowest in their own families. Route high-volume, straightforward work to the fast, cheap tier and reserve the slow flagships for genuinely hard problems.
The same open-weight model is often several times faster on a dedicated host such as Fireworks, SambaNova, or Crusoe than on the developer’s own API, so your choice of inference provider can matter as much as your choice of model. Quantization is a related lever: providers using FP8 or NVFP4 (4-bit) precision serve models several times faster with minimal quality loss for most tasks. If your workload needs full precision, check the quantization level first.
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-6.2 Astra 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 cache-write premium (1.25x the base input rate for a 5-minute TTL, 2x for 1 hour), 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
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.
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 5.5 generates output more than 30% faster than its predecessor while using fewer tokens per task, and GPT-6.2 Sol reaches near-Astra results at a fifth of the per-token price with 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 MiMo V2.6 Flash, Qwen 3.8 Flash, or GLM-5.3 Flash may be perfectly adequate. For complex reasoning, code generation, or customer-facing content, the additional cost of Claude Opus 5.5 or GPT-6.2 Astra often pays for itself in accuracy alone. Always test on your specific task before committing to a model based on price.
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.5 ($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-6 Luna ($0.10/$0.50):
- Input: 50,000 x 200 = 10,000,000 tokens/day = $1.00/day
- Output: 50,000 x 50 = 2,500,000 tokens/day = $1.25/day
- Monthly: ($1.00 + $1.25) x 30 = $67.50/month
At these rates, budget and frontier models live in entirely different cost universes. Running the same workload on the flagship GPT-6.2 Astra ($8/$40) would cost roughly $3,600/month, a 53x difference for the identical number of requests.
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-6.2 Sol ($2/$10):
- Input: 200 x 3,000 = 600,000 tokens/day = $1.20/day
- Output: 200 x 1,500 = 300,000 tokens/day = $3.00/day
- Monthly: ($1.20 + $3.00) x 30 = $126/month
Note: If reasoning tokens average 1,000 of the 1,500 output tokens, roughly $60 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?
Agnes 3.0 Flash has the lowest list price of any capable model, at $0.05 input and $0.15 output per million tokens, and it is currently free through the Agnes AI API. Among paid options, MiMo V2.6 Flash ($0.14/$0.28) leads, with Qwen 3.8 Flash ($0.15/$0.47), Tencent Hy4 Flash ($0.07/$0.281) and GLM-5.3 Flash ($0.15/$0.50, with vision) close behind. Google’s free Gemini tier and NVIDIA’s NIM developer plan are also worth trying.
How much does it cost to use the OpenAI API vs. Claude API?
At the flagship tier, GPT-6.2 Astra ($8/$40) and Claude Fable 5.2 ($8/$40) are priced identically — both cut from $10/$50 in this generation. The better value at the top end is Claude Opus 5.5 at $4/$20. At the mid-range, GPT-6.2 Sol ($2/$10) and Claude Sonnet 5.5 ($2/$10) match on both rates. At the budget tier, GPT-6 Luna ($0.10/$0.50) and Claude Haiku 5.5 ($0.10/$0.50) are also exactly level, which is a first: the two labs have converged on identical pricing at every tier.
Is DeepSeek really cheaper than OpenAI?
Yes, though the gap has narrowed. DeepSeek Flash ($0.15/$0.60 off-peak) costs roughly 13x less than GPT-6.2 Sol ($2/$10) on input and 17x less on output, and about 53x and 67x less than the flagship GPT-6.2 Astra ($8/$40). Even the higher-tier DeepSeek Pro ($0.66/$1.98 at peak) undercuts GPT-6.2 Sol on both directions. 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, led by Agnes 3.0 Flash, cost a tiny fraction of the flagships (GPT-6 Astra and Claude Fable 5.1, at $50 per million output tokens). 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-6 Luna at 154 t/s and $0.10/$0.50 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.
