The first message in a support chat is cheap. The fortieth is not, even if the user types the same ten words each time. The reason is how chat APIs are billed: the model does not remember your conversation, so your app sends the history along with every new message. That history is input, input is charged per token, and the charge repeats on every turn. A long chat quietly taxes itself.
This guide explains where that repeated charge comes from and how to reduce it by trimming and summarising history, using the free Prompt Cost Calculator on Ovatly to price the difference. Trimming is work you do in your own app or workflow; the calculator estimates what the change is worth. Its prices come from a snapshot dated November 2026, labeled on the tool: "Snapshot: November 2026. Prices and limits change; verify with the provider before budgeting." Every figure below is that snapshot's example arithmetic, never a live market price.
Contents
- Quick answer
- Why history is input you pay for again and again
- Three ways to trim, and what each one risks
- How to estimate the saving, step by step
- Worked example: pricing a trim before you build it
- Limitations and alternatives
- Common mistakes
- FAQs
- Conclusion
Quick answer
Each turn of a chat sends the history plus the new message as input, so the input cost of a turn grows with the conversation. To cut it: keep fewer old turns, or replace the early turns with a short summary, then measure the result. Paste the full history into the Prompt Cost Calculator and count its input tokens; paste the trimmed version and count again. The difference, at your model's input rate and multiplied by your run count, is the saving. At the snapshot's GPT-4o input rate of $2.50 per 1M tokens, cutting a history from 8,000 tokens to 2,000 saves $0.0150 on every turn.
Why history is input you pay for again and again
A pay-per-token API charges for the tokens in each call: input tokens times the input price, plus output tokens times the output price. In a chat, the input is not just the user's latest message. It is the system prompt, the earlier questions, the earlier replies and the new message, assembled by your app and sent as one input block. Turn ten resends turns one to nine. Turn forty resends turns one to thirty-nine.
Two consequences follow. First, the cost of a conversation is not flat per message; later messages cost more than earlier ones because they carry more history. Second, the history is the one part of the input that grows on its own. Your system prompt is fixed, but the accumulated transcript expands with every exchange until something trims it.
Three ways to trim, and what each one risks
The first way is a hard window: keep only the most recent exchanges and drop the rest. It is simple and predictable, and the risk is amnesia. If the user refers back to something said twenty turns ago, it is gone, and the model will answer as if it never happened.
The second way is summarising. Replace the early part of the conversation with a short summary, and keep recent turns in full. The summary costs tokens too, but a few hundred tokens of summary can stand in for several thousand tokens of transcript. The risk is loss of detail: a summary keeps conclusions and drops wording, so anything that depended on exact phrasing, a quoted error message, a pasted figure, may not survive it.
The third way is selective keeping: retain the turns that carry facts the conversation still needs, such as the original problem statement or the details the user provided, and drop the pleasantries and dead ends. It saves less than a hard window but protects the load-bearing parts.
Whichever route you choose, the trimming itself happens in your app. What the calculator does is tell you, in money, whether the route is worth its risk.
How to estimate the saving, step by step
- Open the Prompt Cost Calculator and choose your model from the snapshot table.
- Paste the full conversation history and click Count input tokens. Note the count.
- Enter the output tokens you expect for a typical reply, and how many runs you want to project over. Click Estimate cost and note the total.
- Replace the pasted text with your trimmed or summarised version, count its input tokens, and estimate again with the same output and run figures.
The gap between the two totals is the saving your trimming buys, at the snapshot rates. Because the output side is unchanged, the whole gap comes from the input side, which makes it a clean measure of the history change. If you do not yet know your typical reply length, measure a similar past reply with the Token Counter first.
Worked example: pricing a trim before you build it
The rates are the tool's own worked example: GPT-4o at the snapshot prices of $2.50 per 1M input tokens and $10.00 per 1M output tokens. (In that example, 1,000 input tokens cost $0.0025 and 500 output tokens cost $0.0050, for a total of $0.0075 per run.)
Now suppose the calculator counts a long support conversation's history at 8,000 input tokens; the counts in this paragraph are illustrative, the rates are the entry's. The history alone costs 8,000 / 1,000,000 x $2.50 = $0.0200 on every turn. Trim it to the recent exchanges plus a summary, count again at 2,000 tokens, and the same line reads 2,000 / 1,000,000 x $2.50 = $0.0050. The saving is $0.0150 per turn. That looks like nothing until the run count goes in: across 1,000 turns it is $15.00, and a busy support bot passes 1,000 turns quickly. Running the estimate takes a minute and settles whether the engineering time for summarising is worth spending.
Limitations and alternatives
The calculator is an estimating tool for planning, never a live quote. Its prices are a snapshot dated November 2026, and providers change prices, so verify with the provider before budgeting. Real bills can differ: providers may add charges for caching, tools, images or minimums, and output length is always a guess until the call is made. The caching point matters here in particular: if your provider charges resent history at a different rate than fresh input, your real saving from trimming will differ from the snapshot arithmetic, in one direction or the other.
Trimming also has a quality limit the calculator cannot see. Cut too deep and the model loses context it needs, answers get worse, and users repeat themselves, which adds turns and gives the saving back. The open-weights Llama entry in the table is a different kind of alternative: it is priced at $0 because you run it yourself, so history costs hardware time rather than per-token charges, a cost this calculator does not estimate.
Common mistakes
- Counting only the new message. The input your app sends is the history plus the new message. Estimate with the full block, or the figure describes a call that never happens.
- Comparing totals with different outputs. Keep the output tokens and run count identical between the before and after estimates, so the gap measures the trim and nothing else.
- Trimming the instructions along with the chat. The system prompt and any standing context are part of the input too, but they are usually the part the model needs most. Trim the transcript, not the instructions, unless you have tested it.
- Judging the saving per turn. Per turn it will look trivial. The run multiplier exists because chats are volume business; judge the monthly figure.
- Summarising once and never again. A summary written at turn ten becomes stale history itself by turn fifty. Plan for the summary to be refreshed as the conversation grows.
FAQs
Are these prices current? They were recorded in the November 2026 snapshot and are labeled as such. Providers change prices, so check the provider's pricing page before committing a budget.
Does the calculator call any API? No. It multiplies your token counts by the snapshot prices in your browser.
How do I know my output token count in advance? You cannot know it exactly. Estimate from similar past replies (the Token Counter can measure one), or set the maximum output your API call allows, to get a worst case.
Why is the open-weights Llama entry priced at $0? Because you run that model yourself. The calculator does not estimate your own hardware or hosting costs, which are your real cost for that route.
Why does trimming history change the input cost? Input cost is input tokens times the input price. The history is part of the input your app sends, so a shorter history is a smaller input token count, and the calculator shows the smaller total as soon as you count the trimmed text.
Conclusion
Conversation history is the rare cost that grows by itself: every turn resends it, and every resend is billed. A window, a summary or selective keeping can hold it down, and the Prompt Cost Calculator turns each option into a per-run and per-thousand-runs figure before you commit engineering time. The other half of the bill is the reply itself, which grows from the output side; that is covered in How Output Length Changes Your Prompt Cost. For more guides like this, see the AI and Prompt Tools guides.