---
title: "1M-token context window - when it helps and what it costs"
description: "What fits in 1,048,576 tokens, what it costs on DeepSeek V4.1 Flash, how reasoning and caching change the math, and when RAG is still the better choice."
url: https://broadrouter.com/blog/million-token-context-window-guide/
lang: en
updated: 2026-11-14
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# When a 1M-token context window is worth it (and when not)

By the BroadNet Inference team · 4 min read · Published 2026-11-14

A 1M-token context window lets one request hold a whole codebase, a contract set or hours of transcripts, so the model sees everything at once instead of retrieved fragments. It pays off for cross-file reasoning and one-off analysis; for repeated lookups over a large, changing corpus, retrieval is cheaper. DeepSeek V4.1 Flash and GLM 5.3 accept 1,048,576 tokens.

## Key takeaways

-   DeepSeek V4.1 Flash and GLM 5.3 accept 1,048,576 tokens per request, prompt and answer together.
-   Long context beats retrieval when the answer depends on connections across many files or documents.
-   Retrieval (RAG) still wins for many small lookups over a large, changing corpus.
-   Models use long inputs unevenly. Research shows accuracy drops for facts buried in the middle and as inputs grow.
-   Caching cuts the cost of resending the same long prompt; on an unlimited plan, long prompts cost nothing extra.
-   Leave room for reasoning tokens inside the window.

**On this page**

1.  What fits in a million tokens?
2.  Which BroadNet models have a 1M-token context window?
3.  When is a 1M-token window worth it?
4.  When is retrieval still the better choice?
5.  Does the model really use the whole window?
6.  What does a million-token prompt cost?
7.  How much room should you leave for the answer?
8.  How to prepare a codebase for a 1M-token prompt
9.  Where BroadNet Inference fits

_[image: Light shining through towering cliffs made of stacked paper pages.]_

