Retry and fallback overhead

LLM Retry & Fallback Cost Calculator

Estimate how much extra paid attempts, fallback calls, and unresolved tasks change your monthly model API cost.

Price retries in three steps
  1. Choose the model pathSet a primary and optional fallback.
  2. Enter attempts and outcomesUse your workload and acceptance rule.
  3. Review model task costSee overhead and verified price evidence.
Example assumptions

Price the attempts behind each task

Verified Standard pricing

Replace these planning values with your workload. Monthly tasks count initial jobs, not API requests or paid attempts.

0%
Verified cache-read pricing is used when available. Cache writes are not included.
Failed-attempt billing and tool fees (optional)

Not every failed attempt is billed. Some routers do not charge model tokens for an attempt that errors, while search, fetch, or file-parsing tools can still charge per call.

How retry cost works

Retries, fallback calls, and unresolved tasks all add paid attempts. Here's how it turns into monthly cost.

  1. 1
    Initial tasks

    You run 10,000 initial tasks per month using your primary model.

  2. 2
    Retries & fallback

    Some tasks fail and retry. A portion of retries can go to the fallback model.

  3. 3
    Extra paid attempts

    All retries and fallback calls are additional paid attempts.

Monthly cost result
Total monthly cost$87.50 USD per month

Model API cost for initial, retry, and fallback calls. Summary Estimate uses average extra attempts and final outcomes with fixed tokens and cache share per attempt; it does not simulate growing context. Tool or API fees are included only when you enter them; infrastructure is excluded.

Retry + fallback cost$17.50 USD per month
Cost per successful task$0.009722 USD per successful task
Retry cost share20% of total monthly cost

For 10,000 monthly tasks, the current retry and fallback assumptions produce an estimated monthly API cost of $87.50. Additional retry/fallback attempts account for $17.50 USD per month, and estimated cost per successful task is $0.009722 USD per successful task.

Incoming tasks
10,000
Final unresolved tasks
1,000
Total paid attempts
12,500
Average cost per paid attempt
$0.0070
Cost per incoming task
$0.00875
Primary attempt cost
$0.0070
Base first-attempt cost
$70.00 USD per month
Additional paid attempts
2,500 paid attempts per month
Accepted tasks
9,000 accepted tasks per month
Additional monthly retry/fallback spend
$17.50 USD per month
Additional annual retry/fallback spend
$210.00 USD per year

What retries change

Primary retry attempts2,500 attempts per month · $17.50 USD per month

Fallback retry attempts0 attempts per month · $0.00 USD per month

All additional attempts in this scenario use the primary model.

Outcome evidence

Accepted when: Acceptance rule not specified

Overall outcome: USER ASSUMPTION

AICostBudget verifies model pricing sources. It does not verify your acceptance rule, observations, or success assumptions.

Would a different model cost less per successful task?

Compare GPT-6.1 Sol with another model on the same workload, including each model's success rate and the break-even success rate. You can save the comparison in this browser and reopen it when a price changes.

Open the Model Switch Cost Calculator

Only the model names carry over. Re-enter your token and volume numbers there.

Quick presets

Load common scenarios to get started, then fine-tune the values above.

Conservative
  • 5,000 tasks / month
  • 0.1 extra retries
  • 5% unresolved rate
High volume
  • 50,000 tasks / month
  • 0.5 extra retries
  • 15% unresolved rate

Formula / logic (simplified)

Monthly cost = base first-attempt cost + primary retry cost + fallback retry cost + tool fees − unbilled failed attempts.

Total attempts
12,500 / month
Primary retry attempts
2,500 / month
Fallback attempts
0 / month
Successful tasks
9,000 / month
Monthly cost
$87.50 USD
Cost per successful task
$0.009722 USD
Simplified planning logic

Retry and fallback workload

