When to use it

Use this prompt before you launch an AI feature, when someone asks “what will this cost per month?” and you need a number you can defend. It turns request volumes and token counts into a side-by-side estimate for two to four models, with and without caching and batch discounts. It is the planning counterpart to our prompt for auditing your AI API usage, which starts from a bill you already have. If token pricing is new to you, read how AI pricing works first.

How to customize it

  • [WORKLOAD] should name one task. If the feature has several steps, such as classify then summarize, run the prompt once per step or list each step as a separate line of volume.
  • [AVERAGE INPUT AND OUTPUT TOKENS] are best measured, not guessed: run 20 realistic requests through a provider’s tokenizer or playground and take the average. A range, such as 300 to 600 output tokens, gives a more honest high and low estimate.
  • [SHARED PREFIX TOKENS] matters because many providers bill cached input at a lower rate. Count only the part that is truly identical across requests.
  • [PRICES] must come from each provider’s official pricing page on the day you run the estimate, with the URL. Prices change often, and some models charge more above a context-length threshold, so copy that detail too.
  • [REASONING TOKENS]: reasoning models usually bill their hidden thinking as output tokens. If you do not know the amount, say “UNKNOWN” and the model will widen the range.

Why it works

The prompt forbids the model from supplying prices, which is the most common source of wrong estimates: a model’s memory of a price list is often months out of date. Writing out the formula with your numbers makes every figure checkable in a spreadsheet. Separate scenarios for caching and batch processing show how much of the bill depends on engineering choices rather than on the model. The list of excluded costs keeps the estimate from looking more complete than it is, a gap our opinion piece on cheap tokens and expensive agents describes in detail.

Tips and variations

  • Paste the formula from step 2 into a spreadsheet and keep it; rerun it when prices or volumes change instead of asking the model again.
  • Add a self-hosted option as a row with a monthly server cost instead of token prices; our comparison of cloud APIs and local models covers what to include.
  • For agent workloads, multiply the tokens per request by the average number of model calls per task, which is often far higher than one.
  • Treat the cheapest result as a candidate, not a decision. Run a small quality test on your own examples before committing.