One user task can become many model requests
A normal chat may stop after one response. An agent can repeatedly ask the model what to do next, execute tools, return their results, and continue until it can answer.
Each request can resend the conversation so far
The request context includes retained instructions, user messages, model outputs, tool arguments, and tool results. New content is appended as the run proceeds, so later requests are usually larger than earlier ones.
This is why total input tokens can grow faster than the number of turns. Prompt caching can reduce the price of a reused prefix, but it does not mean the reused tokens disappear from the request.
Prompt tokens are assigned to explicit billing categories
For every simulated request, prompt context is partitioned without double counting.
Fresh input, cache read and cache write add up to the request's input context; its newly generated output is billed separately.
Fresh input
Prompt tokens billed at the ordinary input rate, including cache misses when no separate write meter exists.
Cache read
A reused prompt prefix billed at the provider's cache-hit or cache-read rate.
Cache write
New cacheable prompt tokens billed through a separate cache-creation meter when the rate card defines one.
Output + reasoning
Model-generated tokens billed at the output rate, including reasoning tokens represented by the workload assumptions.
Cache misses are not billed the same way by every provider
Explicit cache-write meter
A hit becomes Cache read. A new cacheable prefix can become Cache write. Claude and OpenAI models with published cache-write meters are modeled this way.
Automatic cache, no write meter
A hit becomes Cache read. A miss remains Fresh input. This covers DeepSeek, Gemini implicit caching, and the Qwen implicit-cache offerings in the calculator.
Parallel tool calls share one model response
If a model emits several tool calls together, the simulator treats them as one model request and one tool batch. Their results are combined before the next model request.
Model requests per user turn
Round up to complete tool batches, then add the final reply. Compaction requests are counted separately.
For example, four tool actions with a parallelism of two produce two tool batches plus one final-response request: three model requests for that user turn.
Long runs can summarize and replace history
When retained context reaches the configured share of the model context window, the engine simulates a compaction request. It creates a summary, replaces older retained content, and resets or reduces the reusable cache prefix.
The compaction request itself has input and output cost. The following request then bills the compacted context according to the selected provider's cache model.
Compaction does not make an oversized request executable. If a request, including a compaction request, exceeds the configured input budget, the calculator asks you to reduce the fixed input or tool-result sizes.
Request costs roll up to a run and then a month
1. Price each request
Add fresh input, cache read, cache write, and output including reasoning. Each request uses its applicable pricing tier.
2. Add the requests in a run
R includes every model request, including any context compaction.
3. Scale to a month
Rates are normalized to price per million tokens. Catalogue presets can contain provider-specific context windows and cache rules; custom pricing uses the flat rates entered in the calculator.
What the estimate does not claim
Generic agent approximation
Token sizes and tool cycles are representative inputs, not a replay of a proprietary agent framework.
No automatic retry model
Rate-limit waits, failed requests, exponential backoff, and retries are not added unless represented in the workload.
Single-model execution
Planning, tool use, compaction, and replies use one selected model rather than a multi-model router.
Approximate cache behavior
The engine models eligible prefix reuse deterministically; actual provider cache persistence and matching can vary.
Flat custom rates
Custom rates do not add long-context tiers, regional premiums, batch discounts, or time-based pricing bands.
Text-token API costs only
The listed rates apply to text input and generated text or reasoning, not image, audio, or video-specific meters.
Other service charges excluded
External tool APIs, hosting, grounding, and token-hour storage for explicit Gemini caches are outside this token-cost estimate.
Estimate, not an invoice
Actual usage depends on tokenizer behavior, retrieved content, model decisions, rounding rules, and current vendor pricing.
Official pricing and cache documentation
- OpenAI: API pricing · prompt caching
- Claude: API pricing · prompt caching
- Gemini: API pricing · implicit and explicit caching
- Qwen: API pricing by market · cache modes
- DeepSeek: API pricing · context caching
- GLM: Z.AI pricing · cache accounting
- Kimi: API pricing · prefix caching