Rates checked: August 6, 2026. Recheck vendor pricing before publication. Scope: API list-price illustration. Consumer subscriptions and enterprise contracts can be priced differently.
A 100-message conversation with an artificial-intelligence model does not necessarily cost the same as 100 separate questions. The difference is context.
To answer the latest message coherently, an AI service may send some or all of the preceding conversation back to the model. That means earlier words can be processed repeatedly. A paragraph entered near the beginning may be counted again on turn 20, turn 50 and turn 100. The transcript grows linearly, but the cumulative amount of text processed can grow roughly quadratically if every turn resends everything.
Batmandir · Guest Passes Step inside for a day. Guest passes from $161/day — brought in by a member. See guest passes →This is easy to miss because chat interfaces display one continuous thread. Users see the new question and answer; metering systems see input tokens, output tokens, cached tokens, tool calls and sometimes long-context surcharges. A flat monthly subscription may hide that arithmetic from the user, while an API bill exposes it directly.
The result is a reference-worthy rule: when full context grows by a fixed amount on every turn, total uncached input across the conversation grows with the triangular numbers, not just the final transcript length.
A reproducible 100-turn example
Consider an intentionally simple workload. Each turn adds 1,000 input tokens to the conversation history, and the model produces 500 output tokens. Assume the application resends the full accumulated input on every turn and receives no input-cache discount.
The first call contains 1,000 input tokens. The second contains 2,000. The hundredth contains 100,000. Add those calls together:
1,000 × (1 + 2 + ... + 100) = 5,050,000 input tokens.
The transcript added only 100,000 new input tokens, yet the model processed 5.05 million input tokens across the session—50.5 times the newly added text. Outputs total 50,000 tokens.
Anthropic’s published list price for Claude Sonnet 5, rechecked September 18, 2026, was $2 per million input tokens and $10 per million output tokens. At those rates, the illustrative session costs:
- input: 5.05 million × $2 = $10.10;
- output: 0.05 million × $10 = $0.50;
- combined: $10.60.
Now compare a stateless design that sends only the 1,000 new input tokens on each of 100 calls. Its input total is 100,000 tokens, costing $0.20 at the same rate. With identical outputs, its combined cost is $0.70. The long-context version costs about 15 times as much in this deliberately clean illustration.
This is not a prediction of anyone’s actual bill. Real messages vary in length; system prompts and tool results add tokens; applications may summarize history; providers may cache repeated prefixes; and some models charge differently beyond a context threshold. The point is to make the mechanism measurable.
Why the curve bends upward
If each turn adds k tokens and the application sends the whole transcript for n turns, cumulative input is:
k × n(n + 1) / 2.
Doubling the turn count from 50 to 100 does more than double cumulative input. In this example, 50 turns process 1.275 million input tokens; 100 process 5.05 million—nearly four times as much. At 200 turns, the total becomes 20.1 million.
The accompanying chart plots this scenario. It is an arithmetic model, not observed customer billing. Its CSV exposes every assumption so another analyst can substitute different message sizes, output lengths and rates.
Cumulative uncached input grows faster than the transcript
Scenario: every turn adds 1,000 new tokens and resends all earlier input
210,00050 turns
1.275M100 turns
5.05M200 turns
20.1M
*Graphic: Illustrative scenario using published Anthropic API rates; it is not a reconstruction of any individual user’s bill.*
Prompt caching changes the price, not the principle
Providers offer prompt caching because long conversations and stable documents contain large repeated prefixes. Anthropic says Sonnet 5 can provide up to 90% savings through prompt caching. The exact bill still depends on how many tokens qualify as cache reads, how many require cache writes and whether repeated prefixes remain identical.
Caching can dramatically reduce repeated-input charges when the prefix is identical and cache hits actually occur. But “the product supports caching” does not mean every prior token receives the read rate. New suffixes still use the normal input rate. Cache creation has a charge. Changes near the beginning of a prompt can invalidate later cached material. Expiration, routing and application design affect the hit rate.
Therefore a serious cost estimate needs at least four input columns: ordinary input, cache-write input, cache-read input and any long-context input priced under a different tier. Applying the cheapest cache rate to the entire transcript is as misleading as ignoring caching altogether.
Context windows are capacity limits, not free allowances
A model advertised with a large context window can accept a long prompt, but the size of that window does not imply that using it is free. Context capacity answers “Will this request fit?” Pricing answers “What will processing it cost?” Latency and answer quality are separate questions again.
Long conversations can also contain material that is no longer relevant. Resending it consumes tokens and may distract the model. The cheapest engineering decision—discarding old history—can damage continuity, while the most exhaustive decision—resending everything—can inflate cost and noise. Useful systems choose what to retain.
Common approaches include rolling summaries, retrieval of only relevant prior turns, fixed recent-message windows and explicit checkpoints. Each introduces tradeoffs. A summary is cheaper but can omit nuance. Retrieval can miss the needed passage. A recent-message window may forget an early instruction. The correct design depends on whether the conversation is casual support, legal review, coding, research or another task where omissions have different consequences.
Do not confuse API costs with chat subscriptions
The worked example uses published API rates because they allow reproducible arithmetic. A consumer paying a monthly fee for a chat product is not normally billed $10.60 for this one session. Subscription products may impose message limits, dynamically select models, absorb variable inference costs or apply other controls. Enterprise customers may negotiate discounts or capacity arrangements.
Likewise, an API application can add costs not represented here. Web search, code execution, storage, batch processing, fine-tuning and third-party tools may have separate prices. Taxes and currency conversion can matter. Vendor prices can change.
That is why a procurement comparison should not begin with “Which model is cheapest per million tokens?” It should begin with a measured workload.
A 20-minute newsroom measurement
An organization can produce a useful estimate without inspecting employees’ sensitive conversations. Instrument a test account and run a synthetic task representative of the workflow. For each call, record:
- model and date;
- ordinary input and output tokens;
- cache creation and cache read tokens;
- tool calls and their charges;
- latency;
- whether the response completed the task correctly.
Run three variants with identical underlying material: full transcript, rolling summary and retrieval-plus-recent-window. Repeat each variant enough times to distinguish a stable pattern from an outlier. Calculate cost per completed task, not merely cost per call. A cheap response that forces three retries can cost more than an expensive response that works once.
Preserve the prompts, configuration and raw usage records, but remove personal information before publication. Report list prices separately from negotiated rates. If a provider exposes only an aggregate charge and not token categories, say so rather than reverse-engineering false precision.
What people should ask before buying “memory”
AI products increasingly advertise long memory, giant context windows and persistent workspaces. Buyers should ask what gets resent, what gets retrieved, what is summarized, which tokens qualify for caching, when caches expire, and whether usage logs distinguish those categories. They should also ask how deletion works: material retained in a product’s memory or file library may follow a different lifecycle from the visible chat.
The deeper lesson is not that long chats are bad. Continuity is valuable. The lesson is that continuity has an architecture, and architecture has a bill.
A user may experience a single thread. Underneath, the system may be processing the beginning of that thread dozens of times. Once that repetition is counted, the economics stop being mysterious—and teams can decide which context is worth paying to remember.
Sources
- Anthropic, “Introducing Claude Sonnet 5”, including the permanent $2-per-million input and $10-per-million output rates announced in the August 10, 2026 update.
- Anthropic, “Claude Sonnet”, including the prompt-caching savings claim.
- Google AI for Developers, “Gemini Developer API pricing”, useful for applying the same worksheet to another vendor.




