Saturday, December 5, 2026

Write for us
Real Online Product

Example rate. Use the current price from your provider.

Leave at 0 if you do not use prompt caching.

Reset

Results

Estimated monthly cost$360.00

Annual cost
$4,320.00
Cost per active day
$12.00
Cost per request
$0.012
Input tokens per month
45,000,000
Output tokens per month
15,000,000

Amounts are in US dollars. Pre-filled values are examples, so replace them with your own. Results are estimates, not financial or professional advice. See our Disclaimer. Last updated .

How much does an AI API cost?

An AI API usually costs a set price per million tokens, with separate rates for the text you send and the text the model returns. Your bill is the number of tokens used multiplied by those rates.

That makes cost depend on design choices as much as on traffic. A long system prompt, attached documents or lengthy answers can raise spending several times over without a single extra user. Estimating before launch shows whether a feature is affordable and which part of the prompt is worth trimming.

How the AI API Cost Calculator works

  • Providers usually charge separately for input tokens (what you send) and output tokens (what the model returns), quoted per million tokens.
  • Cost per request = (input tokens × input price + output tokens × output price) ÷ 1,000,000.
  • With prompt caching, the cached share of input tokens is charged at the cached price instead. Any separate fee for writing to the cache is not included.
  • Monthly cost = cost per request × requests per day × active days.

Worked example

With these example inputs:

  • Requests per day: 1,000
  • Input tokens per request: 1,500
  • Output tokens per request: 500
  • Input price per 1M tokens: $3
  • Output price per 1M tokens: $15
  • Input tokens served from cache: 0%
  • Cached input price per 1M tokens: $0.30
  • Active days per month: 30

the calculator gives:

  • Estimated monthly cost: $360.00
  • Annual cost: $4,320.00
  • Cost per active day: $12.00
  • Cost per request: $0.012
  • Input tokens per month: 45,000,000
  • Output tokens per month: 15,000,000

Compare scenarios

Results as “Requests per day” changes. All other inputs keep their example values.
Requests per dayEstimated monthly costAnnual cost
500$180.00$2,160.00
1,000$360.00$4,320.00
5,000$1,800.00$21,600
10,000$3,600.00$43,200
50,000$18,000$216,000

Tips

  • Measure token counts on real requests instead of guessing from short test prompts.
  • Compare a smaller model for routine requests with a larger one for the hard cases.
  • Set a maximum output length and a spending alert before you open a feature to users.

AI API Cost Calculator: frequently asked questions

Where do I find the token prices?

On your provider’s pricing page. Rates differ by model and change over time, so the numbers pre-filled here are only examples.

How do I know how many tokens a request uses?

API responses normally report input and output token counts. Average them over a realistic sample of requests, including the system prompt and any documents you attach.

Why is my real bill higher than the estimate?

Common reasons are retries, long conversation histories, tool calls that add extra round trips, and reasoning tokens billed as output.

Related calculators

All calculators

More AI calculators

Open category

Related articles

All articles