Back to skills
extension
Category: Data & AnalyticsNo API key required

LLM API 成本预算器

根据请求量、Token、重试、缓存和增长情景预测大模型成本,给出预算区间、单位经济性和告警阈值。

personAuthor: user_b26bd65ehubcommunity

LLM API Cost Budgeter

Build an auditable cost model. State assumptions and separate catalog prices from measured bills.

Workflow

  1. Collect model IDs, input/output price per million tokens, cached-token pricing, per-request fees, and currency.

  2. Use P50 and P95 input/output tokens rather than one average when distributions are skewed.

  3. Calculate base monthly cost per model:

    requests * ((input_tokens / 1M) * input_price + (output_tokens / 1M) * output_price)

  4. Add retry amplification, tool-call subrequests, reasoning tokens, search/media fees, and provider markup.

  5. Subtract only verified cache savings; show the assumed hit rate.

  6. Produce low/base/high scenarios for traffic growth and token inflation.

  7. Calculate cost per request, successful task, active user, and business outcome when data exists.

  8. 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.