๐Ÿค– AI Tools
ยท 4 min read
Last updated on

AI API Pricing Compared: Every Provider in One Table (2026)


AI API pricing has dropped 85% since GPT-4 launched in 2023. Frontier model input now costs under $3/1M tokens. But prices vary wildly between providers, and the cheapest model isnโ€™t always the cheapest for your use case.

Hereโ€™s every major providerโ€™s pricing in one place.

Frontier models

๐Ÿ†• June 10, 2026: Claude Fable 5 launched โ€” Anthropicโ€™s most powerful model ever at $10/$50 per million tokens. Itโ€™s a new premium tier above Opus, scoring 95% on SWE-bench Verified. See our full pricing analysis.

ModelInput/1MOutput/1MContextProvider
Claude Fable 5 ๐Ÿ†•$10.00$50.001MAnthropic
GPT-5.4$2.50$15.001MOpenAI
GPT-5.4 Pro$30.00$180.001MOpenAI
Claude Opus 4.8$5.00$25.001MAnthropic
Claude Opus 4.6$15.00$75.001MAnthropic
Claude Sonnet 4$3.00$15.00200KAnthropic
Gemini 3.5 Flash$1.50$9.001MGoogle
Gemini 3.1 Pro$2.00$12.001M+Google
Gemini 2.5 Pro$1.25$5.001MGoogle

Mid-tier models (best value)

ModelInput/1MOutput/1MContextProvider
GPT-5.4 Mini$0.75$4.50400KOpenAI
Claude Haiku 4$0.25$1.25200KAnthropic
Gemini 2.5 Flash$0.15$0.601MGoogle
Mistral Large 2$2.00$6.00128KMistral
Mistral Small$0.10$0.3032KMistral

Budget models (cheapest)

ModelInput/1MOutput/1MContextProvider
DeepSeek V4-Flash$0.14$0.281MDeepSeek
DeepSeek V4-Pro$1.74$3.481MDeepSeek
DeepSeek Chat$0.14$0.28128KDeepSeek
DeepSeek Reasoner$0.55$2.19128KDeepSeek
GPT-5 Mini$0.25$2.00128KOpenAI
Qwen 3.6 PlusFree tierFree tier1MAlibaba
Qwen 3.6 Flash$0.25$1.001MAlibaba
Qwen 3.6 Max Preview$1.50$6.001MAlibaba
GLM-5.1Free tierFree tier128KZ.ai

Open-source via hosting providers

New (April 24, 2026): DeepSeek V4-Flash at $0.14/$0.28 per 1M tokens is now the cheapest frontier-class model available โ€” scoring 79.0% on SWE-bench with 1M context. V4-Pro at $1.74/$3.48 scores 80.6%. Both MIT licensed. See V4 Flash: cheapest frontier model.

ModelProviderInput/1MOutput/1M
Llama 4 MaverickTogether AI~$0.49~$0.49
Llama 4 ScoutTogether AI~$0.10~$0.10
Qwen 3.5 27BFireworks~$0.20~$0.20
Any modelOllama (local)$0$0
Any modelOpenRouterVariesVaries

Tired of API costs? Self-hosting can be cheaper long-term. See how to self-host an LLM for โ‚ฌ4.99/month or deploy on Vultr with $250 free credits.

Cost per common task

What does a typical developer task actually cost?

TaskTokens (approx)GPT-5.4GPT-5.4 MiniDeepSeekLocal
Code review (1 file)3K in / 1K out$0.02$0.007$0.001$0
Bug fix5K in / 2K out$0.04$0.01$0.002$0
Full feature10K in / 5K out$0.10$0.03$0.005$0
Codebase analysis50K in / 5K out$0.20$0.06$0.01$0
8-hour coding session500K in / 100K out$2.75$0.83$0.10$0

Monthly cost estimates

Usage levelGPT-5.4GPT-5.4 MiniDeepSeekLocal
Light (10 tasks/day)$6-12$2-4$0.30-0.60$0
Medium (50 tasks/day)$30-60$10-20$1.50-3$0
Heavy (200 tasks/day)$120-240$40-80$6-12$0

The smart approach: model routing

Donโ€™t use one model for everything. Route by task complexity:

async def route(message, complexity):
    if complexity == "simple":
        return await call("deepseek-chat", message)      # $0.001
    elif complexity == "medium":
        return await call("gpt-5.4-mini", message)       # $0.01
    else:
        return await call("claude-sonnet-4", message)     # $0.04

This gives you frontier quality when you need it and near-zero cost when you donโ€™t. See our model routing guide for implementation details.

Free tiers worth using

ProviderWhatโ€™s freeLimitation
Gemini CLIFull CLI accessRate limited
Qwen 3.6 PlusAPI accessRate limited
GLM-5.1Z.ai free tierQuota limited
OpenRouterSeveral free modelsModel-dependent
OllamaUnlimited localHardware-dependent

See our free AI coding tier review for real-world testing of each.

Input token costs have dropped ~85% since 2023. The trend continues as competition intensifies between OpenAI, Anthropic, Google, and Chinese providers. Expect another 30-50% drop by end of 2026.

The biggest driver: open-source models (GLM-5.1, Qwen 3.6, Llama 4) matching proprietary quality at zero cost, forcing paid providers to lower prices.

Related: AI Coding Tools Pricing ยท FinOps for AI ยท AI Agent Cost Management ยท Monitor AI API Spending ยท OpenRouter Complete Guide ยท Cheapest AI Coding Setup ยท Tested Every Free AI Tier