Updated 2026-07-28
AI API Pricing Comparison 2026: GPT vs Claude vs Gemini
Full Pricing Table: All Models Compared
All major AI API models ranked by output price, from cheapest to most expensive. Prices are per million tokens.
| Model | Provider | Input / 1M | Output / 1M | Context Window | Tier |
|---|---|---|---|---|---|
| Gemini 3 Flash | $0.50 | $3 | 1M | budget | |
| Claude Haiku 4.5 | Anthropic | $1 | $5 | 200K | budget |
| GPT-5.6 Luna | OpenAI | $1 | $6 | 1.05M | budget |
| Gemini 3.5 Flash | $1.50 | $9 | 1M | balanced | |
| Claude Sonnet 5 | Anthropic | $2 | $10 | 1M | balanced |
| Gemini 3.1 Pro | $2 | $12 | 1M | balanced | |
| GPT-5.6 Terra | OpenAI | $2.50 | $15 | 1.05M | flagship |
| Claude Opus 4.8 | Anthropic | $5 | $25 | 1M | flagship |
| GPT-5.6 Sol | OpenAI | $5 | $30 | 1.05M | frontier |
| GPT-5.5 | OpenAI | $5 | $30 | 400K | flagship |
| Claude Fable 5 | Anthropic | $10 | $50 | 1M | frontier |
| GPT-5.5 Pro | OpenAI | $30 | $180 | 400K | frontier |
Output prices range from $3 (Gemini 3 Flash) to $180 (GPT-5.5 Pro) — a 60x difference.
Cheapest AI API for Chat Applications
Chat applications are input-heavy — each user message, system prompt, and conversation history counts as input tokens. For high-volume chat, input price matters most.
The three cheapest models by input price:
- Gemini 3 Flash — $0.50 / 1M input tokens. Processing 75,000 chat messages costs $1.01.
- GPT-5.6 Luna — $1 / 1M input tokens. Processing 75,000 chat messages costs $2.02.
- Claude Haiku 4.5 — $1 / 1M input tokens. Processing 75,000 chat messages costs $2.02.
Based on 75,000 messages at ~27 tokens per message (2,025,000 total input tokens).
Best Value for Code Generation
Code generation is output-heavy — the model writes more tokens than it reads. Output price is the dominant cost factor here.
The three cheapest models by output price:
- Gemini 3 Flash — $3 / 1M output tokens. Generating 10,000 lines of code costs $0.30.
- Claude Haiku 4.5 — $5 / 1M output tokens. Generating 10,000 lines of code costs $0.50.
- GPT-5.6 Luna — $6 / 1M output tokens. Generating 10,000 lines of code costs $0.60.
Based on 10,000 lines at ~10 tokens per line (100,000 total output tokens).
Most Affordable for Document Analysis
Document analysis is input-heavy — you feed in large amounts of text and get back relatively short summaries or answers. Input price dominates.
Cost of processing 1,000 pages across the cheapest models:
- Gemini 3 Flash — $0.50 / 1M input tokens. Processing 1,000 pages costs $0.33.
- GPT-5.6 Luna — $1 / 1M input tokens. Processing 1,000 pages costs $0.67.
- Claude Haiku 4.5 — $1 / 1M input tokens. Processing 1,000 pages costs $0.67.
Based on 1,000 pages at ~667 tokens per page (667,000 total input tokens).
Real-World Cost Examples
Three concrete scenarios showing the range between the cheapest and most expensive models.
Processing 100 PDFs
100 documents at 20 pages each = 2,000 pages (1,334,000 input tokens)
Cheapest: Gemini 3 Flash — $0.67
Most expensive: GPT-5.5 Pro — $40.02
Building a Chatbot
1,000 messages/day for 30 days (810,000 input tokens)
Cheapest: Gemini 3 Flash — $0.41
Most expensive: GPT-5.5 Pro — $24.30
Analyzing 1,000 Images
1,000 images at ~1,000 tokens each (1,000,000 input tokens)
Cheapest: Gemini 3 Flash — $0.50
Most expensive: GPT-5.5 Pro — $30
How to Choose the Right Model
Use frontier models (like GPT-5.6 Sol) when accuracy matters most — complex reasoning, nuanced writing, or tasks where mistakes are costly. The higher price buys measurably better performance on hard problems.
Use budget models (like Gemini 3 Flash) for high-volume, routine tasks — classification, summarization, simple chat, or data extraction. They're often 10–60x cheaper and perfectly adequate for straightforward work.
Start cheap, upgrade selectively. Run your workload on a budget model first. If quality isn't sufficient, move up one tier at a time. Most teams find that 80% of their API calls work fine on balanced or budget models, with only the hardest tasks needing frontier.
Want to see exactly what your budget buys?
Try our AI token calculator — pick a model, set a budget, and see how many words, pages, or lines of code you get.