[Context windows](https://broadrouter.com/glossary/context-window/) have grown from a few thousand tokens to over a million. [DeepSeek V4.1 Flash](https://broadrouter.com/models/deepseek-v4.1-flash/) and [GLM 5.3](https://broadrouter.com/models/glm-5.3/) on BroadNet Inference accept **1,048,576 tokens per request**, prompt and answer together. That changes how you can build, but it doesn’t make every prompt better.

## What fits in a million tokens?

As a rough guide: 1,000 words of English prose came to about 1,290 [tokens](https://broadrouter.com/glossary/token/), averaged across five tokenizers, in our [tokenizer efficiency dataset](https://broadrouter.com/data/tokenizer-efficiency/), so a million tokens is roughly 810,000 words of plain prose:

| Content | Roughly |
| --- | --- |
| A mid-sized codebase (tens of thousands of lines) | Fits, with room to spare |
| Several long contracts with schedules | Fits |
| A day of meeting transcripts | Fits |
| A large monorepo with dependencies | Often doesn’t; select directories |

Token counts depend on language and content. Code and Arabic text often use more tokens per character than English prose. Measure with the `usage` block on a real request rather than estimating, or check a sample in the [context window calculator](https://broadrouter.com/tools/context-window-calculator/).

## Which BroadNet models have a 1M-token context window?

| Model | Context window | Input | Output | Images |
| --- | --- | --- | --- | --- |
| [DeepSeek V4.1 Flash](https://broadrouter.com/models/deepseek-v4.1-flash/) | 1,048,576 | $0.175 | $0.52 | Yes |
| [GLM 5.3](https://broadrouter.com/models/glm-5.3/) | 1,048,576 | $0.78 | $3.46 | No |
| [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/) | 262,144 | $0.175 | $2.17 | Yes |
| [BroadNet Gemma 4 VL 26B](https://broadrouter.com/models/gemma-4-vl-26b/) | 32,768 | $0.10 | $0.22 | Yes |

Prices are per 1M tokens. GLM 5.3 adds tool calling and structured output on the same 1M window.

## When is a 1M-token window worth it?

-   **Cross-file reasoning.** “Why does this test fail?” often depends on five files nobody would think to retrieve together.
-   **Whole-document review.** Finding conflicts between clause 4 and schedule B needs both in view.
-   **One-off analysis.** For a question you’ll ask once, building a retrieval index costs more effort than it saves.
-   **Agents.** A sub-agent that can read the whole module makes fewer wrong guesses. See [running parallel agents](https://broadrouter.com/blog/run-parallel-coding-agents-flat-rate/).

## When is retrieval still the better choice?

Retrieval wins for many small lookups over a library far bigger than any window, for content that changes every minute, and for fast interactive answers where reading a huge prompt first adds delay. Many production systems do both: retrieve the most relevant 200,000 tokens, then let a long-context model reason across all of them. The full decision, with cost per query, latency and recall side by side, is in [long context vs RAG](https://broadrouter.com/blog/long-context-vs-rag/).

## Does the model really use the whole window?

Not evenly. The research is consistent on this:

-   The [Lost in the Middle](https://arxiv.org/abs/2307.03172) paper (Liu et al.) found that performance “is often highest when relevant information occurs at the beginning or end of the input context”.
-   Chroma’s [Context Rot](https://www.trychroma.com/research/context-rot) report tested 18 models and found that “performance grows increasingly unreliable as input length grows”, even on simple tasks.

These studies did not test the models on BroadNet, so treat them as a warning, not a measurement. The practical rule: a window that accepts a million tokens does not mean every token gets equal attention. Put the most important material near the start or the end, and test recall on your own documents.

## What does a million-token prompt cost?

On a [pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/) key, DeepSeek V4.1 Flash bills $0.175 per 1M input tokens and $0.0055 per 1M [cached input tokens](https://broadrouter.com/glossary/cached-input-tokens/). A full million-token prompt costs about $0.175 the first time, and much less on repeat calls when the prefix is cached. [How to raise your cache rate](https://broadrouter.com/blog/cached-input-tokens-explained/).

The [prompt caching calculator](https://broadrouter.com/tools/prompt-caching-calculator/) shows how much a cache hit saves on your own prompt sizes. A worked example: ten questions about the same 800,000-token contract set. Without caching, that is 8M tokens at $0.175 per 1M. If the documents come first and stay identical, the first call reads 800,000 new tokens and the next nine can read most of them from cache at $0.0055 per 1M. Only the question and the answer change.

On an unlimited plan the size of the prompt does not change the bill: Full Moon is $60 a month per session with no token meter. That is why long-context agents are a common reason to choose a [flat plan over per-token billing](https://broadrouter.com/blog/flat-rate-vs-pay-per-token-llm-api/).

## How much room should you leave for the answer?

The window covers prompt **and** output, and on reasoning models the output includes thinking. If you send 1,040,000 tokens of prompt, only about 8,000 remain for [reasoning](https://broadrouter.com/glossary/reasoning-tokens/) and answer. Keep a margin, set [`max_tokens`](https://broadrouter.com/glossary/max-tokens/) explicitly, and read [why reasoning models can return an empty answer](https://broadrouter.com/guides/reasoning-tokens-empty-response/).

## How to prepare a codebase for a 1M-token prompt

1.  **Exclude what the model doesn’t need.** Lock files, build output, vendored dependencies, images and generated code take tokens and add noise.
2.  **Count before you send.** Send a small sample, read `prompt_tokens` from usage, and scale up.
3.  **Order by stability.** Rarely changed files first, the files under edit last, the question at the very end. That keeps the prefix cacheable.
4.  **Label every file.** Wrap files in clear markers such as `=== path/to/file.py ===` so the model can cite them.
5.  **Ask for citations.** “Quote the line you rely on” reduces confident mistakes over huge inputs.
6.  **Measure.** Log prompt tokens, cached tokens and time to first token per request. [Streaming](https://broadrouter.com/guides/streaming-chat-completions/) shows the first token as soon as it arrives.

## Where BroadNet Inference fits

Two of its chat models take 1,048,576 tokens per request, and BroadNet does not trim your context. On a per-token key, caching keeps repeated long prompts affordable; on a plan session, prompt size does not affect the bill. If your corpus is far larger than a million tokens or changes every minute, you still need retrieval, and no window size changes that.

Free tools for this

-   [OpenAI to BroadNet migration helper](https://broadrouter.com/tools/openai-to-broadnet-migration/) Paste OpenAI SDK code; get base URL, key and model edits, a diff and the checks that remain.
-   [max\_tokens calculator for reasoning models](https://broadrouter.com/tools/reasoning-token-budget/) Answer length + reasoning budget + margin = a max\_tokens that does not cut the answer off.
-   [JSON schema generator for LLM structured output](https://broadrouter.com/tools/json-schema-generator/) Sample JSON to strict schema, Pydantic, Zod and a ready request.
-   [LLM JSON output validator](https://broadrouter.com/tools/llm-json-output-validator/) Parse errors by line and column, safe repairs, cut-off detection and JSON Schema checks for model output.

[All free tools](https://broadrouter.com/tools/)

## Terms in this article

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[Context window](https://broadrouter.com/glossary/context-window/)

A context window is the maximum number of tokens a language model can work with in a single request. It covers the prompt, conversation history, tool definitions, images and the generated output, including any reasoning tokens. Anything that does not fit must be cut, summarised or split across several requests.

[Cached input tokens](https://broadrouter.com/glossary/cached-input-tokens/)

Cached input tokens are prompt tokens that an LLM provider has recently processed and can reuse from a cache instead of computing again, usually a repeated prefix such as a system prompt or document. Providers bill them at a lower rate than new input tokens.

[Input and output tokens](https://broadrouter.com/glossary/input-and-output-tokens/)

Input tokens are the tokens a language model reads in a request, including the system prompt, conversation history, tool definitions and images. Output tokens are the tokens it generates in reply, including any reasoning. LLM APIs usually price them separately, and output usually costs more.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Tokenizer](https://broadrouter.com/glossary/tokenizer/)

A tokenizer is the component that converts text into the sequence of integer token IDs a language model reads, and converts generated IDs back into text. Each model ships its own tokenizer, so the same text can produce a different number of tokens on different models.

[Context rot](https://broadrouter.com/glossary/context-rot/)

Context rot is the gradual loss of accuracy and reliability that language models show as their input gets longer, even when the task stays the same and the input is well within the context window. The term was popularised by a 2025 Chroma technical report that tested 18 models.

## Questions

### Does BroadNet trim long prompts?

No. BroadNet does not trim your context. If the prompt plus max\_tokens exceeds the model's window, shorten the prompt rather than relying on silent truncation.

### How many words is 1 million tokens?

It depends on the language and content. English prose measured about 129 tokens per 100 words in BroadRouter's tokenizer dataset (1,000 words came to about 1,290 tokens, averaged across five tokenizers), so 1,048,576 tokens hold roughly 810,000 words, well over a thousand pages. Technical text, code and Arabic need more tokens, so count your real content.

### Is a 1M-token request slow?

It takes longer to start than a short request, because the model must read the whole prompt first. Cached prefixes usually help on repeat calls. Measure time to first token on your own prompts.

### Do LLMs actually use the whole context window?

Not evenly. The Lost in the Middle paper found accuracy is often highest when the relevant information is at the start or end of the input, and Chroma's Context Rot report found reliability falls as input length grows. Put key material at the edges and test on your own data.

### Should I stop using RAG?

Not necessarily. Use long context when the model needs to see everything together, and retrieval when it needs a few facts from a huge library. Many systems combine both.

### What happens if my prompt is bigger than the context window?

BroadNet does not trim it for you, so the request will not run as intended. Remove files, summarise old turns, or retrieve only the relevant parts before you send.

## Keep reading

-   [Cached input tokens: how to cut an LLM API bill](https://broadrouter.com/blog/cached-input-tokens-explained/)
-   [How to run parallel coding agents on a flat-rate LLM API](https://broadrouter.com/blog/run-parallel-coding-agents-flat-rate/)
-   [Flat-rate vs pay-per-token LLM API: the break-even math](https://broadrouter.com/blog/flat-rate-vs-pay-per-token-llm-api/)
-   [A private endpoint starts with a clear workload](https://broadrouter.com/blog/private-endpoint-planning/)
-   [Before fine-tuning: define the problem to solve](https://broadrouter.com/blog/fine-tuning-readiness/)
-   [Guide: Why a reasoning model returns an empty answer](https://broadrouter.com/guides/reasoning-tokens-empty-response/)
-   [Guide: Stream chat completions and handle dropped connections](https://broadrouter.com/guides/streaming-chat-completions/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-million-token-context-window-guide&utm_content=page-cta) ·

**Sources**

-   [BroadNet Inference machine-readable prices and context lengths (pricing.json)](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-million-token-context-window-guide&utm_content=sources)
-   [BroadNet Inference API reference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-million-token-context-window-guide&utm_content=sources)
-   [Liu et al., Lost in the Middle: How Language Models Use Long Contexts (arXiv 2307.03172)](https://arxiv.org/abs/2307.03172)
-   [Chroma, Context Rot: How Increasing Input Tokens Impacts LLM Performance (July 2025)](https://www.trychroma.com/research/context-rot)
