whichAI
Updated 2026-06-06

AI API Pricing 2026

Per-token pricing for every major AI API — Anthropic, OpenAI, Google, xAI, DeepSeek, Mistral. Enter your usage to calculate real monthly costs.

← Subscription plansAPI vs subscription optimizer →
Cheapest overall
DeepSeek V4 Flash
$0.14 / $0.28 per MTok
Best value general
Gemini 2.5 Flash
$0.30 / $2.50 per MTok
Best for coding
Mistral Codestral
$0.30 / $0.90 per MTok
Most powerful
Claude Opus 4.8
$5.00 / $25.00 per MTok

💰 Monthly Cost Calculator

~750 words ≈ 1K tokens
~375 words ≈ 500 tokens
= 30,000/month
Your usage estimate
30.00Minput tokens/mo
15.00Moutput tokens/mo
30,000requests/mo

Prompt caching not applied — can reduce input costs up to 90% for repeated system prompts.

Filter:
ModelProviderTierInput / 1MOutput / 1MCached / 1MContextEst. Monthly CostBest for
DeepSeek V4 Flash
One of the cheapest frontier-class APIs available. Strong on coding benchmarks.
DeepSeek⚡ Fast
$0.14
/1M
$0.28
/1M
128K
$8
/month
Budget coding tasks, high-volume text generation
Gemini 2.5 Flash-Lite
Cheapest model in Google lineup. Flat pricing on all context lengths.
Google (Gemini API)⚡ Fast
$0.1
/1M
$0.4
/1M
1M
$9
/month
Ultra-high-volume simple tasks, classification
GPT-4o mini
Still one of the best price-performance options for simple tasks.
OpenAI⚡ Fast
$0.15
/1M
$0.6
/1M
128K
$14
/month
Fast, cheap tasks — chat, simple QA, extraction
Mistral Small 4
Strong price-performance for EU-based applications.
Mistral AI⚡ Fast
$0.2
/1M
$0.6
/1M
128K
$15
/month
EU deployments, budget general tasks
Grok 3 Mini
Unusually favorable output-to-input price ratio.
xAI (Grok API)⚡ Fast
$0.3
/1M
$0.5
/1M
128K
$17
/month
Cost-effective tasks where X platform context is useful
Codestral
Purpose-built coding model. Very competitive pricing vs OpenAI/Anthropic for cod
Mistral AI💻 Coding
$0.3
/1M
$0.9
/1M
256K
$23
/month
Code completion, FIM (fill-in-the-middle), coding-specific tasks
GPT-5.4 Nano
Cheapest OpenAI model for production. Good for simple extraction and routing.
OpenAI⚡ Fast
$0.2
/1M
$1.25
/1M
128K
$25
/month
Ultra-high-volume simple tasks, classification, routing
Gemini 2.5 Flash
Best price-performance in current Gemini lineup. Free tier available.
Google (Gemini API)⚡ Fast
$0.3
/1M
$2.5
/1M
1M
$47
/month
High-volume general tasks, summarization, extraction
o3-mini
Reasoning tokens billed as output. Budget reasoning model.
OpenAI🧠 Reasoning
$1.1
/1M
$4.4
/1M
200K
$99
/month
Math, science, coding problems requiring deep reasoning
DeepSeek V4 Pro
Promotional pricing: $0.435/$0.87 (promo). Standard: $1.74/$3.48.
DeepSeek⚖️ Balanced
$1.74
/1M
$3.48
/1M
128K
$104
/month
Complex reasoning and coding at lower cost than OpenAI/Anthropic
Claude Haiku 4.5
Cheapest current-gen Claude. Replaces deprecated Haiku 3 ($0.25/$1.25).
Anthropic⚡ Fast
$1
/1M
$5
/1M
$0.1
cached
200K
$105
/month
Classification, routing, extraction, summarization, high-volume workloads
Mistral Large 3
Flagship Mistral model. Good alternative to GPT-4o for EU deployments.
Mistral AI🔥 Powerful
$2
/1M
$6
/1M
128K
$150
/month
Complex reasoning, EU compliance-sensitive tasks
Gemini 3.5 Flash
Launched May 19, 2026. Undercuts Gemini 3.1 Pro by ~25% on price with better ben
Google (Gemini API)⚖️ Balanced
$1.5
/1M
$9
/1M
1M
$180
/month
Coding, agentic tasks — beats 3.1 Pro on benchmarks at lower cost
Gemini 2.5 Pro
Best value for complex tasks in Gemini lineup. 2x surcharge beyond 200K.
Google (Gemini API)⚖️ Balanced
$1.25
/1M
$10
/1M
1M
$188
/month
Complex reasoning, coding, long-document analysis
Gemini 3.1 Pro
2x surcharge beyond 200K tokens. Being superseded by 3.5 Flash on cost/performan
Google (Gemini API)🔥 Powerful
$2
/1M
$12
/1M
1M
$240
/month
High-quality generation, complex analysis
GPT-5.4
Strong balance of capability and cost for most production workloads.
OpenAI⚖️ Balanced
$2.5
/1M
$15
/1M
128K
$300
/month
General purpose coding, analysis, content generation
Claude Sonnet 4.6
Best price-to-quality ratio for most production workloads. 1M context at flat ra
Anthropic⚖️ Balanced
$3
/1M
$15
/1M
$0.3
cached
1M
$315
/month
General coding, analysis, writing, RAG pipelines, agentic tasks
Grok 3
Positioned against Claude Sonnet and GPT-4o. Strong X/Twitter integration.
xAI (Grok API)⚖️ Balanced
$3
/1M
$15
/1M
128K
$315
/month
Real-time web data, X platform context, general reasoning
Claude Opus 4.8
Current flagship (released May 28, 2026). Fast Mode: $10/$50 per MTok. Significa
Anthropic🔥 Powerful
$5
/1M
$25
/1M
$0.5
cached
1M
$525
/month
Complex reasoning, agentic workflows, code review, long-context analysis
GPT-5.5
Flagship model. 1M context. Prompt caching 90% off.
OpenAI🔥 Powerful
$5
/1M
$30
/1M
$0.5
cached
1M
$600
/month
Complex reasoning, multi-step workflows, top-quality generation

