The application works, and the model provider's monthly usage charge has become a line someone asks about. The usual first answers are "turn on caching" and "use a cheaper model." Both affect the bill. Neither tells the business what it pays for one piece of finished work, and that is the figure worth controlling. The example here is hypothetical: an application reads each incoming supplier agreement against a fixed clause checklist and returns findings that a contracts reviewer accepts or sends back.
One accepted review is the unit to budget
The provider invoices tokens. The business is buying reviewed agreements. Between the two sit every request that was retried, every response that was cut off and every set of findings the reviewer sent back, all of them billed. Anthropic's guide to optimizing Claude for cost and intelligence recommends judging a model by its cost per completed task. Here that is all model spend, failed attempts and reruns included, divided by agreements counted once each, when a reviewer accepts the findings. A cheaper token with more send-backs can raise that figure while the usage dashboard shows a saving. The reviewer's time on rejected findings is outside it and recorded separately.
Cache writes, hits and the cost of one review
Prompt caching lets the provider keep the unchanging front of a prompt, here the instructions, clause checklist and output format, for reuse at a lower rate. The model still reads each agreement and writes new findings, unlike the application response cache in our article on AI inside existing .NET applications, which returns a stored answer without calling the model. Anthropic's pricing page, as listed on November 29, 2026, gives Claude Sonnet 5.5 four relevant direct-API rates in US dollars per million tokens:
- Ordinary input: $2.00
- Writing to the five-minute cache: $2.50
- Reading from the cache, called a cache hit: $0.10
- Output: $10.00
Storing the prefix costs more than sending it plain. The discount arrives only when a later request reads it.
Assume a 6,000-token prefix, a 9,000-token agreement and 800 tokens of findings, with the cache breakpoint at the end of the prefix so the agreement is always ordinary input. Nobody measured those counts, and each figure is the cost of one attempt, accepted or not. Without caching, an attempt costs $0.0380: 15,000 input tokens at $2.00 per million plus 800 output tokens at $10.00. With caching, the attempt that writes the prefix costs $0.0410, more than the uncached one, and one that finds it cached costs $0.0266. Ten attempts as one write and nine hits come to $0.2804, against $0.3800 uncached, with the cost of the one write spread over the nine hits. Ten that each miss and write again would come to $0.4100.
Starting with an empty cache, ten attempts under these exact assumptions fall between the $0.2804 and $0.4100 totals. Repeated misses are an illustration, not a forecast; budget from the mix of writes and hits the usage data shows. A hit is priced at a twentieth of ordinary input, yet the attempt only falls from $0.0380 to $0.0266, because the agreement and the findings are still billed at full rates.
Two things turn hits into writes. The first is time. Anthropic's prompt caching documentation, as fetched on November 29, 2026, gives the cache a five-minute lifetime by default, counted from when the request that wrote or read it began, and each hit refreshes it. Agreements sent back to back can keep refreshing the entry if each request starts inside the lifetime with an identical prefix, the same breakpoint and enough tokens to meet the model's cacheable minimum. A reviewer who uploads one agreement, reads the findings and uploads the next after lunch pays the write rate both times.
The second is a prefix that changes, since a hit requires identical content up to the breakpoint. It follows from those matching rules that a one-off checklist edit requires a new write; subsequent eligible requests can hit the new prefix. Put a per-request timestamp ahead of the breakpoint, or the breakpoint after the agreement text, and no request matches the one before it, a case the documentation's troubleshooting list names. A new agreement after the breakpoint does not invalidate the matching prefix. Nothing fails on a mismatch. Findings come back as usual, and in this example each attempt that writes again costs $0.0410 where the uncached one cost $0.0380.
The evidence is in the usage data on every response: cache_creation_input_tokens counts tokens written and cache_read_input_tokens counts tokens read. An application that does not store both for each attempt cannot say which of the three per-attempt prices it has been paying.
Keep the cached prefix to material every reviewer is allowed to see. The permission check on the agreement runs on every request, hit or write, as in our article on governed search over business data. Anthropic's documentation says caches are isolated per organization.
Other providers differ: OpenAI's September 22, 2026 post on prompt caching for its GPT-6 models describes a 30-minute window. This section is Anthropic's mechanism and list price, so check your provider's pages before reusing the arithmetic.
Does a cheaper model lower the cost of an accepted review?
Sometimes, and the price list cannot say when: whether a lower-priced model's findings are good enough for this checklist is not established until it is tested. Anthropic's cost guide points out that a failed task is billed anyway, the retry is billed too, and the failure then costs something beyond the bill. Here that is a contracts reviewer rereading an agreement because the findings missed an auto-renewal clause, time no provider invoice shows.
Sending rejected reviews to a larger model for a second attempt is reasonable under the condition the same guide attaches: something has to detect the failure, and a check that approves bad findings sends them through. So build the acceptance test before switching. Take agreements the reviewer has already marked up by hand, run the current model and a lower-priced one over them, and count the findings the reviewer would have accepted. Then compare spend per accepted review, send-backs and second attempts included. Choosing a model per request is covered in our article on cost-aware model routing to smaller models.
Limits on agent loops and tool output
Give the application tools, such as a fetch of the exhibits an agreement cites, and the single-request arithmetic stops describing the bill. In a loop that sends the full message history each turn, the model's earlier output and every tool result still in the history are billed again as input, a cost Anthropic's guidance on agent costs also describes. What gets resent is the developer's decision, since history can be trimmed or compacted. Cap the turns, and cap what a tool returns: the exhibit lookup hands back the requested clause with its page reference and any amendment or definition it depends on, or marks the result incomplete.
A cap can lower the bill and make the review wrong: an exhibit cut off before its amendment hands the model a clause that no longer says what the agreement says. For a review that stops at a turn or output limit, we would build checkpoint handling in the application: store the clauses already checked, their locations and the workflow state, and show the reviewer an incomplete status in the queue. That review counts as not accepted. Resuming is an explicit action from that checkpoint with a stated turn budget; the application never restarts the exhausted loop itself. Otherwise a truncated response is recorded as a finished review, and the unread amendment surfaces only when someone relies on the findings.
How IKRC would measure a workflow already in production
We would start with one record per attempt, before changing any setting: the agreement, the model, the four token counts from the usage data (ordinary input, cache write, cache read and output), how the run ended, and whether the reviewer accepted the findings. Grouped by agreement, a few weeks of those records replace this article's assumptions with the business's own numbers: how often the cache is read and how many attempts an accepted review takes. The dollar figures above are illustrative arithmetic on list prices and assumed token counts, and they equal cost per accepted review only on the assumption that every attempt is accepted first time. They leave out tool calls, retrieval, retries, reasoning tokens and staff time, and they forecast nobody's savings.
If nobody can break a production AI application's usage bill down by task, IKRC's AI services can add that per-attempt record and work out the cost of an accepted task from it.