Guides / cost per prompt version
What is cost per prompt version?
Cost per prompt version is model spend split by which revision of a prompt served each call. Without a version stamped on the call at request time, an edit and the cost change it caused can't be connected afterwards. Culpa, a local-first LLM cost, margin, and forecast ledger, names the prompt version behind every call, so an edit reads as a priced change rather than a mystery.
Why this happens
Prompt edits get reviewed for quality and never for price, because the two live in different places. A reviewer can see that the new version answers better. Nobody in that review can see that it added 1,300 input tokens and 280 output tokens to every call the feature will ever serve. The information needed to connect them has to be captured at the moment of the call, because a version identifier can't be reconstructed from a bill or from a git history after the fact.
What this usually looks like
- Prompt changes ship through review with no cost number attached to them.
- Cost per call moved and the only way to test a suspected prompt is to roll it back in production.
- Two versions of a prompt run concurrently in an experiment and only quality is measured on both arms.
- Nobody can say which prompt version served a call from last Tuesday.
Free, no card, no account
Run the free Cost Leak Scan
It shows your most expensive conversation before you install anything.
Mistakes that cost the most
| Mistake | Why it hurts | Do instead |
|---|---|---|
| Reviewing prompt edits for quality only. | Every added token bills on every call forever, so a quality-only review approves an unpriced increase. | Put token delta and projected monthly cost in the pull request, next to the quality evidence. |
| Storing the prompt text in the log instead of a version identifier. | You end up storing prompt content you didn't need to keep, and grouping by it gets fragile and slow. | Hash or tag the template, log the identifier, and keep the text where it belongs, in version control. |
| Running a prompt experiment without splitting cost by arm. | The winning arm gets chosen on quality alone and its unit cost only surfaces after full rollout. | Report cost per call per arm alongside the quality metric, and decide on both together. |
Run this check tonight
- Pick your highest-volume prompt and find the last three edits to it in version control.
- Count tokens on each of those three versions. The deltas are what you shipped without pricing.
- Multiply the largest delta by last month's call count for that feature. That's the unpriced decision.
- Check whether a call record carries a prompt version identifier. If it doesn't, none of this is answerable.
- For any live prompt experiment, confirm cost per call is reported per arm rather than only in aggregate.
One prompt edit, measured for quality, never for price
Illustrative example
A feature on Gemini 2.5 Pro at real rates of $0.00125 per 1k input and $0.010 per 1k output. Version 4 was replaced by version 5, which added three few-shot examples and asked the model to explain its reasoning. Token counts and call volume are modelled.
The quality gain was measured to two decimal places and the $3,983 wasn't measured at all. Both numbers were available at the same moment, and only one of them was being collected.
Every number, with its confidence and source
| Figure | What it means | Confidence | Source |
|---|---|---|---|
| $0.00465 to $0.009075 | modelled cost per call across two versions of one prompt on Gemini 2.5 Pro | estimated | Both endpoints at real Gemini 2.5 Pro rates per 1k tokens from the price book, effective 2026-07-02. A range because the token counts on each version are modelled. |
| $3,983 | modelled monthly increase produced by a single prompt edit at 900,000 calls | calculated | (900,000 x $0.009075) minus (900,000 x $0.00465), using real Gemini 2.5 Pro rates per 1k tokens. Call volume and token counts are modelled. |
What a generic answer can’t know
A provider bills the tokens it received and has no idea which template produced them. Splitting a month of spend by prompt version needs the version recorded on each call as it happens, inside your application, before the request leaves. Culpa captures it on your infrastructure, keeps your prompts and responses there, and counts the calls to run your plan.
Questions founders ask next
How do I track cost per prompt version?
Attach a version identifier to the template and log it with every call. A hash of the template text works well, because it changes exactly when the prompt does and needs nobody to remember to bump a number.
Can I work out prompt cost after the fact?
Only roughly, by correlating a spend step change with a deploy date. That works when one prompt changed on that day and fails completely when several did, which is why the version has to be captured at call time.
Should prompt cost block a merge?
Not usually block, but it should be visible. Putting the token delta and the projected monthly figure in the pull request turns an invisible increase into a decision somebody makes on purpose, which is all the gate needs to do.
On your infrastructure
Culpa runs on your infrastructure. Your prompts and responses never leave it. Culpa counts calls to run your plan, and it fails open, so if it ever breaks your app keeps running.
How Culpa works
Find the culprit. Not just the total.
Your dashboard shows what you spent. It stops short of who spent it. Culpa shows the conversation, the user and the feature behind it.
Your prompts stay local.
Culpa runs on your own infrastructure. What you send to a model reaches us at no point.
Every dollar has a name.
Follow any charge to the conversation, the user, the feature and the customer behind it.
See the bill before it lands.
Cost your next feature before you ship it. You get the likely bill and the worst case, at best, median, p90 and p99.
Three steps to your first answer.
Change one base URL.
Or drop in the Python or TypeScript library.
Find your most expensive conversation.
In the first session, not the first week.
Cost your next feature before you ship it.
Why the bill went up
Example dashboardCalls traced
418,209
across 3 projects
Spend this week
$378.41
+ $182 vs last week
Failed calls
312
74% retried, and you paid for all of them
+ $182 this week traced to one culprit
Spend over 14 days
Most expensive users
Next week forecast
Graded against reality. Accuracy shown as results land.
Free, no card, no account
Run the free Cost Leak Scan
It shows your most expensive conversation before you install anything.
Keep reading
Sources: Gemini API pricing. Last reviewed 2026-08-01. Plain text version.