Free calculator

AI API cost calculator

This free AI API cost calculator shows what a workload costs on 19 text models from OpenAI, Anthropic, Google, xAI and DeepSeek, per request, per day and per month, with no signup. Pick a model, enter your tokens and daily requests, and every other model is ranked next to it.

At 2,000 input and 500 output tokens per request and 1,000 requests a day, a month costs $13.50 on gpt-6-luna or Claude Haiku 5.5 and $1,350.00 on gpt-6-astra or Claude Fable 5.1. Every price was checked on 9 Nov 2026 on the provider's own pricing page.

0%

Add reasoning tokens to the output. Not sure how long your prompt is? Count its tokens.

gpt-6.1-sol OpenAI

$270.00 a month

Per request
$0.009
Per day
$9.00
Per month (30 days)
$270.00

$2.00 input, $0.10 cached input and $10.00 output per 1M tokens.

Prices checked 9 Nov 2026 on OpenAI's pricing page.

Every model, cheapest first

Monthly cost of the same workload

  1. gpt-6-lunaOpenAI$13.50$0.00045 per request
  2. Claude Haiku 5.5Anthropic$13.50$0.00045 per request
  3. gpt-5.6-lunaOpenAI$30.00$0.001 per request
  4. deepseek-flashDeepSeek$36.00$0.0012 per request
  5. Gemini 3.5 Flash-LiteGoogle$55.50$0.0019 per request
  6. grok-build-0.1xAI$90.00$0.003 per request
  7. Gemini 3.8 FlashGoogle$101.25$0.0034 per request
  8. grok-4.3xAI$112.50$0.0038 per request
  9. gpt-6.1-terraOpenAI$135.00$0.0045 per request
  10. deepseek-v4-proDeepSeek$138.60$0.0046 per request
  11. grok-4.7xAI$210.00$0.007 per request
  12. gpt-6.1-solOpenAI$270.00$0.009 per request
  13. Claude Sonnet 5.5Anthropic$270.00$0.009 per request
  14. Gemini 4 ArgonGoogle$270.00$0.009 per request
  15. gpt-5.6-terraOpenAI$300.00$0.01 per request
  16. gpt-5.6-solOpenAI$540.00$0.018 per request
  17. Claude Opus 5.5Anthropic$540.00$0.018 per request
  18. gpt-6-astraOpenAI$1,350.00$0.045 per request
  19. Claude Fable 5.1Anthropic$1,350.00$0.045 per request

Costbrake reads what you really spend on OpenAI, Anthropic, Google Cloud, xAI and DeepSeek and alerts you when it runs ahead of this estimate.

How the calculator works

Providers charge per 1M tokens, with one price for input and a higher one for output. The calculator multiplies your input tokens by the input price and your output tokens by the output price, adds them and divides by 1 million. That is the cost of one request.

Take gpt-6.1-sol at $2.00 input and $10.00 output per 1M tokens. A request with 2,000 input tokens and 500 output tokens costs $0.004 plus $0.005, so $0.009. At 1,000 requests a day that is $9.00 a day and $270.00 over a 30-day month.

The cached input slider sets how much of each prompt the provider serves from its prompt cache. Those tokens cost the cached input price, which is 75% to 98% below the normal input price on these models.

Count reasoning and thinking tokens as output. OpenAI, Anthropic and Google bill them as output tokens, even though they never show up in the answer. To measure a real prompt, paste it into the token counter.

Prices per 1M tokens

These are the standard rates the calculator uses, in US dollars per 1M tokens, checked on 9 Nov 2026. Each provider's pricing page is listed under sources.

ModelInputCached inputOutputLong prompts and changes
gpt-6-astra (OpenAI)$10.00$1.00$50.00Over 272K input: $20.00 in, $75.00 out
gpt-6.1-sol (OpenAI)$2.00$0.10$10.00Over 272K input: $4.00 in, $15.00 out
gpt-6.1-terra (OpenAI)$1.00$0.05$5.00Over 272K input: $2.00 in, $7.50 out
gpt-6-luna (OpenAI)$0.10$0.01$0.50Over 272K input: $0.20 in, $0.75 out
gpt-5.6-sol (OpenAI)$4.00$0.40$20.00Over 272K input: $8.00 in, $30.00 out; promo price until 30 Nov 2026
gpt-5.6-terra (OpenAI)$2.00$0.20$12.00Over 272K input: $4.00 in, $18.00 out
gpt-5.6-luna (OpenAI)$0.20$0.02$1.20Over 272K input: $0.40 in, $1.80 out
Claude Fable 5.1 (Anthropic)$10.00$0.25$50.00Flat rate
Claude Opus 5.5 (Anthropic)$4.00$0.20$20.00Flat rate
Claude Sonnet 5.5 (Anthropic)$2.00$0.10$10.00Flat rate
Claude Haiku 5.5 (Anthropic)$0.10$0.01$0.50Over 100K input: $0.50 in, $2.50 out
Gemini 4 Argon (Google)$2.00$0.10$10.00From 1 Dec 2026: $4.00 in, $20.00 out
Gemini 3.8 Flash (Google)$0.75$0.075$3.75From 1 Jan 2027: $1.50 in, $7.50 out
Gemini 3.5 Flash-Lite (Google)$0.30$0.03$2.50Flat rate
grok-4.7 (xAI)$2.00$0.50$6.00From 200K input: $4.00 in, $12.00 out
grok-build-0.1 (xAI)$1.00$0.20$2.00From 200K input: $2.00 in, $4.00 out
grok-4.3 (xAI)$1.25$0.20$2.50From 200K input: $2.50 in, $5.00 out
deepseek-v4-pro (DeepSeek)$1.32$0.044$3.96Peak rate, off-peak is half
deepseek-flash (DeepSeek)$0.30$0.006$1.20Peak rate, off-peak is half

