AI API Pricing
Comparison 2026.
Every major AI model, ranked from cheapest to most expensive. Input and output token costs, free tiers, and use case recommendations — updated April 2026.
Complete Pricing Table (Cheapest First)
| Model | Company | Input / 1M | Output / 1M | Free Tier |
|---|---|---|---|---|
| Llama 4 Maverick | Meta AI | Free | Free | ✓ Yes |
| Phi-4 (14B) | Microsoft | Free | Free | ✓ Yes |
| Gemini 2.0 Flash | $0.10 | $0.40 | ✓ Yes | |
| Doubao Pro | ByteDance | $0.10 | $0.20 | ✓ Yes |
| DeepSeek R1 | DeepSeek | $0.14 | $2.19 | ✓ Yes |
| DeepSeek Coder V2 | DeepSeek | $0.14 | $0.28 | ✓ Yes |
| Claude Haiku 4.5 | Anthropic | $0.25 | $1.25 | ✓ Yes |
| Qwen 2.5 Max | Alibaba | $1.20 | $3.60 | ✓ Yes |
| Mistral Large 2 | Mistral AI | $2.00 | $6.00 | — |
| GPT-4o | OpenAI | $2.50 | $10.00 | ✓ Yes |
| Claude Sonnet 4.6 | Anthropic | $3.00 | $15.00 | — |
| Gemini 2.5 Pro | $4.00 | $12.00 | ✓ Yes | |
| Claude Opus 4.7 | Anthropic | $5.00 | $25.00 | — |
| OpenAI o3 | OpenAI | $15.00 | $60.00 | — |
| GPT-5 Preview | OpenAI | $50.00 | $200.00 | — |
* Prices are per million tokens as of April 2026. Prices may change — verify with provider before purchasing.
How to Choose the Right Pricing Tier
Budget ($0–$0.5/1M input)
DeepSeek R1, Gemini 2.0 Flash, Claude Haiku 4.5, Doubao Pro
High-volume classification, customer support bots, content moderation, data extraction pipelines.
May sacrifice some quality on complex reasoning tasks.
Mid-Range ($1–$5/1M input)
Claude Sonnet 4.6, GPT-4o, Gemini 2.5 Pro, Qwen 2.5 Max
Professional coding assistants, document analysis, content generation, most business applications.
Best price-to-performance for most use cases.
Premium ($5+/1M input)
Claude Opus 4.7, o3, GPT-5 Preview
Scientific research, complex legal/financial analysis, advanced agentic systems requiring frontier reasoning.
Use sparingly — costs add up quickly at scale.
Frequently Asked Questions
Which AI API is cheapest in 2026?
The cheapest AI APIs in 2026 are Llama 4 Maverick and Phi-4 (free, self-hosted), followed by Doubao Pro ($0.10/1M input) and DeepSeek Coder V2 ($0.14/1M input) for hosted access.
Is there a free AI API?
Yes. Gemini 2.0 Flash and Gemini 2.5 Pro are available for free via Google AI Studio. Claude Haiku 4.5 has a free tier. Llama 4, Phi-4, and DeepSeek R1 are fully free open-source models you can download and run yourself.
How much does the Claude API cost?
Claude Opus 4.7 costs $5/1M input tokens and $25/1M output tokens. Claude Sonnet 4.6 costs $3/1M input and $15/1M output. Claude Haiku 4.5 is the cheapest at $0.25/1M input and $1.25/1M output.
How much does GPT-4o cost?
GPT-4o costs $2.50 per million input tokens and $10.00 per million output tokens via the OpenAI API. It is also available for free through ChatGPT.
Filter 60+ models by capability, type, and company.
Structured courses for ChatGPT, Claude, and Gemini.
Copy-paste templates optimized for every use case.
Ready to pick a model?
Browse our full directory with benchmarks, capabilities, and reviews.