Provider notes & discounts

verified 2026-06-06

Output tokens cost 5x input across all current models. Batch API: 50% discount. Prompt caching: 90% discount on cached input. 1M token context available on Opus 4.6/4.7/4.8 and Sonnet 4.6 at standard pricing.

batch: 50% off (24hr async processing)prompt cache: 90% off cached input tokenslong context surcharge: 2x input price beyond 200K tokens on some models
verified 2026-06-06

Batch API: 50% discount. Prompt caching: 90% off on GPT-5.5 and GPT-5.4 families. Priority tier: 2x cost for faster processing. Reasoning tokens billed as output on o-series models.

batch: 50% off (24hr async)prompt cache: 90% off cached input (GPT-5.5 and 5.4 families)priority: 2x standard for guaranteed faster processing

Google (Gemini API)

Official pricing ↗
verified 2026-06-06

Free tier: up to 1,000 daily requests on Flash models. Batch API: 50% discount. Context caching: 90% off. Long-context surcharge: 2x input beyond 200K on Pro models. Flash models: flat pricing regardless of context length.

batch: 50% off (24hr async)context cache: 90% off cached inputfree tier: 1,000 req/day on Flash modelslong context surcharge: 2x input beyond 200K tokens (Pro models only)

xAI (Grok API)

Official pricing ↗
verified 2026-06-06

New users receive $25 in free credits. Additional $150/month available via data sharing program. Deep X/Twitter platform integration.

new user credits: $25 freedata sharing: $150/month additional via data sharing program
verified 2026-06-06

Significantly cheaper than OpenAI/Anthropic for coding tasks. Privacy considerations: Chinese company. Web chat is free.

verified 2026-06-06

EU-based provider, strong GDPR compliance. Open-source models available. Good for EU privacy-conscious deployments.

API vs subscription: which is cheaper for you?

At ~2,000–2,200 interactions/month, Claude Sonnet API and Claude Pro subscription cost roughly the same. Below that, API wins. Above it, the flat $20/month Pro subscription is cheaper. Read our full breakdown:

API vs Subscription: When does pay-per-token save money? →

All prices in USD per 1 million tokens (MTok). Verify current rates at each provider's official pricing page before use in production. Cost calculator uses standard pricing; batch and caching discounts apply separately. Actual costs may vary based on model routing, context length, and feature usage.