AI API pricing
Pick a workload and a volume to see what each model costs a month. Prices come from each provider's own pricing page.
AI API prices run from $0.05 per million input tokens on OpenAI’s gpt-5-nano to $10 on Claude Fable 5.1, a 200-fold spread. Output tokens cost 2 to 8.5 times as much as input, so the length of the answers decides most bills. Every price below comes from the provider’s own pricing page.
What your workload costs on each model
Pick a workload, a monthly volume and a pricing option. Each row shows the monthly cost on that model; n/a means the provider does not offer that option.
API prices side by side
Prices in US dollars per million tokens for each provider’s main models. The first number is input, the second is output.
Two Gemini prices are about to rise. Gemini 4 Argon doubles to $4 in and $20 out on December 1, 2026, and Gemini 3.8 Flash doubles to $1.50 and $7.50 on January 1, 2027. The calculator switches to the new rates on those dates.
Discounts each provider publishes
- Anthropic: the Batch API costs half. Cached input costs 0.025 to 0.1 times the base rate, and writing to the cache costs extra.
- OpenAI: Batch prices are half. Cached input costs a tenth of the base rate, a twentieth on gpt-6.1-sol and gpt-6.1-terra. Every OpenAI rate and credit rule
- Google: the Batch API costs half. Cached input costs a tenth, plus an hourly storage fee on some models.
- DeepSeek: no batch tier, but every hour outside two weekday windows is off-peak at half price. Cache hits cost a thirtieth of the base rate or less.
- xAI: the Batch API takes 20% off on the main Grok models. Cached input costs a quarter of the base rate on Grok 4.7 and less on Grok 4.3.
Long prompts cost more on some models
Several providers charge a higher rate for the whole request once the prompt passes a size. OpenAI does it above 272,000 input tokens, xAI above 200,000, and Google above 200,000 on its Pro models. Claude Haiku 5.5 switches above 100,000 tokens, while the other current Claude models bill a full 1 million tokens at the standard rate. The calculator’s workloads stay under every threshold.
Through a router
OpenRouter sends one API to many providers. It bills inference at the provider’s list price with no markup per request and charges a fee when you buy credits: 5.5% on the standard plan. A routed model can cost a different amount than on the maker’s own page when OpenRouter sends it to another host.
$0.15FAQ
Which AI API is cheapest?
Going by each maker’s own page, OpenAI’s gpt-5-nano is the cheapest, at $0.05 per million input tokens and $0.40 per million output tokens. Among each maker’s main models, gpt-6-luna and Claude Haiku 5.5 cost $0.10 in and $0.50 out, and DeepSeek V4.1 Flash costs $0.15 in off-peak. The cheapest model for you is the smallest one that does the job without retries.
What is a token?
A piece of text the model reads or writes, often a short word or part of a longer one. Providers bill input tokens (your prompt, files and chat history) and output tokens (the answer) at separate rates.
Why do output tokens cost more than input?
The model writes output one token at a time, while it reads the whole input in one pass. On the models above, output costs 2 to 8.5 times the input rate.
Does a ChatGPT or Claude subscription include API use?
No. The chat apps and the APIs are billed separately. API use is paid per token, with no subscription needed.
How often do API prices change?
Often. Google has increases scheduled for December 1, 2026 and January 1, 2027, and new models usually launch at new prices. We check each provider’s page and show the date of the last check above the calculator.
Sources
- Anthropic, Claude API pricing documentation, checked 2026-11-04
- OpenAI, API pricing documentation, checked 2026-11-04
- Google, Gemini Developer API pricing, checked 2026-11-04
- DeepSeek, API models and pricing documentation, checked 2026-11-04
- xAI, API pricing and models documentation, checked 2026-11-04
- OpenRouter, pricing page and FAQ, checked 2026-11-04
Spotted a wrong price? Write to support@gptx.io and we will check it.
Next up4 minClaude API pricing$0.10Every Claude model, with batch and prompt caching rates.