AI API cost glossary
Context window
A context window is the amount of tokenized input and output a model can consider within a request or conversation, subject to provider-specific rules.
Why it matters for API cost
Larger contexts permit more history or documents but increase input usage. Some models also publish a higher pricing tier after a threshold.
Example
Sending an entire document corpus on every request is usually more expensive than retrieving a small set of relevant passages.
Frequently asked questions
Is a larger context window always better?
No. It increases capacity, but cost, latency, retrieval quality, and attention to relevant information still matter.
Related guides
How to Calculate LLM Tokens and Estimate API Cost
Learn how to estimate LLM tokens, convert input and output usage into API cost, and build a realistic monthly AI budget.
OpenOpenAI API Pricing Explained: Tokens, Cache, Batch, and Cost
Understand OpenAI API input, output, cached input, batch, image, audio, and embedding pricing with practical formulas.
Open