TokenRate
Guide · Building with AI3 min read

AI API Budget Worksheet: From One Request to a Month

A reusable calculation for monthly spend that includes request volume, input/output mix, growth and retry allowance.

By TokenRate · Published

TL;DR

Budget each feature separately: observed cost per request × expected monthly requests, then add retries, heavy users and non-token charges. Revisit the forecast with real usage each week.

Build the base case

For each feature, write down exact model, median input tokens, median output tokens and requests per active user. Multiply the two token counts by their separate per-million rates. If a feature averages $0.012 per call and sees 20,000 monthly calls, its base text cost is $240.

Add a realistic range

Create low, expected and high cases. In the high case, use a longer conversation or document, more active users and a measured retry allowance. If 10% of calls repeat at the same average cost, the $240 base case becomes roughly $264. A small number of long-context requests may require a separate line rather than one broad multiplier.

Include everything else

Add cache creation/read charges, batch discounts, tools, image or audio usage, storage, taxes and any provider minimums that apply. Include an engineering or review cost when model errors require human effort. Keep these separate from the core token estimate so you can see which lever changes the forecast.

Review the forecast weekly

Compare projected cost with the provider dashboard and the number of successful user actions. If spend rises faster than usage, inspect output length, repeated history, routing changes and retry rate. Use the monthly estimator for a quick scenario; retain this worksheet for the complete budget.

A three-scenario worksheet

Start with 5,000 active users and 4 requests each: 20,000 monthly requests. At an observed $0.012 per request, the expected base is $240. A low case of 12,000 requests at $0.009 is $108. A high case of 35,000 requests at $0.018 is $630. These are different traffic and token-mix assumptions; write them down beside the result. Then add the separately estimated billable categories and taxes. Showing the range prevents a single precise-looking number from being mistaken for a guarantee.

Know when to update the model

Reforecast after a model change, prompt redesign, cache rollout or new feature. Compare the forecast with real spend by feature, not only the account total. If one feature is responsible for a spike, its input length, output cap and retry policy are the first measurements to inspect. For a free tier, estimate the heaviest plausible user separately and set limits around that behavior. A profitable average does not automatically make every account economical.

Primary sources

Frequently Asked Questions

How much buffer should an AI API budget include?

Base the buffer on observed variation in token length, traffic and retries. There is no universal percentage that fits every product.

Try the TokenRate Calculator

Use the TokenRate calculator alongside your provider's usage export to make the calculation reproducible.

Open Calculator →