StackPricing

AI model APIs · cost calculator

What does your AI usage really cost?

AI APIs bill two meters at once — input tokens and output tokens — and the rates span 147× between the cheapest and priciest model at the same usage. Enter your monthly volume and every model is re-priced from its official rate card, cheapest first.

Lowest cost At 10M in / 3M out, go with Qwen-Flash$1.70/mo cheapest frontier-class: GLM-5.2 at $27.2/mo

Model $/1M in · out Cost / month Link
01 Qwen-Flash Lowest cost $0.05 · $0.40 $1.70/mo Details
02 Gemini 2.5 Flash-Lite $0.10 · $0.40 $2.20/mo Details
03 DeepSeek V4 Flash $0.14 · $0.28 $2.24/mo Details
04 Mistral Small 4 $0.15 · $0.60 $3.30/mo Details
05 GPT-5.4 Nano $0.20 · $1.25 $5.75/mo Details
06 MiniMax M3 $0.30 · $1.2 $6.60/mo Details
07 DeepSeek V4 Pro $0.43 · $0.87 $6.96/mo Details
08 Gemini 3.1 Flash-Lite $0.25 · $1.5 $7/mo Details
09 Qwen-Plus $0.40 · $1.2 $7.60/mo Details
10 Mistral Large 3 $0.50 · $1.5 $9.50/mo Details
11 GLM-4.7 $0.60 · $2.2 $12.6/mo Details
12 Grok 4.3 $1.25 · $2.5 $20/mo Details
13 GPT-5.4 Mini $0.75 · $4.5 $21/mo Details
14 Kimi K2.6 $0.95 · $4 $21.5/mo Details
15 Claude Haiku 4.5 $1 · $5 $25/mo Details
16 GLM-5.2 $1.4 · $4.4 $27.2/mo Details
17 GPT-5.6 Luna $1 · $6 $28/mo Details
18 Qwen3-Max $1.2 · $6 $30/mo Details
19 Mistral Medium 3.5 $1.5 · $7.5 $37.5/mo Details
20 Grok 4.5 $2 · $6 $38/mo Details
21 Gemini 3.5 Flash $1.5 · $9 $42/mo Details
22 Gemini 3.1 Pro $2 · $12 $56/mo Details
23 GPT-5.6 Terra $2.5 · $15 $70/mo Details
24 Claude Sonnet 5 $3 · $15 $75/mo Details
25 Kimi K3 $3 · $15 $75/mo Details
26 Claude Opus 4.8 $5 · $25 $125/mo Details
27 GPT-5.6 Sol $5 · $30 $140/mo Details
28 Claude Fable 5 $10 · $50 $250/mo Details

Standard on-demand rates from each provider's official pricing page, verified July 2026. Figures exclude prompt-caching discounts, batch-API discounts (typically 50%), and long-context surcharges (Gemini 3.1 Pro and Grok roughly double above 200k-token prompts). Rankings are by price only — quality differs; confirm live pricing before committing.

Key facts · verified July 2026

Why your input:output mix matters

Per-token pricing is linear, so there are no volume cliffs — but because every provider marks up output tokens differently, the cheapest model flips with your mix. Two real examples from the current rate cards:

All 28 models by provider

OpenAI

Anthropic

Google

xAI

DeepSeek

Mistral

Moonshot AI

MiniMax

Alibaba Qwen

Z.ai

Compare head-to-head

Claude Fable 5 vs GPT-5.6 SolClaude Opus 4.8 vs GPT-5.6 SolClaude Fable 5 vs Claude Opus 4.8Gemini 3.1 Pro vs GPT-5.6 SolClaude Opus 4.8 vs Gemini 3.1 ProGemini 3.1 Pro vs Grok 4.5GPT-5.6 Sol vs Grok 4.5Claude Opus 4.8 vs Grok 4.5Claude Sonnet 5 vs GPT-5.6 TerraClaude Sonnet 5 vs Gemini 3.5 FlashGemini 3.5 Flash vs GPT-5.6 TerraGemini 3.5 Flash vs Grok 4.3