Useful for AI, search and metered APIs
Many API products price input and output separately, while others combine unit pricing with per-request fees, minimum monthly commitments, batch discounts, caching discounts or premium latency tiers. Use this calculator for a transparent first estimate before modeling provider-specific details.
Example
If input usage is 1,000 thousand units at $0.005, input cost is $5. If output is 250 thousand units at $0.015, output cost is $3.75 before any request fee.
Common mistakes
Do not combine input and output units when the provider prices them differently. Include retries, failed billable calls and batch/caching discounts when they apply.
How to make the estimate more realistic
Measure a representative sample of requests, split short and long outputs, include retry behavior, and add a safety buffer for failed calls that are still billable. For AI workloads, track average input and output tokens separately because output can be priced differently from input.
Last reviewed: 2026-05-17