Primary model
OpenAI GPT-6.1 SolRequired · Model ID: openai/gpt-6.1-sol
Fallback model
Not enabledOptional · All retries use the primary model.
Monthly tasks
10,000 initial tasks per monthRequired · Tasks are not requests or paid attempts.
Input
1,000 tokens per attemptRequired · Applied to primary and fallback attempts.
Output
500 tokens per attemptRequired · Applied to primary and fallback attempts.
Average extra retries
0.25 paid attempts per taskRequired input assumption; excludes the initial primary attempt.
Final unresolved rate
10% of initial tasksAssumed after all retry and fallback attempts.
Fallback retry share
0% of retry attemptsNo fallback model is enabled.
Cached input share
0% of input tokensOptional · Uses verified cache-read pricing; cache writes are excluded.
Failed attempts not billed
0% of failed attemptsOptional · Every failed attempt is billed in full.
Tool or API fees
$0.00 per attemptOptional · No separately billed tool fees.

Pricing evidence

Verified model identity, selected Standard tier, and official pricing sources used in this estimate.

Primary pricing basis

OpenAI GPT-6.1 Sol

Model ID: openai/gpt-6.1-sol
Price record ID
price:openai/gpt-6.1-sol:standard:short:current
Mode
Standard
Selected tier
short: ≤272k input tokens; whole request
Input pricing
$2 USD per 1M input tokens
Cached input pricing
Not used in this calculation
Cache-write pricing
Not used in this calculation
Output pricing
$10 USD per 1M output tokens
Regional multiplier
Not applied
Verified
Checked

This calculator uses the assumptions you enter. It does not inspect traces, provider logs, production requests, or invoices. Retry cost is not automatically avoidable waste.

Cost per request is not total task cost

A task begins with one primary attempt. If that attempt is followed by retries or a fallback call, every extra paid attempt adds model API cost. This calculator keeps the first-attempt baseline separate from retry and fallback cost so the change is visible.

How retry and fallback cost is calculated

retry attempts = monthly initial tasks x average extra retries per task unbilled failed attempts = retry attempts x share of failed attempts not billed retry/fallback cost = primary retry attempts x primary attempt cost + fallback retry attempts x fallback attempt cost + retry attempts x tool fee per attempt - unbilled failed attempts x primary attempt cost first-attempt baseline = monthly initial tasks x (primary attempt cost + tool fee per attempt) total monthly cost = first-attempt baseline + retry/fallback cost successful tasks = monthly initial tasks x (1 - final unresolved rate) cost per successful task = total monthly cost / successful tasks

Summary Estimate is linear: 0.25 extra retries per task means one additional paid attempt for every four initial tasks on average. It uses fixed tokens and cache share per attempt, without simulating growing context. Retry Path instead follows unresolved tasks through conditional retry recovery and fallback acceptance. For a reproducible worked scenario, see the retry and fallback cost example.

What counts as a successful task?

You set the acceptance rule, such as a test passing or a ticket being resolved. A token price describes a rate; cost per attempt prices one paid call; cost per incoming task spreads total spend over all tasks; and cost per accepted task divides that spend only by tasks that meet your rule. If none are accepted, the last measure is unavailable.

When retries and fallback change outcome cost

Summary Estimate keeps average extra attempts and final unresolved tasks as separate planning inputs. Retry Path can instead estimate accepted tasks from first-attempt success, conditional recovery on each main-model retry, and conditional acceptance after fallback. A lower token price can still cost more after retries and fallback. See why the cheapest LLM can cost more per successful task. This page does not rank or recommend models.

Pricing evidence and outcome evidence

Eligible Standard model prices are linked to official provider sources, price record IDs, and verification dates. The related machine-readable records, provenance fields, and current export are documented in the AICostBudget AI API Pricing Dataset. Your acceptance rule, assumptions, and reported observations are separate outcome evidence. AICostBudget does not verify user-reported outcomes or convert public benchmarks into task success rates.

Which failed attempts are billed

Many retries in an agent workflow follow an answer that came back and failed a check: invalid JSON, wrong tool arguments, or a failing test. Those attempts are billed in full. Provider or router errors can be different. OpenRouter states that an attempt that errors is not charged for its model tokens, so with fallback you pay for the model that answers, but web search or file parsing that already ran may still be billed. Direct provider error-code pages from OpenAI and Anthropic do not state whether errored requests are billed. By default this calculator bills every failed attempt; set the share not billed only from your own usage records.

