Back to calculator
AI & AutomationGenerated accuracy model review: 2026-05-06

Batch API Savings Calculator accuracy and testing

This page documents how Calwarden builds trust for this calculator: source notes, regression-style default tests, limitations, assumptions, unit handling, rounding, and visible change history.

Formula source

  • Normal cost = monthly requests * token cost per request. Batch cost = eligible cost * (1 - discount percent / 100) + ineligible cost. Savings = normal cost - batch cost.

Test cases

Default input regression check

Generated from the checked-in default inputs and calculate function.

Inputs

  • Monthly Requests: 1,000,000
  • Input Tokens per Request: 1,000 tokens
  • Output Tokens per Request: 400 tokens
  • Input Price: 1 $/1M
  • Output Price: 3 $/1M
  • Batch Eligible: 70%
  • Batch Discount: 50%

Expected outputs

  • Monthly Savings: $770.00
  • Normal Monthly Cost: $2,200.00
  • Batch Monthly Cost: $1,430.00
  • Savings Rate: 35.00%

Known limitations

  • This page documents the checked-in calculator logic and does not certify results for every real-world edge case.
  • Use the result as a planning estimate unless the calculator page states a stricter purpose.

Assumptions

  • Prices and discounts are user-entered.
  • No retry, storage, queue, or engineering cost is included unless folded into rates.
  • No request data is uploaded.

Unit handling

  • Monthly Requests accepts numeric values.
  • Input Tokens per Request accepts values in tokens.
  • Output Tokens per Request accepts values in tokens.
  • Input Price accepts values in $/1M.
  • Output Price accepts values in $/1M.
  • Batch Eligible accepts values in %.
  • Batch Discount accepts values in %.
  • Monthly Savings is displayed as currency.
  • Normal Monthly Cost is displayed as currency.
  • Batch Monthly Cost is displayed as currency.
  • Savings Rate is displayed as a percentage.

Rounding rules

  • Number displays use up to 2 decimal places in the calculator UI.
  • Currency outputs are displayed with standard US dollar formatting.
  • Percent outputs are displayed with two decimal places.
  • Input precision follows configured step values where provided.

Version history

1.0.0 - 2026-05-06

Generated accuracy and testing page from the current batch-api-savings-calculator calculator definition.

Change log

2026-05-06

Published default regression test documentation and metadata fallbacks for Batch API Savings Calculator.

Calculator transparency

Accuracy pages are generated from checked-in calculator definitions and can be upgraded with curated review metadata over time.

Use calculator