Long prompts and price changes

Some prices depend on prompt size. Once a prompt passes 272K input tokens, OpenAI bills the whole request at 2x the input and cached rates and 1.5x the output rate. xAI doubles every rate once a prompt reaches 200K tokens. Claude Haiku 5.5 goes from $0.10 to $0.50 input and from $0.50 to $2.50 output for prompts over 100,000 tokens. The calculator applies these rules when you enter a long prompt.

Some prices change by date. Gemini 4 Argon doubles on 1 Dec 2026, to $4.00 input and $20.00 output. Gemini 3.8 Flash doubles on 1 Jan 2027, to $1.50 input and $7.50 output. The calculator moves to the new price on that day. OpenAI lists gpt-5.6-sol at a promotional price until 30 Nov 2026 and does not say what comes after.

DeepSeek charges by time of day, and the calculator uses its peak price. Off-peak rates are half. Off-peak covers weekends, Chinese public holidays and all weekday hours outside 01:00 to 04:00 and 06:00 to 10:00 UTC.

What the estimate leaves out

The calculator covers standard token prices. A real bill can also include these:

  • Cache writes. OpenAI charges 1.25x the input price to write a prompt into its cache, Anthropic charges for 5-minute and 1-hour cache writes, and Google charges for cache storage by the hour.
  • Batch discounts. OpenAI and Anthropic charge 50% of the standard price for batch jobs, and xAI takes 20% off grok-4.7 and grok-4.3.
  • Tool calls. Built-in tools cost extra. OpenAI web search is $10 per 1,000 calls, and Google Search grounding on Gemini is $14 per 1,000 requests after 5,000 free a month.
  • Faster tiers and regional processing. OpenAI charges 2x for Fast mode and adds 10% for data residency endpoints on models released since 5 Mar 2026.

When the real bill runs ahead of the estimate

An estimate assumes traffic stays the way you entered it. Real traffic does not. A retry loop, a leaked key or a prompt that grew tenfold shows up on the bill before anyone looks.

Costbrake reads what you actually spend on OpenAI, Anthropic, xAI, DeepSeek and Gemini through Google Cloud. Set a budget from your estimate and it alerts you at 50, 80 and 100 percent of it. It also alerts when an hour costs 3x your usual hour and at least $5 more. On Pro, most providers are checked every 5 minutes. Free checks hourly.

On Pro and Team, an admin can also put a brake on OpenAI, Anthropic or xAI spend, for example by setting an OpenAI project's spend limit to $0.01 or disabling an Anthropic or xAI API key, and lift it later. Nothing fires on its own. See pricing: Free covers 2 accounts, and Pro is $12 a month with a 14-day trial.

Questions and answers

How do I calculate the cost of an AI API call?

Multiply the input tokens by the input price and the output tokens by the output price, add them and divide by 1 million, since prices are per 1M tokens. For 2,000 input and 500 output tokens on Claude Sonnet 5.5 at $2 and $10 per 1M, that is $0.004 plus $0.005, or $0.009 a request.

Which AI API model is cheapest?

For 2,000 input and 500 output tokens per request, gpt-6-luna and Claude Haiku 5.5 tie at $0.00045 a request, or $13.50 a month at 1,000 requests a day. deepseek-flash costs $36.00 a month at peak rates and half that off-peak. The ranking changes with your mix of input and output tokens, so enter your own numbers.

Does the calculator include prompt caching?

Yes. Move the cached input slider to the share of your prompt that the provider serves from its cache, and those tokens are billed at the cached input price. At 50% cached, the default workload on gpt-6.1-sol drops from $270.00 to $213.00 a month. Cache write and storage fees are not included.

Are reasoning tokens included in the estimate?

Only if you add them to the output tokens. OpenAI, Anthropic and Google bill reasoning and thinking tokens as output, so a short answer can cost more than its visible text suggests. The usage field of a real response shows how many you used.

How current are these prices?

Every price was checked on 9 Nov 2026 on the provider's own pricing page, listed under sources. Announced changes are built in: Gemini 4 Argon doubles on 1 Dec 2026 and Gemini 3.8 Flash on 1 Jan 2027. If your bill shows a different rate, the provider's page wins.

How do I know when my real bill goes over the estimate?

Connect the provider to Costbrake and set a budget. It alerts you at 50, 80 and 100 percent of the budget, and when an hour costs 3x your usual hour and at least $5 more. The Free plan covers 2 accounts with hourly checks. See pricing for Pro.

Sources

Updated

Start with 14 days of Pro, free

Catch the next spike before the invoice.

Start free

14 days of Pro, then Free for 2 accounts. No card needed.