Tools can cost money even when the model call fails. Add an average tool or API fee per attempt for search, fetch, or file parsing. DeepSeek, for example, lists Search and Fetch at $0.75 per 1,000 successful requests from November 1, 2026 (Beijing time).

Retry cost is not automatically waste

Some retries recover a temporary provider error or produce the accepted result. Others may come from a repeated validation failure, bad tool arguments, or a fallback policy that is too aggressive. Without a measured preventable-retry share, this page reports overhead—not avoidable spend or guaranteed savings.

Assumptions and limitations

Primary and fallback attempts use the same input-token, output-token, and cached-input assumptions. Pricing comes from verified Standard price records and follows each model's context tiers. Unbilled failed attempts are priced at the primary attempt cost, and tool fees are a flat average per attempt that you enter. This version excludes cache writes, human review, latency, engineering labor, business loss, and infrastructure. It does not inspect traces, provider logs, production requests, or invoices.

Choose the next cost view

To compare how a different model changes the price of each attempt, use the Model Switch Cost Calculator. For a broader routing mix, margin target, and monthly product budget, use the AI Budget Planner.

Frequently asked questions

What is LLM retry cost?

LLM retry cost is the model API cost of paid attempts after the initial attempt. This calculator keeps those attempts separate from the one-attempt baseline so you can see their monthly cost and share of total model spend.

How do retries increase AI API cost?

Each extra attempt processes another input and output workload. An average of 0.25 extra retries per initial task creates 2,500 additional paid attempts for 10,000 monthly tasks.

What is fallback cost?

Fallback cost is the cost of retry attempts sent to a selected fallback model. The calculator applies the same token and cache assumptions to both models, then prices the configured share of retry attempts on the fallback.

Are failed LLM API attempts billed?

It depends on how the attempt failed and where it ran. An answer that comes back but fails your check, such as invalid JSON or a failing test, is billed like any other response. Some routers do not charge model tokens for an attempt that errors: OpenRouter's pricing FAQ says an attempt that errors is not charged for its model tokens, although web search or file parsing that already ran may still be billed. The OpenAI and Anthropic error-code pages do not say whether errored requests are billed, so check your usage records before assuming they are free. The calculator bills every failed attempt in full unless you set a share that was not billed.

Does the calculator include tool and search fees?

Only when you enter them. Set an average tool or API fee per attempt, and the calculator adds it to every attempt, including failed ones. For example, DeepSeek lists Search and Fetch at $0.75 per 1,000 successful requests, billed from November 1, 2026 (Beijing time).

Are all retries wasted spend?

No. Some retries are required to complete a task successfully. This calculator reports retry and fallback overhead, but it does not label that entire amount as avoidable or wasted spend.

How is cost per successful task calculated?

Total monthly model cost is divided by tasks accepted under your rule. Summary Estimate uses your final unresolved rate or your reported accepted and observed counts. Retry Path estimates acceptance from your first-attempt, retry-recovery, and fallback assumptions.

What counts as a successful task?

You define what accepted means for your workflow, such as passing tests, valid JSON, or a resolved ticket. The calculator records that rule but does not judge individual tasks.

Are success rates verified by AICostBudget?

No. Outcome rates are your assumptions or user-reported accepted and observed counts. AICostBudget does not audit your task logs. Verified labels apply only to eligible model pricing records.

Where do model prices come from?

The calculator uses verified Standard price records, each with its model ID, context tier, input and output prices, verification and check dates, and a link to the official provider source. Unsupported pricing is unavailable rather than estimated from another mode.

Does this recommend the cheapest model?

No deterministic model recommendation is made from token price alone. Task acceptance and retry behavior depend on your workload. Use the Model Switch Cost Calculator to compare two model scenarios under your own assumptions.

Do I need production telemetry?

No. This calculator uses assumptions you enter. Production traces or provider logs can improve those assumptions, but the calculator does not inspect them or connect to a provider account.