AI API cost calculator
Your workload priced on each model, from the providers' own price pages.
Monthly cost = requests × (uncached input tokens × input price + cached input tokens × cached price + output tokens × output price) ÷ 1,000,000. Standard prices, no batch discounts. The examples are starting points, not measurements: change any number to match your app.
Prices and limits checked on October 26, 2026 on each provider's own page. See the numbers and sources
The numbers behind this tool
Read on October 26, 2026 from each provider's own page. Prices are US dollars per million tokens, standard tier.
| Model | API id | Input | Cached input | Output | Context window | Max output | Source |
|---|---|---|---|---|---|---|---|
| GPT-6 Astra OpenAI | gpt-6-astra |
$10.00 | $1.00 | $50.00 | 1,050,000 | 128,000 | developers.openai.com |
| Flagship ('Our most capable model'). Prices for <=272K input tokens; above 272K: $20.00 in / $2.00 cached / $75.00 out. Context stated as '1.05M', max output as '128K tokens'. Context/max output from developers.openai.com/api/docs/models. | |||||||
| GPT-6.1 Sol OpenAI | gpt-6.1-sol |
$2.00 | $0.10 | $10.00 | 1,050,000 | 128,000 | developers.openai.com |
| Mid option ('Near-Astra performance for complex work at a lower cost'). Above 272K input: $4.00 / $0.20 / $15.00. Context stated as '1.05M', max output '128K tokens'. | |||||||
| GPT-6 Luna OpenAI | gpt-6-luna |
$0.10 | $0.01 | $0.50 | 1,050,000 | 128,000 | developers.openai.com |
| Small ('Our most efficient model for focused, high-volume tasks'). Above 272K input: $0.20 / $0.02 / $0.75. Context stated as '1.05M', max output '128K tokens'. | |||||||
| Claude Fable 5.1 Anthropic | claude-fable-5-1 |
$10.00 | $0.25 | $50.00 | 1,000,000 | 128,000 | platform.claude.com |
| Top model ('demanding reasoning and long-horizon agentic work'). Cached = cache hits/refreshes (0.025x input); 5m cache write $12.50, 1h write $20. Full 1M context at standard pricing. Context stated as '1M tokens', max output '128K tokens'. Claude Mythos 5.1 has the same prices but limited availability. Context/ID from platform.claude.com/docs/en/about-claude/models/overview. | |||||||
| Claude Opus 5.5 Anthropic | claude-opus-5-5 |
$4.00 | $0.20 | $20.00 | 1,000,000 | 128,000 | platform.claude.com |
| Anthropic's recommended default ('start with Claude Opus 5.5 for most workloads'). Cache hits 0.05x input; 5m write $5, 1h write $8. Full 1M context at standard pricing. | |||||||
| Claude Sonnet 5.5 Anthropic | claude-sonnet-5-5 |
$2.00 | $0.10 | $10.00 | 1,000,000 | 128,000 | platform.claude.com |
| Mid ('best combination of speed and intelligence'). Cache hits 0.05x input; 5m write $2.50, 1h write $4. Full 1M context at standard pricing. | |||||||
| Claude Haiku 5.5 Anthropic | claude-haiku-5-5 |
$0.10 | $0.01 | $0.50 | 1,000,000 | 128,000 | platform.claude.com |
| Small. Prices are for prompts up to 100,000 tokens; prompts over 100,000 tokens: $0.50 in / $0.05 cached / $2.50 out (5m write $0.625, 1h write $1). | |||||||
| Gemini 4 Argon | gemini-4-argon |
$2.00 | $0.10 | $10.00 | 1,048,576 | 65,536 | ai.google.dev |
| Flagship ('Our flagship reasoning model'). Paid tier only (not on free tier). Page announces new prices from Dec 1, 2026: $4.00 in / $0.20 caching / $20.00 out. No >200k tier listed. Context window is a unified input+output limit of 1,048,576; default sync output 65,536, up to 1,048,576 with long decode. Context caching also has a storage charge. Limits from ai.google.dev/gemini-api/docs/models/gemini-4-argon. | |||||||
| Gemini 3.8 Flash | gemini-3.8-flash |
$0.75 | $0.075 | $3.75 | 1,048,576 | 65,536 | ai.google.dev |
| Mid. Free tier available. Page announces new prices from Jan 1, 2027: $1.50 in / $0.15 caching / $7.50 out. Context caching also has a storage charge. Limits from ai.google.dev/gemini-api/docs/models/gemini-3.8-flash. | |||||||
| Gemini 3.5 Flash-Lite | gemini-3.5-flash-lite |
$0.30 | $0.03 | $2.50 | 1,048,576 | 65,536 | ai.google.dev |
| Small. Free tier available. Note: older gemini-2.5-flash-lite ($0.10/$0.40) and gemini-3.1-flash-lite ($0.25/$1.50) are cheaper and still listed. Limits from ai.google.dev/gemini-api/docs/models/gemini-3.5-flash-lite. | |||||||
| DeepSeek-V4-Pro (DeepSeek-V4-Pro-0813) DeepSeek | deepseek-v4-pro |
$1.32 | $0.044 | $3.96 | 1,000,000 | 384,000 | api-docs.deepseek.com |
| Flagship. Prices are PEAK rates (cache-miss input). Off-peak rates are half: $0.66 in / $0.022 cached / $1.98 out. Peak = 01:00-04:00 and 06:00-10:00 UTC Mon-Fri excluding Chinese public holidays. Context stated as '1M', max output 'Up to 384K'. Only two models are listed, so there is no separate mid tier. | |||||||
| DeepSeek-V4.1-Flash (DeepSeek-V4.1-Flash-1017) DeepSeek | deepseek-flash |
$0.30 | $0.006 | $1.20 | 1,000,000 | 384,000 | api-docs.deepseek.com |
| Small/fast. PEAK rates; off-peak half: $0.15 / $0.003 / $0.60. Legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp are routed here. Context stated as '1M', max output 'Up to 384K'. | |||||||
| Grok 4.7 xAI | grok-4.7 |
$2.00 | $0.50 | $6.00 | 500,000 | – | docs.x.ai |
| Newest Grok listed. Prices for <200k prompt tokens; at >=200k prompt tokens the whole request is billed $4.00 / $1.00 / $12.00. Context stated as '500k'. Max output not stated. The page does not label flagship/mid/small tiers. | |||||||
| Grok 4.3 xAI | grok-4.3 |
$1.25 | $0.20 | $2.50 | 1,000,000 | – | docs.x.ai |
| Cheaper Grok option (grok-4.20-0309 reasoning/non-reasoning have the same prices). >=200k prompt tokens: $2.50 / $0.40 / $5.00. Context stated as '1M'. Max output not stated. Tier label (mid) is our choice, not xAI's. | |||||||
| Mistral Large 4 Mistral | mistral-large-4-0 |
$1.36 | $0.14 | $4.18 | 1,000,000 | – | docs.mistral.ai |
| Flagship (open-weight, v26.10). ID inferred from the docs URL; page displays 'mistral-large-4+1'. Context stated as '1M'. CONFLICT: mistral.ai/pricing states 'Mistral Large costs $0.5 /M tokens in and $1.5 /M tokens out' (version not named). Docs price used here; recheck before publishing. | |||||||
| Mistral Medium 3.5 Mistral | mistral-medium-3-5-26-04 |
$1.50 | – | $7.50 | 256,000 | – | docs.mistral.ai |
| Mid (v26.04). ID inferred from the docs URL; page displays 'mistral-medium-3-5+2'. Verify exact API ID. Context stated as '256k'. Input/output labels taken from docs.mistral.ai/inference/pricing; model page shows the two numbers unlabeled. Cached price not stated. | |||||||
| Mistral Small 4 Mistral | mistral-small-2603 |
$0.15 | – | $0.60 | 256,000 | – | docs.mistral.ai |
| Small (v26.03, Apache 2.0). Page displays ID 'mistral-small-2603' with an unexplained '+1'. Context stated as '256k'. Input/output labels from docs.mistral.ai/inference/pricing. Cached price not stated. | |||||||
How it works
Enter how many requests your app makes a month and how many tokens go in and come out of each one. The calculator prices that workload on every model in its list, using the standard prices from each provider’s own pricing page, and sorts them from cheapest to most expensive.
If part of each prompt repeats (a long system prompt, the same document, earlier turns of a chat), providers that offer prompt caching charge less for the repeated part. Move the cache slider to the share of input you expect to be repeated. Models with no cache price listed are charged the full input price.
What the estimate leaves out
- Batch discounts and off-peak rates. DeepSeek, for example, lists off-peak prices at half its peak rate; the calculator uses peak.
- Long-context surcharges. Several models charge more once a prompt passes a size threshold; the table below lists each one.
- Reasoning tokens. Models that think before answering bill that thinking as output, so output counts can be higher than the visible answer.
More tools
How many tokens is my prompt?
Token counter
Count my tokensHow long is a 4,000-token answer?
Words to tokens
ConvertIs a monthly AI plan cheaper than paying per use?
Subscription or API?
Compare for my usageWill my whole document fit?
Context window checker
Check a documentCan my GPU run this model?