LLM API Cost Budgeter
Build an auditable cost model. State assumptions and separate catalog prices from measured bills.
Workflow
-
Collect model IDs, input/output price per million tokens, cached-token pricing, per-request fees, and currency.
-
Use P50 and P95 input/output tokens rather than one average when distributions are skewed.
-
Calculate base monthly cost per model:
requests * ((input_tokens / 1M) * input_price + (output_tokens / 1M) * output_price) -
Add retry amplification, tool-call subrequests, reasoning tokens, search/media fees, and provider markup.
-
Subtract only verified cache savings; show the assumed hit rate.
-
Produce low/base/high scenarios for traffic growth and token inflation.
-
Calculate cost per request, successful task, active user, and business outcome when data exists.
-
Set warning and critical thresholds below the hard account limit.
Output
Return an assumptions table, monthly model, low/base/high forecast, top three cost drivers, and concrete controls. Flag missing price fields rather than treating them as zero. Never expose API keys or billing identifiers.
Recommend measurement changes when estimates lack actual token and retry telemetry.
Scan to join WeChat group