Estimate the cost of an AI feature
Estimates monthly API costs for an AI feature from expected usage and token prices, and shows which levers reduce cost most.
Help me estimate the monthly cost of an AI feature.
Feature: {{FEATURE}}
Expected usage (users, requests per user, peak times): {{USAGE}}
Model prices I am considering (per million input and output tokens): {{PRICING}}
1. Estimate tokens per request: system prompt, user input, retrieved context, and output. Show your assumptions.
2. Calculate monthly cost for each model, as a table.
3. Show how cost changes with: prompt caching, a lower max output tokens limit, a smaller model for easy requests, and batching where latency does not matter.
4. Flag the assumption that most affects the total.
Show your maths so I can check it. Round to sensible numbers.Example output
Per request: 2,500 input + 400 output tokens. Monthly: 300k requests, about $1,140 at listed prices. With caching on the 2,000-token system prompt: about $610. Biggest lever: caching, then a smaller model for simple requests.
How to use
Copy current prices from each provider's pricing page into PRICING; they change often. Measure real token counts from a prototype as soon as you can and rerun the estimate.
Why it works
Breaking a request into its token parts shows where cost actually comes from, which is often the repeated system prompt or retrieved documents. Showing the maths lets you check the numbers, since models can make arithmetic slips.