AI API Cost Calculator

Estimate workload cost using the current source-linked model catalog. Change every material assumption below; this is not a provider bill or subscription quote.

Data snapshot: November 2026 · 12 models. Each rate is linked from the verified catalog.

Workload assumptions

Estimated monthly API usage
$105.19

$4.78 per working day


Input cost: $22.69

Output cost: $82.50

Estimated cache savings: $18.56

Same workload across verified models

ModelPublished input / outputEstimated monthDifference
Claude Fable 5.1$10.00 / $50.00$1381.88+$1276.69
Claude Opus 5$5.00 / $25.00$701.25+$596.06
Claude Sonnet 5$2.00 / $10.00$280.50+$175.31
Claude Haiku 4.5$1.00 / $5.00$140.25+$35.06
GPT-6 Astra$10.00 / $50.00$1402.50+$1297.31
GPT-5.6 Sol$4.00 / $20.00$561.00+$455.81
GPT-5.6 Terra$2.00 / $12.00$324.50+$219.31
GPT-5.6 Luna$0.20 / $1.20$32.45-$72.74
Gemini 3.1 Pro$2.00 / $12.00$324.50+$219.31
Gemini 3.8 Flash$0.75 / $3.75$105.19Selected baseline
DeepSeek V4.1 Flash$0.15 / $0.60$17.41-$87.78
DeepSeek V4 Pro$0.66 / $1.98$62.32-$42.87
Excluded: taxes, currency conversion, account tiers, reseller markup, batch discounts, minimum commitments, and charges outside token usage. Cache math uses each displayed cache rate. Where a provider publishes no cache-read price, no discount is assumed. Read the calculator methodology.

3 Production Business Presets (Click to Load)

Instead of guessing abstract token counts, click any realistic production workload below to populate the calculator sliders and compare real monthly costs and failure pitfalls:

1. 10,000 Daily Support Tickets

Workload: 2,500 in / 400 out, 10,000 calls/day, 30 days, 75% cache hit (FAQ policy prefix).

Cost & Pitfall: With GPT-6 Luna ($0.10/$0.50), this runs ~$97/mo. Pitfall: Putting dynamic user timestamps at index 0 breaks the 75% cache hit, doubling input spend overnight.

2. 50-Engineer Coding & PR Team

Workload: 12,000 in / 1,500 out, 2,500 calls/day, 22 days, 65% cache hit (repo context).

Cost & Pitfall: With Claude Sonnet 5.5 ($2/$10), this runs ~$1,277/mo. Pitfall: Unbounded linter-retry loops can easily 3x daily call volume unless a step cap is enforced.

3. Legal / Contract Long-Context RAG

Workload: 35,000 in / 2,500 out, 200 calls/day, 22 days, 20% cache hit (unique PDFs).

Cost & Pitfall: With Gemini 3.8 Flash ($0.75/$3.75), this runs ~$139/mo. Pitfall: Beware crossing 200K–272K thresholds on tiered models where whole-prompt 2x surcharges kick in.

Worked Case Study: 200-Step Autonomous Coding Agent Monthly Bill

To illustrate how input volume, output tokens, and prompt caching interact in real engineering work, consider a mid-sized team running an autonomous PR-fixing agent across 500 coding tasks per day (22 working days/month). Each task averages 5,000 input tokens (system instructions, repo map, and failing test trace) and 2,000 output tokens (diagnostic reasoning plus git patch).

Monthly Bill Impact of Prompt Caching (55M Input + 22M Output Tokens / Month) Claude Sonnet 5 ($2/$10) $330.00 (0% cache) $280.50 (50% cache) $245.85 (85% cache) DeepSeek V4 Pro ($0.66/$1.98) $79.86 (0% cache) $62.31 (50% cache) GPT-5.6 Luna ($0.20/$1.20) $37.40 (0% cache) → $28.05 (85% cache)
Figure 1: Even with 85% prompt cache hit rates, output token pricing ($10/1M vs $1.20/1M) remains the dominant cost driver when generating multi-file code patches.

Notice the architectural takeaway: on Sonnet 5, output tokens alone cost 22M × $10 = $220.00, which sets a hard cost floor regardless of how aggressively you cache input prefixes. Teams generating verbose diffs or large JSON payloads save far more by constraining output verbosity (or routing boilerplate generation to GPT-5.6 Luna or DeepSeek V4 Pro) than by micro-optimizing input tokens.

How to build a useful estimate

Start with usage from a representative trace rather than a guessed “average prompt.” Include the system message, retrieved documents, tool results, conversation history, and expected output. Calls per day should count every model request inside an agent workflow—not only the number of user sessions.

1. Model the typical case

Use median input and output sizes for routine traffic. Set cache share to zero unless your provider usage metadata confirms repeated-prefix hits.

2. Stress the expensive case

Repeat the estimate with long inputs, longer outputs, retries, and more working days. This gives a range instead of a misleading single forecast.

3. Compare accepted outcomes

A lower per-call estimate is not automatically cheaper if the model needs more retries or tool steps. Compare cost per task that passes your evaluation.

What the calculator actually computes

For each model, the tool multiplies monthly uncached input tokens by the published input rate, cached input tokens by the displayed cache-read rate, and output tokens by the output rate. It then compares the same workload across the reviewed catalog. It does not predict future prices or provider routing behavior.

Questions this result cannot answer

Frequently asked questions

No. The calculator applies provider-published rates per one million tokens to workload assumptions you choose. It excludes taxes, currency conversion, account tiers, reseller markup, batch discounts, minimum commitments, and any charge outside token usage.
Three causes dominate. Retries and failed calls are still billed. Agent workflows often make several model calls per single user action, so counting user sessions undercounts requests. Retrieved documents, tool results, and conversation history are all billable input tokens, not just the newest message.
Every rate comes from the catalog snapshot stated at the top of this page, and each model row links to its official provider source. Prices in this category change several times a year, so check the source link before making a material commitment.
Both. Run the routine median first, then repeat it with long inputs, longer outputs, more retries, and more working days. A range is more useful than a single number, and the upper bound is what protects a budget.