DevTools Logo

LLM Maliyet ve Bütçe Tahminleyici

LLM Maliyet ve Bütçe Tahminleyici

Çoklu model, cache ve streaming senaryolarının maliyetini tarayıcıda karşılaştırın

Model ve kullanım

Karşılaştırılacak modeller

Streaming yanıt süresini etkiler; token fiyatını değiştirmediği için bu hesapta ek maliyet oluşturmaz. Aylık hesap 30 gün kabul eder.

Hakkında

Günlük istek, input/output token hacmi ve cache hit oranını kullanarak yaygın modellerin maliyetini karşılaştırın. Streaming maliyeti değiştirmez; fiyatlar 2025-02-14 tarihli statik snapshot'tır.

Examples

Per-million pricing

Input
forecastLlmCosts({ dailyRequests: 1000, averageInputTokens: 1000, averageOutputTokens: 500, cacheHitPercent: 0 }, [gpt-4o-mini])
Output
{ dailyInputCost: 0.15, dailyOutputCost: 0.30, monthlyCost: 13.5 }

1M input tokens at $0.15/M plus 0.5M output tokens at $0.60/M, times 30 days.

Cached input discount

Input
forecastLlmCosts({ dailyRequests: 1, averageInputTokens: 1000000, averageOutputTokens: 0, cacheHitPercent: 50, cacheDiscountPercent: 90 }, [gpt-4o-mini])
Output
{ dailyInputCost: 0.0825 }

Half the tokens bill at 10% weight: (0.5M + 0.05M) / 1M × $0.15.

About this tool

LLM Cost Budget Forecaster prices daily traffic with forecastLlmCosts(input, selectedModels): daily input/output tokens come from dailyRequests times average tokens, input cost is (uncached + discounted cached tokens) / 1e6 times inputPerMillion, output cost is tokens / 1e6 times outputPerMillion, and monthly cost multiplies daily by 30.

Prompt caching only discounts input: cacheHitPercent selects the cached share and cacheDiscountPercent (default 90) shrinks its billed weight, while budgetMonthly flags budgetExceeded per model whenever its monthly total crosses the budget.

Pricing is a static snapshot (PRICE_SNAPSHOT_DATE 2025-02-14) over five models — GPT-4o mini, GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, DeepSeek V3 — and buildCostForecastCsv exports every modeled row with per-day and per-month totals.

How to use this tool

  1. Describe traffic

    Enter daily requests, average input/output tokens, and cache hit percent (discount defaults to 90%).

  2. Set a budget

    Add budgetMonthly to get a per-model budgetExceeded flag on monthly totals.

  3. Export the table

    Call buildCostForecastCsv on the result for quoted CSV rows covering all selected models.

Use cases

Choosing between models

Compare monthly totals across the five snapshot models for the same traffic shape.

Justifying prompt caching

Raise cacheHitPercent to quantify how cached prefixes shrink the input bill.

Setting spend alerts

Pair budgetMonthly with the CSV export to review which models breach the cap.

Common mistakes

Mistake:Expecting the cache discount to lower output cost.

Fix:Caching only reweights cached input tokens — output tokens always bill at full price.

Mistake:Treating snapshot prices as live quotes.

Fix:MODEL_PRICING is frozen at PRICE_SNAPSHOT_DATE; re-check provider pricing before signing budgets.

Frequently asked questions

What does this tool do?

It forecasts spend with forecastLlmCosts from daily requests, average input/output tokens, cache hit and discount percents, and an optional monthly budget, across a five-model static price snapshot.

How is caching and monthly cost computed?

Cached input tokens bill at (1 − discount) weight with output always full price, and monthly cost is daily cost times 30 — budgetExceeded flags any model above budgetMonthly.

Is my usage data uploaded or stored?

No. Token math and CSV building run entirely in your browser.

Why does the CSV list every model, or prices look stale?

buildCostForecastCsv exports one row per selected model by default, and MODEL_PRICING is frozen at PRICE_SNAPSHOT_DATE (2025-02-14) — re-check provider pages for live quotes.

References & standards