Skip to content
CostPerPrompt

What a 1M-Token Context Window Actually Costs

Million-token context windows went from party trick to table stakes — 93 of the models we track now offer 400K+ windows, topping out at 1.1M. The marketing says "fit your whole codebase in the prompt." The invoice says something else: the window is free, filling it is not — and most apps refill it far more often than anyone plans for. Live numbers below, updated 2026-08-23.

The price of filling the big windows, once

ModelContextInput /1MFill it onceFill it cached
xAI Grok 4.20 Multi-Agent 2M $1.25 $2.50 $0.4
xAI Grok 4.20 2M $1.25 $2.50 $0.4
DeepSeek DeepSeek V4 Flash 0731 1.3M $0.08 $0.1049 $0.021
Meta Llama 4 Scout 1.3M $0.1 $0.1311
OpenAI GPT-5.5 Pro 1.1M $30.00 $31.50
OpenAI GPT-5.4 Pro 1.1M $30.00 $31.50
OpenAI GPT-5.5 1.1M $5.00 $5.25 $0.525
OpenAI GPT-5.4 1.1M $2.50 $2.63 $0.2625

The spread is the story: a full window costs anywhere from $0.1049 (DeepSeek V4 Flash 0731) to $31.50 (GPT-5.5 Pro) — per request. Estimate what your own documents weigh in tokens with the token counter before you commit to a stuff-everything-in-context architecture.

The multiplier nobody budgets: you refill it every turn

LLM APIs are stateless — each conversation turn re-sends the whole context and bills it again (the mechanics are in how LLM API pricing works). With small prompts that's noise. With 500K tokens of codebase in context, a 20-turn working session on GPT-5.6 Sol is 20 × ~$1.00 ≈ $20.00 of input alone — before the model writes a single line of output. Long context turns the resend mechanic from a rounding error into the bill.

Long context vs RAG: the honest math

The same flagship answering from retrieved snippets (~6,000 tokens) costs ~$0.012 per turn — roughly 83× cheaper than keeping half the window loaded. That gap compounds with every turn and every user, which is why retrieval survived every "RAG is dead" headline. Where long context genuinely earns its price:

Four rules for using big windows without a big bill

  1. Pay for what the task needs, not what the window allows. The window is a ceiling, not a target — trim, summarize old turns, and retrieve where possible.
  2. Cache the immutable bulk. Put documents and code first in the prompt (stable prefix = cacheable), keep the changing conversation at the end — the caching guide covers per-provider TTLs.
  3. Mind the mid-tier trap: some vendors charge a higher input rate above a context threshold — check the model's page before assuming one flat rate.
  4. Re-check prices monthly: long-context pricing is where vendors compete hardest right now — the table above updates daily, and the cheapest-APIs ranking shows who's undercutting whom.

Frequently asked questions

How much does it cost to fill a 1M-token context window once?

It depends entirely on the model's input rate: as of 2026-08-23, filling DeepSeek DeepSeek V4 Flash 0731's 1.3M window costs about $0.1049, while filling OpenAI GPT-5.5 Pro's 1.1M window costs ~$31.50 — per request. The window being available is free; putting tokens in it is what bills.

Do I pay for the full context window even if I don't use it?

No — you pay only for tokens actually sent. A 1M-token window with a 3,000-token prompt bills 3,000 input tokens. The trap is the other direction: tools that automatically stuff the window (full codebases, long histories, "just attach everything" workflows) turn the theoretical maximum into your actual bill.

Is long context cheaper than RAG?

Almost never for repeated use. One flagship turn with ~500K tokens of context in play costs ~$1.00; a RAG setup retrieving the relevant ~6K tokens costs ~$0.012 — an ~83× gap, on every single turn. Long context wins when the task genuinely needs global reasoning over the whole corpus at once (cross-document contradictions, whole-codebase refactors), or for one-shot analyses where building a retrieval pipeline costs more engineering than it saves.

Does prompt caching fix long-context costs?

Largely, for stable context: cached input rates are 75–90% off, so a cached 1M-token prefix re-read costs a tenth of the first read. But caches expire within minutes on most providers, cache writes can bill extra, and anything that changes mid-conversation (growing history) re-bills at full rate. Cache the immutable bulk (documents, codebase), keep the changing parts small.