Inference Cost
The cost of running requests and completing AI tasks
What is Inference Cost?
Inference cost is the cost of processing requests with a trained model. Providers may bill tokens, requests, compute time, or other usage. Input, output, cached data, and tools can have different rates. Cost per completed task includes failed attempts and retries.
How it works
Calculate token costs
The starting rates are fictional and do not represent a model or provider. Enter your contract’s current rates and average usage per request.
- Estimated total cost
- $2.20
- Per request
- $0.0022
$2.20
Total cost
View the exact breakdown
| Item | USD |
|---|---|
| Input tokens | $1.00 |
| Output tokens | $1.20 |
| Total | $2.20 |
Each cost = tokens per request × requests × rate per million ÷ 1,000,000. Only token charges are calculated. Hosting, tools, caching, retries and taxes require their own inputs.
Key takeaways
-
Use the billing unit and rate for each charge.
-
Compare cost per accepted task, including retries and tools.
Illustrative example
At fictional rates of $1 per million input tokens and $4 per million output tokens, 1,000 requests with 1,000 input and 300 output tokens each cost $1 + $1.20 = $2.20 in token charges. These are not provider prices.
Calculate cost per successful task
Add token charges, tool/search calls, hosting, and relevant compute charges within one measured scope. Divide by successfully completed tasks under an acceptance rule, not merely requests sent. Apply cached-input rates only where eligibility is confirmed. Compression, batching, or a cheaper model can reduce charges while harming task quality, so evaluate the combined outcome.
The fictional token-cost calculation
Scroll the table to see every column.
| Charge | Usage and assumed rate | Cost |
|---|---|---|
| Input | 1,000 × 1,000 tokens at $1 per million | $1.00 |
| Output | 1,000 × 300 tokens at $4 per million | $1.20 |
| Token total | Excludes tools, hosting, retries, and other charges | $2.20 |