How to use the ai api cost estimator
- Enter requests per day.
- Estimate input and output tokens per request (roughly 750 English words ≈ 1,000 tokens).
- Enter your provider's price per million tokens for input and output — check the provider's current pricing page.
- Set the share of input served from cache and the provider's cache discount.
The formula
Cost/request = InputTokens × InputPrice/1M × (1 − cacheShare × cacheDiscount) + OutputTokens × OutputPrice/1M
Default prices are illustrative placeholders only; vendors change prices often. Always plug in current published rates.
Worked example
2,000 requests a day with 1,200 input and 400 output tokens, at 3 and 15 per million tokens and 30% cached input, works out to a predictable monthly figure — and shows output tokens drive most of the cost.
Tips from the numbers
- Shorter, cacheable system prompts reduce input cost.
- Cap response length; output tokens are usually priced higher.
- Route simple tasks to a smaller, cheaper model.
- Batch non-urgent work where providers offer batch discounts.
Watch: learn the concept
Frequently asked questions
What is a token?
A chunk of text — often part of a word. Providers count both the tokens you send and the tokens generated.
Why are output tokens more expensive?
Generating text requires more computation than reading it, so most providers price output higher.
Does this include hosting or other costs?
No — only model usage. Add servers, storage and staff time for a full budget.