Every major AI API ranked by cost per token. Updated July 2026 with the latest pricing from OpenAI, Anthropic, Google, Meta, and Mistral.
Prices are per million tokens (1M tokens ≈ 750,000 words). Sorted by input token cost, lowest first. Current models only — retired models (Claude 3.x, Gemini 1.5/2.0) have been removed.
| # | Model | Provider | Input /1M | Output /1M | Best For |
|---|---|---|---|---|---|
| 1 | Gemini 2.5 Flash-Lite | $0.10 | $0.40 | Ultra budget | |
| 2 | GPT-4o mini (legacy) | OpenAI | $0.15 | $0.60 | High volume |
| 3 | Gemini 3.1 Flash-Lite | $0.25 | $1.50 | Budget reasoning | |
| 4 | Gemini 2.5 Flash | $0.30 | $2.50 | Long context | |
| 5 | Gemini 3 Flash | $0.50 | $3.00 | Fast frontier | |
| 6 | GPT-5.4 mini | OpenAI | $0.75 | $4.50 | Agents, tools |
| 7 | Claude Haiku 4.5 | Anthropic | $1.00 | $5.00 | Quality budget |
| 8 | Gemini 2.5 Pro | $1.25 | $10.00 | Reasoning | |
| 9 | Gemini 3.1 Pro | $2.00 | $12.00 | Premium multimodal | |
| 10 | GPT-5.4 | OpenAI | $2.50 | $15.00 | Workhorse |
Google's most affordable model in 2026. Flash-Lite is designed for simple, repetitive tasks at extreme scale. It handles classification, extraction, summarization, and basic Q&A well. Not suitable for complex multi-step reasoning or nuanced writing.
OpenAI's legacy budget model still punches above its price and remains callable. It delivers strong performance on structured tasks, follows instructions reliably, and integrates with OpenAI's tools ecosystem. If you want the current-generation equivalent, GPT-5.4 mini ($0.75/$4.50) adds newer capability at a higher floor.
A step up from Flash-Lite with a massive 1M token context window — making it a strong budget choice for long-document processing. Summarizing a 200-page PDF costs only a few cents in input tokens.
Assume a customer support chatbot processing 1 million requests/month with 500 input + 200 output tokens each:
| Model | Input Cost | Output Cost | Monthly Total | vs GPT-4o (legacy) |
|---|---|---|---|---|
| Gemini 2.5 Flash-Lite | $50 | $80 | $130 | -96% |
| GPT-4o mini (legacy) | $75 | $120 | $195 | -94% |
| Claude Haiku 4.5 | $500 | $1,000 | $1,500 | -54% |
| GPT-4o (legacy) | $1,250 | $2,000 | $3,250 | — |
| Claude Sonnet 4.6 | $1,500 | $3,000 | $4,500 | +38% |
Meta's Llama and Mistral's open-weight models can be significantly cheaper when self-hosted, but running your own infrastructure adds complexity and fixed costs — and hosted pricing varies by provider. AIModelCalc currently tracks the three first-party providers (OpenAI, Anthropic, Google) where published per-token pricing is stable; for open-weight models, check your hosting provider's current rate, since it's often competitive with the cheapest closed-source options above.
Self-hosting makes sense if you process more than 50M tokens/month and have engineering capacity. Below that threshold, hosted APIs are simpler and often cheaper when you factor in GPU costs and maintenance.
Use our free calculator to estimate exactly what your workload will cost across all major models.
Calculate My AI API Cost →