Every "cheap API" comparison I read argues about the price of a token. Almost nobody argues about the price of a finished task, and those are different numbers by roughly an order of magnitude.
Here is one task, measured end to end.
The task and the raw numbers
Task: summarise three fixed pages and return a structured summary. One request, no tools, no retries in the happy path.
Two runs of the identical input on the same endpoint:
| Run 1 | Run 2 | |
|---|---|---|
| prompt tokens | 243,743 | 243,634 |
| completion tokens | few hundred | few hundred |
The reproduction gap between the two runs is 109 tokens, 0.045%. So the prompt side is stable enough to budget against, which is the first thing you want to know before you optimise anything.
The second thing you want to know: the prompt is 99%+ of the bill. If a task costs X, then 0.99 X is the input. Every "which model is cheaper" argument is arguing about the remaining 1%.
Why cost per token is the wrong unit
Cost per token is a price list, not a cost. The cost of a finished task is:
cost(task) = (prompt tokens + output tokens) × price × retry multiplier
Most comparisons publish the first two terms and silently assume the multiplier is 1. It usually is not, and I have measured a case where it is 4.
The retry multiplier you are probably underestimating
A retry is normally budgeted as "two calls instead of one", so 2x. That assumes the failed call was a normal-sized call.
I measured a model returning 1836, 1171, 897, 762 and 1166 completion tokens across five runs against max_tokens 600. Five out of five over the cap, once at three times the cap. On that model, a failed attempt is not one unit of work, it is up to three.
Wrap a retry loop around it and the multiplier is not 2x. It is 1 (the failed attempt's real size) + 1 (the retry) at minimum, and up to 4x when the failure is a truncation at 3x the cap.
Which means two providers with identical list prices can have task costs that differ by the retry multiplier alone.
The three numbers that actually decide the bill
Not price per million. These:
- Prompt tokens per finished task. Measured, not estimated. On this task it was 243,743. That number, multiplied by your price, is most of your bill.
- Retry rate. The probability an attempt fails and has to be repeated. This is where model quality shows up financially, and it is workload-specific.
-
Whether the cap is enforced. This decides the size of a failed attempt. A provider that honours
max_tokensgives you a 2x retry multiplier. One that ignores it can give you 4x.
Price per million enters the calculation exactly once, in term 1, and it is the only term that appears in any pricing table. The other two you have to measure.
What I would do with this
If you are choosing a model on cost, do not compare prices. Run one fixed task five times on each candidate, log prompt tokens, completion tokens and finish_reason per attempt, and compute total tokens spent ÷ number of finished tasks. That single ratio is the only number that compares fairly, because it already contains the retry rate and the cap behaviour.
Five runs of one task is a few cents. It is cheaper than any course, and it turns a price list into a cost.
Caveats
One endpoint, one workload, one day for the 243,743 figure. The cap-overshoot result is from five runs on one model and should be verified on the model you actually use — that takes one call with a low cap and a prompt that wants to be long.
The reproduction gap (0.045%) is not a guarantee for all workloads, only evidence that this prompt construction is deterministic enough to budget against.
Top comments (0)