An AI agent often sends similar context across several requests: instructions, tool definitions and earlier conversation messages. Prompt caching can reduce the cost of eligible repeated input, but a repeated prompt is not proof that a request received a cache hit.
AtmoRouter's model catalogue marks cache support where available. The actual cached token count in a request's usage report determines the cached portion of the bill. Use Usage logs to check what happened rather than estimating savings from how familiar a prompt looks.
Separate input, cached input and output
For billing, cached input is a subset of input tokens. Do not add it to total input a second time. Output is priced separately and does not become free because some input was cached.
AtmoRouter's documented cached-input billing applies 10% of the input rate to reported cached tokens on supported models. Check the selected model's current rate card and billing documentation before estimating a workload.
textuncached input = total input tokens - cached input tokens
cost = (
uncached input * input price
+ cached input * input price * 0.10
+ output tokens * output price
) / 1,000,000The prices in that formula are dollars per million tokens. Dividing by a thousand instead of a million creates a thousandfold error.
An illustrative request
Suppose a hypothetical model has an input price of $1.00 per million tokens and an output price of $3.00 per million. A request reports 10,000 input tokens, including 8,000 cached tokens, and 500 output tokens.
- Uncached input:
2,000 * $1.00 / 1,000,000 = $0.0020. - Cached input:
8,000 * $0.10 / 1,000,000 = $0.0008. - Output:
500 * $3.00 / 1,000,000 = $0.0015. - Total:
$0.0043.
Without cached input, the same token counts at those illustrative prices would total $0.0115. These are teaching numbers, not a current price quote or a promise of a particular cache-hit rate.
Why an agent may not receive cache hits
Caching behavior depends on the selected model and the service processing the request. Availability, eligibility and reuse are not the same thing. A cache-capable model can still report zero cached tokens for a particular request.
Avoid assuming a universal cache lifetime or a universal minimum prompt size. Check the capabilities and requirements for the model you choose. Changing prompts, client serialization or model selection can also change whether repeated context is reusable.
Keep stable instructions and tool definitions consistent where your application permits it. Preserve the user's actual task, however; removing important context to chase a cache statistic can make the agent less useful and increase the number of turns it needs.
Verify a real workflow
Run a small representative task, then inspect its requests in Usage logs. Compare input, cached input, output and cost across the complete task. Treat a missing cached count as no reported cached usage for your estimate, rather than inventing a discount.
Watch request status too. AtmoRouter distinguishes successful responses, partial streams billed for tokens processed, and failed requests billed at zero. A partially completed task can include real processed tokens even when the agent needs another turn.
Do not equate cache savings with a speed guarantee. Measure latency and effective throughput separately. A lower token bill and a faster first answer are useful outcomes, but they are different measurements.
For a complete agent setup before experimenting with cache behavior, start with Hermes or OpenCode.