Prompt Diff and Cost Delta
Diff two prompts line by line and price the difference per call, per million calls and per month.
72.9% larger than A. At 200,000 calls a month that is $21.00 more on the input side.
- A
- 200 chars · 6 lines · ~48 tokens
- B
- 355 chars · 8 lines · ~83 tokens
- Lines added / removed
- 4 / 2
- Cost per call, A
- $0.00014
- Cost per call, B
- $0.00025
- Difference per 1M calls
- +$105.02
- Difference at 200,000 calls/month
- +$21.00 per month
usage object on an actual API response: that is what you are billed on, and it includes chat-template wrapping this model cannot see. The comparison is on input tokens only. A longer prompt that produces a shorter answer can easily be cheaper overall, because output is usually billed at a multiple of input and this page cannot see your outputs. The diff is line-based, so a reworded sentence shows as one line removed and one added rather than as a few changed words.Line diff — red left A, green arrived in B
− You are a research assistant.+ You are a research assistant working for a policy team.− Summarise the document below in five bullet points. Each bullet must be a complete sentence. Do not include anything that is not in the document.+ Summarise the document below in five bullet points. Each bullet must be a complete sentence and must name the section it came from. Do not include anything that is not in the document. If the document contradicts itself, say so in a sixth bullet.+ Answer in British English.+Document:{{document}}
What an edit to a prompt costs, before you ship it
Prompt changes are reviewed like copy and billed like infrastructure. Adding two clarifying sentences and a formatting rule is thirty seconds’ work and reads as free; at half a million calls a month it is a recurring line on an invoice that nobody will trace back to that pull request six months later. The last row is the number worth putting in the review: the monthly difference, at your own volume and your own rate.
The diff is there because the total on its own is misleading in a specific way. Two prompts can be the same length and differ completely, and a version that is 40 tokens shorter can have lost the one instruction that kept the output to three bullets — which, at output rates several times the input rate, makes the cheaper prompt the more expensive one. Read the green and red lines, then read the totals.
There is a second reason to look at where the changes landed. If the edits are near the top of the prompt, they invalidate everything downstream for prompt caching: caches match on a prefix, so a change in line two means nothing after line two can be reused, however stable it is. The same edit made at the bottom of the prompt costs the same tokens and none of the cache. If you are caching, moving edits downwards is often worth more than making them smaller.