Overview
The lowest token price does not necessarily produce the lowest application cost. A model that needs repeated corrections can consume more money and time than a model that completes the same task on its first attempt.
Compare providers using a task your application actually performs. Keep the acceptance rule fixed, include failed attempts in the cost total, and measure how many outputs are usable.
Start with request cost
For a basic text request with rates quoted per million tokens:
request cost =
input tokens �� input rate / 1,000,000
+ output tokens �� output rate / 1,000,000If the provider separately bills cache reads, cache writes or other token categories, calculate those categories using its billing rules. Do not apply the lowest cached-input price to all input tokens.
Use the exact route rate that applies to the request. Prices copied from a model developer's website may differ from a gateway's billable rates. Temporary offers also need an expiry check before you use them in a monthly forecast.
Convert request cost into useful work
Define success before running the comparison. For a support-ticket classifier, success might require a valid category and correct urgency label. For extraction, it might require both a valid schema and accurate field values. A response that parses successfully can still be wrong.
Then calculate:
cost per successful task =
total billed API cost across all attempts
/ number of tasks meeting the acceptance ruleInclude generation retries, repair prompts and rejected outputs in the numerator. If no task passes, report that result directly rather than dividing by zero.
Record reviewer time separately when a human must repair outputs. It is an operating cost even if it does not appear on the API invoice.
Build a small comparison from your own inputs
Select a manageable set of representative, non-sensitive inputs. Include short examples, long examples and the cases that have caused failures in your application. Keep model settings and the acceptance rule consistent where the providers' contracts allow it.
Use a worksheet with these fields:
| Field | What to record |
|---|---|
| Task reference | A local identifier without personal data |
| Route and configuration | The exact model ID and relevant settings |
| Attempts | Original call and any repair calls |
| Billed cost | Confirmed usage cost for every attempt |
| Accepted result | Whether the final output met the fixed rule |
| Completion time | End-to-end time, including retries |
Do not turn a few examples into a universal model ranking. Use the pilot to reject unsuitable routes and identify which ones deserve a larger evaluation.
Forecast from completed tasks
Multiply the observed cost per successful task by a realistic monthly workload range. Keep the low, expected and high workload assumptions visible. Include a separate allowance for evaluation and development traffic.
Recalculate when prompts, conversation lengths or retry policies change. An application that carries a growing conversation history can have a different cost profile from the short prompts used in its first test.
Avoid estimating a universal cost per hour. An hour of idle chat and an hour of continuous agent execution can contain very different numbers of requests.
Compare SmarToken using the same method
Do not assume that a lower displayed rate guarantees a lower cost per accepted result. Run your own task set, review quality and latency, and confirm that the route meets your data requirements.
Choose the route that delivers acceptable work within your budget. Start with one bounded API request [4], then evaluate representative tasks before committing a larger workload.