LLM API Pricing 2026: GPT-5.6 vs Claude vs Gemini vs Grok
As of July 16, 2026: DeepSeek V4 Flash is the cheapest frontier LLM API ($0.14/$0.28 per 1M tokens), Claude Sonnet 5 is the best price-to-performance default ($2/$10 intro pricing), and Grok 4.1 Fast has the largest context window (up to 2M tokens). Full provider tables and cost levers below.
The LLM Pricing & Context Window Cheat Sheet
Every major model, side by side — input/output cost, prompt-cache pricing, context window, and what each one is actually for.
Last updated: 16 July 2026: Prices in USD per 1M tokens · standard pay-as-you-go tier, unless noted
Quick Answers
Short, self-contained facts for anyone. Full detail and caveats are in the tables below.
- Cheapest frontier-class model (July 2026): DeepSeek V4 Flash, at $0.14 per 1M input tokens and $0.28 per 1M output tokens, with a 1M-token context window.
- Best price-to-performance default: Claude Sonnet 5, at introductory pricing of $2 per 1M input tokens and $10 per 1M output tokens through 31 August 2026, then $3/$15 standard from 1 September 2026.
- Biggest context window among priced, generally available models: Grok 4.1 Fast (xAI), documented up to 2M tokens; Gemini 3.1 Pro is documented at 1M tokens with some trackers reporting up to 2M.
- Most expensive flagship input rate: GPT-5.6 Sol / GPT-5.5 (OpenAI) and Claude Fable 5 / Mythos 5 (Anthropic) — Fable 5 and Mythos 5 list at $10 input / $50 output per 1M tokens, the highest published rate in this sheet.
- Output tokens cost roughly 4–6× input tokens on almost every provider, so response length is usually the single biggest cost lever in a production application.
- Claude Fable 5 and Claude Mythos 5 access was suspended by Anthropic on 12 June 2026 to comply with U.S. Department of Commerce export controls, and restored on 1 July 2026 after the controls were lifted.
- OpenAI's GPT-5.6 family (Sol, Terra, Luna) reached general availability on 9 July 2026, replacing the prior 'limited preview' status.
How to Read This
All prices are US dollars per one million tokens, on each provider's standard pay-as-you-go API tier, before batch or prompt-cache discounts unless a discounted figure is shown in its own column. "Input" is what you send — your prompt, system instructions, and context. "Output" is what the model generates. Output typically costs 4–6× more than input, so response length is usually your single biggest cost lever. "Cached in" is the discounted rate for input that has already been processed and stored — the highest-leverage saving for stable system prompts or repeated document context. "Context" is the maximum tokens the model can hold in a single request; several providers charge a higher rate once a request crosses a long-context threshold (flagged in each section's notes).
The 60-Second Pick
If you don't want to read the tables, start here. Each row points to where the value sits today for a given job.
| If you need | Reach for | Why |
|---|---|---|
| Best coding / hardest reasoning | Claude Opus 4.8 or GPT-5.6 Sol | Top-tier capability; reserve for genuinely hard tasks where quality pays for itself. |
| A strong all-round default | Claude Sonnet 5 or Gemini 3.5 Flash | The quality-to-cost sweet spot for most production work — coding, RAG, analysis, chat. |
| The cheapest frontier-class model | DeepSeek V4 Flash | $0.14 / $0.28 with a 1M-token window — an order of magnitude below the Western labs. |
| The biggest context window | Grok 4.1 Fast or Gemini 3.1 Pro | Up to 2M tokens (Grok 4.1 Fast; some trackers also report 2M on Gemini 3.1 Pro) — whole codebases, contracts, or books in one call. |
| High-volume classification / routing | Gemini 3.1 Flash-Lite, GPT-5.6 Luna, or Claude Haiku 4.5 | Lowest cost per call; route the easy 90% here and escalate only when needed. |
| EU data residency | Mistral Large 3 | EU-hosted and open-weight — the native choice when GDPR hosting is a hard requirement. |
| Live / real-time web knowledge | Grok 4.5 (xAI) | Native grounding to live X posts — hard to replicate for news and social monitoring. |
OpenAI
| Model | Input $/1M | Output $/1M | Cached in $/1M | Context | Best Fit Use |
|---|---|---|---|---|---|
| GPT-5.6 Luna | $1.00 | $6.00 | $0.10* | 1.05M | New budget tier below Terra; cost-sensitive volume work at GPT-5.6 quality. |
| GPT-5.5 | $5.00 | $30.00 | $0.50 | 1.05M | Flagship reasoning and agentic coding; the hardest tasks. Superseded on paper by Sol. |
| GPT-5.4 | $2.50 | $15.00 | $0.25 | 1.05M | Lower-cost frontier work; a strong production default. Mini: $0.75/$4.50. |
| GPT-5.4 nano | $0.20 | $1.25 | $0.02 | 1.05M | Cheapest GPT-5 tier; routing, extraction, high-volume backend tasks. |
| GPT-5.3-Codex | $1.75 | $14.00 | — | 1.05M | Dedicated coding-agent API flows; still the model referenced for Codex code review. |
| GPT-4.1 | $2.00 | $8.00 | $0.50 | 1M | Long-document processing with a full 1M-token window at lower cost. |
| GPT-4.1 mini | $0.40 | $1.60 | — | 1M | Best value when you need large context cheaply. |
| GPT-4.1 nano | $0.10 | $0.40 | — | 1M | OpenAI's cheapest model; lightweight classification and routing. |
| GPT-4o | $2.50 | $10.00 | — | 128K | Legacy multimodal workhorse; kept for compatibility. |
Notes. GPT-5.6 (Sol, Terra, Luna) reached general availability on 9 July 2026, replacing its earlier limited-preview status; all three share a ~1.05M-token context window and 128K max output. Cached-input figures for GPT-5.6 are the documented 90%-off cache-read rate; explicit cache writes are billed separately at 1.25× standard input. GPT-5.5 Pro lists at $30 input / $180 output. Requests above roughly 272K input tokens on the GPT-5.x family are billed at 2× input and 1.5× output for the entire request — model this threshold separately if your workload routinely exceeds it. Prompt caching (~90% off cached reads on GPT-5.5 and earlier), Batch (50% off, <24h), and Flex modes all apply on top of these rates. Data-residency (regional) endpoints for models released after 5 March 2026 add a 10% uplift.
Anthropic (Claude)
| Model | Input $/1M | Output $/1M | Cached in $/1M | Context | Best Fit Use |
|---|---|---|---|---|---|
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | 1M | Hardest reasoning, agentic coding, high-autonomy work. |
| Claude Sonnet 5 | $2.00 → $3.00 (intro → std) | $10.00 → $15.00 (intro → std) | $0.20 → $0.30 (intro → std) | 1M | New recommended default (launched 30 Jun 2026) — coding, analysis, RAG, customer-facing apps. Intro pricing runs through 31 Aug 2026; standard $3/$15 begins 1 Sep 2026. |
| Claude Sonnet 4.6 | $3.00 | $15.00 | $0.30 | 1M | Predecessor to Sonnet 5; still available for pinned deployments. |
| Claude Haiku 4.5 | $1.00 | $5.00 | $0.10 | 200K | High-volume, latency-sensitive: classification, routing, extraction, moderation. |
Notes. Sonnet 5 uses a newer tokenizer (shared with Opus 4.7+) that produces roughly 1.0–1.35× more tokens than Sonnet 4.6 for the same text; Anthropic set the introductory price so the transition is close to cost-neutral. Opus 4.8 and Sonnet 5 include the full 1M-token window at standard pricing — no long-context surcharge. Batch API is 50% off; cached reads are roughly 90% off standard input. The Mythos-tier Claude Fable 5 and Claude Mythos 5 ($10/$50 per 1M tokens, 1M context) are publicly listed; Anthropic suspended access on 12 June 2026 to comply with U.S. Department of Commerce export controls and restored it on 1 July 2026 after the controls were lifted (details: anthropic.com/news/fable-mythos-access). Legacy Opus 4.1 still lists at $15/$75. Requesting US-only inference adds a 1.1× multiplier.
Google (Gemini)
| Model | Input $/1M | Output $/1M | Cached in $/1M | Context | Best Fit Use |
|---|---|---|---|---|---|
| Google (Gemini) | 2.00 → $4.00 (≤200K → >200K) | $12.00 → $18.00 (≤200K → >200K) | $0.20 | 1M | Flagship reasoning, long-context and multimodal. Price steps up above 200K input tokens. Some trackers report a 2M-token ceiling. |
| Gemini 3.5 Flash | $1.50 | $9.00 | $0.15 | 1M | Google's current default — fast, near-frontier, strong on coding and agentic tasks (launched 19 May 2026). |
| Gemini 3 Flash | $0.50 | $3.00 | — | 1M | Cost-efficient general workloads; prior-generation Flash. |
| Gemini 3.1 Flash-Lite | $0.25 | $1.50 | — | 1M | High-volume budget tier on the current 3.x architecture. |
| Gemini 2.5 Flash-Lite | $0.10 | $0.40 | — | 1M | Cheapest mainstream model; legacy but still widely used. |
Notes. Pro-tier models use tiered pricing: above 200K input tokens, input roughly doubles and output rises about 50%; Flash and Flash-Lite are flat regardless of length. Batch is 50% off; context caching saves up to ~90% (cache storage is billed separately, per token per hour). Pro-tier models became paid-only on 1 April 2026; Flash and Flash-Lite retain a free tier with reduced quotas. Gemini 2.0 Flash and Flash-Lite were shut down on 1 June 2026 — migrate off those model IDs.
DeepSeek
| Model | Input $/1M | Output $/1M | Cached in $/1M | Context | Best Fit Use |
|---|---|---|---|---|---|
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.003 | 1M | Cheapest frontier-class API — chat, extraction, summarization, most coding. |
| DeepSeek V4 Pro | $0.435 | $0.87 | $0.004 | 1M | Hard reasoning and flagship-quality code at a fraction of Western pricing. |
Notes. Both V4 models ship with a 1M-token window and up to 384K max output, and cache automatically — no cache-control headers or minimum TTL to manage. V4 Pro's standard list price is higher ($1.74/$3.48); the $0.435/$0.87 shown reflects a promotional discount that DeepSeek has kept in place since Q2 2026. Open weights under MIT. Models are China-hosted — weigh data-residency and operational-maturity trade-offs. Legacy aliases deepseek-chat / deepseek-reasoner retire 24 July 2026; migrate to the deepseek-v4-flash / deepseek-v4-pro model IDs before then. Unconfirmed community reports suggest a peak/off-peak pricing scheme (roughly 2× during Beijing business hours) may be introduced for V4 — this is not yet on DeepSeek's official pricing page, so treat it as a rumor until confirmed.
xAI (Grok)
| Model | Input $/1M | Output $/1M | Cached in $/1M | Context | Best Fit Use |
|---|---|---|---|---|---|
| Grok 4.5 | $2.00 | $6.00 | $0.50 | 500K | New flagship (launched 8 Jul 2026); hardest reasoning and agentic coding, trained on real coding-agent data. |
| Grok 4.3 | $1.25 | $2.50 | $0.20 | 1M | Best Grok quality-to-cost ratio; bigger context window than Grok 4.5 at a lower rate. |
| Grok 4.1 Fast | $0.20 | $0.50 | ~$0.05 | Up to 2M | Cheapest frontier-adjacent Grok model; high-volume work and very long documents. |
Notes. xAI's lineup has moved fast in 2026: Grok 4.5 became the flagship on 8 July 2026, while several older IDs (Grok 4, Grok 4 Fast, Grok 4.1, the original Grok 4.20 family) have been retired or superseded — confirm the current SKU on docs.x.ai before budgeting. Real-time grounding to live X posts remains Grok's differentiator. Built-in tools bill separately from tokens: Web Search, X Search, and Code Execution are $5 per 1,000 calls; File Attachments are $10 per 1,000 calls. A documented Batch discount (roughly 20–50% depending on model) applies to asynchronous jobs.
Mistral
| Model | Input $/1M | Output $/1M | Cached in $/1M | Context | Best Fit Use |
|---|---|---|---|---|---|
| Mistral Large 3 | $0.50 | $1.50 | — | ~256K | EU-hosted frontier-class value; undercuts GPT-5.4 and Claude Sonnet heavily on output. |
| Mistral Small 4 | $0.15 | $0.60 | — | ~128K | High-throughput classification, extraction, and chat. |
| Magistral Medium | $2.00 | $5.00 | — | 128K | Reasoning line (chain-of-thought) for math, logic, multi-step problems. |
| Ministral 3B | $0.10 | $0.10 | — | 128K | Cheapest option; edge and on-device deployment. |
Notes. Mistral's headline draw is EU data residency plus open weights on several models. Third-party trackers currently disagree on exact figures for this lineup — some list Mistral Large 3 at $0.50/$1.50 with ~256K–262K context, others cite older or example figures from mistral.ai's own pricing page; confirm the live rate at mistral.ai/pricing before committing a budget. No prompt-caching discount is documented as of mid-2026; Batch is 50% off on most models.
Open-Weight Models Via Hosts
Meta's Llama 4, Alibaba's Qwen 3, and a growing field of open-weight models don't have a single canonical price — their cost depends on who hosts them. Managed providers such as Together, Groq, Fireworks, and Novita serve them at variable per-token rates (often roughly $0.10–$1.00 per 1M tokens depending on model size), and you can self-host on your own GPUs. Self-hosting flips the economics: you pay a fixed hourly GPU rate regardless of volume, so it only beats the API once you keep the hardware saturated — typically tens of millions of tokens per day — in exchange for control, privacy, and no per-token bill.
The Levers that Actually Move Your Bill
The rate card is only the starting point. These are the controls that change the effective price, roughly in order of impact.
| Lever | What it Does | Typical Effect |
|---|---|---|
| Model routing | Send the easy 90% of traffic to a nano / mini / Flash-Lite / Haiku tier and reserve flagships for hard tasks. | 5–25× spread |
| Control output length | Output costs ~4–6× input. Cap max tokens, ask for concision, and prefer structured formats. | Often the #1 cost lever |
| Prompt caching | Reuse a stable system prompt / document prefix so repeated input is billed at the cached rate. | ~90% off cached input |
| Batch API | Run non-urgent jobs asynchronously (within 24h) on OpenAI, Anthropic, Google, xAI, or Mistral. | ~50% off |
| Mind context tiers | Gemini Pro and the GPT-5.x family charge more above ~200K–272K tokens. Trim retrieval and stay under the line. | Avoids the long-context rate jump |
| Watch reasoning tokens | Reasoning / "thinking" models bill hidden internal tokens, so real cost exceeds the visible rate. | Can multiply output cost |
| Default to global routing | Region-locked or data-residency endpoints add a premium (e.g. ~10% on OpenAI, 1.1× on Anthropic). | ~10% surcharge avoided |
Frequently Asked Questions
Q1: What is the cheapest LLM API in July 2026?
DeepSeek V4 Flash is the cheapest frontier-class model, at $0.14 per 1M input tokens and $0.28 per 1M output tokens, with cached input as low as $0.003 per 1M tokens. Among the largest Western labs, GPT-4.1 nano ($0.10/$0.40) and Gemini 2.5 Flash-Lite ($0.10/$0.40) are the lowest-priced options.
Q2: Which AI model has the biggest context window?
Grok 4.1 Fast from xAI is documented at up to 2M tokens. Gemini 3.1 Pro is officially listed at 1M tokens, though some third-party trackers report a 2M-token ceiling. Most current flagship models from OpenAI, Anthropic, Google, and DeepSeek now ship a 1M-token window as standard.
Q3: Is Claude Sonnet 5 cheaper than GPT-5.6?
Yes, during the introductory period. Claude Sonnet 5 costs $2/$10 per 1M input/output tokens through 31 August 2026, versus GPT-5.6 Terra at $2.50/$15. After Sonnet 5 moves to standard pricing on 1 September 2026 ($3/$15), it becomes slightly more expensive than Terra on output.
Q4: What happened to Claude Fable 5 and Claude Mythos 5?
Anthropic released both models on 9 June 2026, then suspended access on 12 June 2026 to comply with U.S. Department of Commerce export controls. The Department lifted those controls on 30 June 2026, and Anthropic restored access on 1 July 2026. Both models are billed at $10 input / $50 output per 1M tokens.
Q5: How much does prompt caching actually save?
Roughly 90% off the standard input rate on most providers (OpenAI, Anthropic, Google, DeepSeek) for tokens that hit the cache. DeepSeek's cache-hit rate is the most aggressive of the major providers, at about 98% off standard input. Some providers (Google, Grok) also bill a separate storage fee for cached content, charged per token per hour.
Q6: Which provider is the default choice for EU data residency?
Mistral AI, a Paris-based provider offering EU-hosted inference and open-weight models, is the most commonly cited default for GDPR-driven hosting requirements. OpenAI, Anthropic, and Google also offer regional/data-residency endpoints, typically at a 10% price premium over global endpoints.
Methodology & a Word of Caution
Figures here were compiled and cross-checked on 16 July 2026 from each provider's official pricing and model documentation, alongside multiple independent price trackers. They are standard-tier, pay-as-you-go rates in USD per 1M tokens, before batch or caching discounts unless a discounted column says otherwise. This is the part of the AI stack that changes fastest: model names, per-token prices, context windows, and free-tier rules can shift within days. Where the public record currently disagrees — the Gemini Pro context ceiling, the current xAI flagship SKU, DeepSeek's rumored peak/off-peak pricing, and Mistral's on-page example figures versus third-party trackers — the notes above flag it. Always confirm against the official page before committing a budget or a contract.
Official Pricing Sources
OpenAI — https://platform.openai.com/docs/pricing
Anthropic — https://platform.claude.com/docs/en/about-claude/pricing
Google Gemini — https://ai.google.dev/gemini-api/docs/pricing
DeepSeek — https://api-docs.deepseek.com/quick_start/pricing
xAI (Grok) — https://docs.x.ai/docs/models
Mistral — https://mistral.ai/pricing