---
title: "Context window"
canonical: "https://router.xark.io/glossary/context-window"
description: "A context window is the maximum number of tokens a model can hold in one request, counting the system prompt, the conversation history."
section: "glossary"
updated: "2026-09-02"
source: "https://router.xark.io/glossary/context-window.md"
---

# Context window

*Also known as: context length, context size, max context.*

A context window is the maximum number of tokens a model can hold in one request, counting the system prompt, the conversation history, any retrieved documents and the reply being generated together.

The window is a hard ceiling on a single request, not a memory. Nothing carries between requests unless the client sends it again, which is why a chat client resends the whole conversation on every turn and why the request grows steadily as the conversation does.

Exceeding the window is an error, not a silent truncation, on any correctly implemented API. That is the behaviour you want: a request quietly trimmed to fit produces an answer based on material the model never saw, and the failure surfaces later as a wrong answer rather than immediately as a rejected request.

Usable context and advertised context are not the same thing. Retrieval accuracy over very long inputs degrades well before the stated limit on most models, so a window figure is a capacity claim rather than a quality claim. Filling one entirely is rarely the best use of it.

Window sizes in this catalogue are quoted in tokens rather than words, and vary by roughly a factor of four between the smallest and largest text models we serve.

## What it costs you

Every token inside the window is billed on every request that carries it, so context is a recurring cost rather than a capability you buy once. A long system prompt is not paid for at the start of a conversation; it is paid for again on each turn. This is also why conversation cost grows faster than message count — with an unbounded history, the tokens sent across a conversation scale with the square of its length, which is the single most common reason a chat application costs several times what its author modelled.

## Worked example

Kimi K3 has a 512K context window — around 393,000 words of English at once. Filling it costs $0.9699 in input on every request that carries it, at $1.85/M.

## Related terms

- [Token](https://router.xark.io/glossary/token.md) — A token is the unit of text a language model reads and writes — roughly four characters of English, or about three quarters of a word — and it is also the unit that every language model API bills by.
- [Prompt caching](https://router.xark.io/glossary/prompt-caching.md) — Prompt caching is the reuse of an already-processed prompt prefix, so that repeated leading tokens — a system prompt, a tool schema, a fixed document — are billed at a reduced cached-input rate instead of the full input rate.
- [Token budget](https://router.xark.io/glossary/token-budget.md) — A token budget is the ceiling an application deliberately puts on how many tokens one request may consume: the output cap sent as max_completion_tokens, and the input cap set by how much history and retrieved context the client is willing to include.
- [Input vs output tokens](https://router.xark.io/glossary/input-vs-output-tokens.md) — Input tokens are the text you send a model and output tokens are the text it writes back; they are billed at separate rates, and the output rate is almost always several times the input rate.

## See also

- [Kimi K3 pricing and context](https://router.xark.io/models/kimi-k3)
- [Chatbots and support: what history costs](https://router.xark.io/use-cases/chatbots-and-support)