Compare cost per accepted result
Key takeaway
Cost per API request tells little if outputs need retries or major editing.
Lessons in this path
How it works
Track model calls, latency, failures and review time. Compare options on the same evaluation set and quality threshold.
Worked example
A cheaper model may handle clear cases. Complex ones use a stronger route or a human reviewer.
How do you calculate cost per accepted result?
An accepted result is an output that is actually used after review: the sent draft, the correctly sorted ticket, the approved summary. Its cost consists of more than the API bill. The formula is simple; the discipline lies in capturing everything.
Cost per accepted result = (model cost + infrastructure + review time × hourly rate + rework × hourly rate) ÷ number of accepted results. Model costs usually arise per token, meaning per piece of text the model reads or writes. Retries after errors count too.
| Item | How to capture | Often overlooked |
|---|---|---|
| Model calls | Provider billing or logs | Retries, long contexts, test runs |
| Infrastructure | Hosting, vector database, workflow tool | Fixed costs at low volume |
| Review time | Timed sample | Reviewer’s context switching |
| Rework | Share of heavily edited results | Errors only noticed by customers |
| Discarded results | “Not used” counter | Do not count in the denominator |
How do you compare two variants fairly?
A fair comparison uses the same evaluation set, the same minimum quality and the same type of review. Otherwise you compare apples with oranges.
- Set the minimum quality, for example “no critical errors, at most minor style edits”.
- Run both variants over the same evaluation set.
- Measure model cost, latency and review minutes per case.
- Count accepted results and calculate cost per accepted result.
- Check latency separately. A cheap but slow model may be unsuitable for live features.
In early start-ups, review time almost always dominates, not the API bill. A variant that saves two minutes of review per case is usually worth more than one that halves model cost.
Going deeper: routing, caching and context length
Three levers lower cost without sacrificing quality. Routing: a simple classifier or small model decides whether a case is simple and can be handled cheaply or goes to a stronger model or a person. Caching: many providers offer prompt caching, where recurring long instructions or documents are processed more cheaply. Context length: less, more carefully selected text in the prompt reduces cost and often improves accuracy.
Each lever needs its own measurement. Routing can misjudge hard cases as easy, so check error classes per route. Specific prices and caching terms change frequently. Always use the provider’s current pricing page for your calculation and recalculate after changes.
Checklist for a reliable cost calculation
Before justifying a model decision with costs, check these points. They prevent the most common distortions that lead small teams to wrong conclusions.
- Both variants ran over the same evaluation set with the same minimum quality.
- Review time was measured, not estimated.
- Retries and discarded results are included in the calculation.
- Prices come from the provider’s current page, with a date.
- Latency and data protection requirements are checked as separate criteria.
Example: cheap model, expensive review
Example (fictional, figures for illustration only): a start-up compares two variants for customer replies on 50 cases. Variant A uses a small model with very low model cost, variant B a larger one at roughly ten times that. A gets 30 accepted results, with four minutes of review on average. B gets 44 accepted, with two minutes of review.
At an internal hourly rate of 60 euros, review for A costs 200 minutes, i.e. 200 euros, for 30 results; for B, 100 minutes, i.e. 100 euros, for 44 results. Even if B costs a few euros more in model fees, it is clearly ahead per accepted result. Next, the team tests routing: simple confirmations via A, everything else via B.
Common mistakes
- Comparing only the API bill.
- Testing variants on different cases.
- Leaving discarded results out of the calculation so costs look too low.
- Using prices from old blog posts instead of the provider’s current page.
Frequently asked questions
Which hourly rate should we use?
An internal fully loaded rate or, for founders, the value of the work that would otherwise be left undone. What matters is using the same rate for all variants.
Is a self-hosted model worth it?
Rarely at an early stage. Operations, updates and quality assurance take time. It can make sense when data protection requirements or very high volume demand it; then use the same formula.
Try it yourself
Calculate the effort needed for ten accepted results in two fictional options.
Check your result
You know why the model choice makes sense for the workflow.