Context budget planner
Enter how many tokens each part of a request uses: system instructions, tool definitions, conversation history, retrieved documents, and the answer you expect. The planner shows how much of each model’s context window that fills, warns when it will not fit, and estimates the cost per request with and without prompt caching.
- Free
- Runs in your browser
- No account
How it works
Context windows and prices come from the PromptFlowEngine model catalog, which records a verification date and a source for each model.
System instructions and tool definitions repeat on every request, so they form a stable prefix that a provider can cache. The planner prices that prefix at the cached-input rate where the catalog has one.
Warnings appear when the parts add up to more than the window, or when too little room is left for the answer.
Limits
- Cache writes can cost more than normal input and caches expire. Real savings depend on how often requests share the same prefix.
- Where the catalog has no cached-input price for a model, the planner says so instead of assuming one.
- Prices are list prices, not an invoice.
Questions
What is a context window?
The context window is the maximum number of tokens a model can read in one request, counting everything: instructions, tool definitions, conversation history, retrieved documents, and the answer it writes.
What happens when a request does not fit?
The provider rejects the request or truncates the input, depending on the API. In practice you have to drop or summarize history, retrieve fewer documents, or choose a model with a larger window.
How does prompt caching reduce cost?
When the start of a request is identical to an earlier one, some providers charge a lower rate for those repeated tokens. Keeping stable content such as instructions and tool definitions at the start of the prompt makes more of the request eligible.
Privacy
This tool runs in your browser. The text, files and numbers you enter are not uploaded, logged or stored on a server, and no account is needed. The site counts that a tool was used, never what was entered. Privacy and security lists everything the site stores and sends.
Use it where you write prompts
The same engine runs in your editor and your browser, so you do not have to come back to this page.
Chrome Extension
Optimize and improve prompts directly inside your browser, in ChatGPT, Claude, Gemini, Grok, Perplexity, and DeepSeek.
Load unpacked
VS Code Extension
Bring PromptFlowEngine prompt optimization directly into your development workflow.
VS Code Marketplace
Keep going
Lesson: Context Engineering
The idea behind this tool, with short videos.
Count the tokens in each part
Measure real files in the PromptOps Lab
LLM Token Counter
Free LLM token counter. See every token, exact counts for OpenAI tokenizers, labelled estimates for other models, and input cost. Runs in your browser.
RAG Chunking Visualizer
Free RAG chunking visualizer. Split your text with nine methods, set chunk size and overlap, see every boundary and token count, and test retrieval.