LLM API costs can quietly become your largest infrastructure expense. The difference between picking the right model and the wrong one for a given task can mean 10x to 50x cost variance on the same workload. A SaaS company processing 10 million tokens per month could pay $3 or $110 depending on provider and model choice.
This guide compares every major LLM API provider's confirmed March 2026 pricing, then shows you exactly how to cut costs with caching, batching, model routing, and smart architecture decisions.
- 1. OpenAI Pricing (GPT-5.4, GPT-4.1, o3/o4)
- 2. Google Gemini Pricing
- 3. Anthropic Claude Pricing
- 4. DeepSeek Pricing
- 5. Other Providers (Mistral, Grok, Qwen)
- 6. Side-by-Side Cost Comparison
- 7. Real-World Example: 10M Tokens/Month
- 8. Cost Optimization Strategies
- 9. Hidden Costs and Gotchas
- 10. Decision Framework: Which Provider to Pick
1. OpenAI Pricing (GPT-5.4, GPT-4.1, o3/o4)
OpenAI offers the widest range of models in 2026, from the ultra-cheap GPT-4.1-nano to the flagship GPT-5.4. All models support the Batch API at 50% off.
| Model | Input ($/1M) | Output ($/1M) | Cached Input ($/1M) | Batch Input ($/1M) |
|---|---|---|---|---|
| GPT-5.4 | $2.50 | $15.00 | $0.25 | $1.25 |
| GPT-5.4-mini | $0.75 | $4.50 | $0.075 | $0.375 |
| GPT-5.4-nano | $0.20 | $1.25 | $0.020 | $0.10 |
| GPT-4o | $5.00 | $20.00 | $2.50 | $2.50 |
| GPT-4o-mini | $0.30 | $1.20 | $0.15 | $0.15 |
| GPT-4.1 | $4.00 | $16.00 | $1.00 | $2.00 |
| GPT-4.1-mini | $0.80 | $3.20 | $0.20 | $0.40 |
| GPT-4.1-nano | $0.20 | $0.80 | $0.05 | $0.10 |
| o3 | $4.00 | $16.00 | $1.00 | $2.00 |
| o3-mini | $2.20 | $8.80 | $0.55 | $1.10 |
| o4-mini | $2.00 | $8.00 | $0.50 | $1.00 |
The standout value is GPT-5.4: it is actually cheaper than GPT-4o ($2.50 vs $5.00 input) while being a newer, more capable model. For budget-sensitive workloads, GPT-4.1-nano at $0.20/$0.80 is hard to beat among OpenAI models.
2. Google Gemini Pricing
Google offers aggressive pricing, especially on Flash models. Gemini 2.0 Flash-Lite is the cheapest mainstream API option from a major provider.
| Model | Input ($/1M) | Output ($/1M) | Cache Read ($/1M) | Batch Input ($/1M) |
|---|---|---|---|---|
| Gemini 2.5 Pro | $1.25 / $2.50* | $10.00 / $15.00* | $0.125 / $0.25 | $0.625 / $1.25 |
| Gemini 2.5 Flash | $0.30 | $2.50 | $0.03 | $0.15 |
| Gemini 2.0 Flash | $0.10 | $0.40 | $0.025 | $0.05 |
| Gemini 2.0 Flash-Lite | $0.075 | $0.30 | - | $0.0375 |
* Gemini 2.5 Pro uses tiered pricing: the lower rate applies to the first 200K tokens in context, the higher rate for tokens beyond 200K.
Google also offers a free tier with daily token limits (approximately 6M tokens/day for some models), making it the only major provider with meaningful free API access for prototyping.
3. Anthropic Claude Pricing
Anthropic simplified its lineup in 2026 with the 4.5/4.6 generation. Claude Opus 4.6 saw a dramatic price drop from the previous Opus generation ($15/$75 down to $5/$25).
| Model | Input ($/1M) | Output ($/1M) | Cache Write 5min ($/1M) | Cache Read ($/1M) |
|---|---|---|---|---|
| Claude Opus 4.6 | $5.00 | $25.00 | $6.25 | $0.50 |
| Claude Sonnet 4.6 | $3.00 | $15.00 | $3.75 | $0.30 |
| Claude Haiku 4.5 | $1.00 | $5.00 | $1.25 | $0.10 |
4. DeepSeek Pricing
DeepSeek is the undisputed cost leader in 2026. Their V3.2 model with cache hits costs less than $0.50 per million tokens combined, making it 10-100x cheaper than flagship models from other providers.
| Model | Input - Cache Miss ($/1M) | Input - Cache Hit ($/1M) | Output ($/1M) |
|---|---|---|---|
| DeepSeek-V3.2 | $0.28 | $0.028 | $0.42 |
| DeepSeek-R1 | $0.55 | $0.14 | $2.19 |
DeepSeek-V3.2 with cache hits delivers a 10x discount on input tokens ($0.028 vs $0.28). For applications with repetitive prompts, this makes DeepSeek the cheapest option by a wide margin. The R1 reasoning model is also competitively priced at $0.55 input, undercutting OpenAI's o3/o4 models by 4-7x.
5. Other Providers (Mistral, Grok, Qwen)
| Provider | Model | Input ($/1M) | Output ($/1M) |
|---|---|---|---|
| Mistral AI | Mistral Large 3 | ~$0.50 | ~$1.50 |
| Mistral AI | Mistral Small 3 | ~$0.10 | ~$0.30 |
| Mistral AI | Ministral 8B | ~$0.10 | ~$0.30 |
| xAI | Grok 4.20 Beta | $2.00 | $6.00 |
| Alibaba | Qwen 3.5-397B | $0.60 | $3.60 |
| Alibaba | Qwen 3.5-27B | $0.30 | $2.40 |
Mistral Small 3 and Ministral 8B are strong budget options at $0.10/$0.30 per million tokens. Grok 4.20 from xAI is mid-range at $2.00/$6.00 but features a unique multi-agent architecture with a 2M token context window.
6. Side-by-Side Cost Comparison
Here is the complete pricing landscape ranked by combined cost (input + output per 1M tokens):
| Rank | Model | Combined $/1M | Category |
|---|---|---|---|
| 1 | Gemini 2.0 Flash-Lite | $0.375 | Ultra-budget |
| 2 | DeepSeek-V3.2 (cache hit) | $0.448 | Ultra-budget |
| 3 | Gemini 2.0 Flash | $0.50 | Ultra-budget |
| 4 | DeepSeek-V3.2 (cache miss) | $0.70 | Budget |
| 5 | GPT-4.1-nano | $1.00 | Budget |
| 6 | GPT-4o-mini | $1.50 | Budget |
| 7 | Gemini 2.5 Flash | $2.80 | Mid-range |
| 8 | DeepSeek-R1 | $2.74 | Mid-range (reasoning) |
| 9 | GPT-4.1-mini | $4.00 | Mid-range |
| 10 | Claude Haiku 4.5 | $6.00 | Mid-range |
| 11 | Gemini 2.5 Pro | $11.25 | Premium |
| 12 | GPT-5.4 | $17.50 | Premium |
| 13 | Claude Sonnet 4.6 | $18.00 | Premium |
| 14 | GPT-4o | $25.00 | Flagship |
| 15 | Claude Opus 4.6 | $30.00 | Flagship |
The price gap between the cheapest and most expensive options is 80x. Gemini 2.0 Flash-Lite at $0.375/M combined costs 80 times less than Claude Opus 4.6 at $30/M. This makes model selection the single most impactful cost decision.
7. Real-World Example: 10M Tokens/Month
A typical SaaS application processing 10M tokens per month (70% input, 30% output) would pay:
| Model | Input Cost (7M) | Output Cost (3M) | Monthly Total | With Batch API |
|---|---|---|---|---|
| DeepSeek-V3.2 (hit) | $0.20 | $1.26 | $1.46 | - |
| GPT-4o-mini | $2.10 | $3.60 | $5.70 | $2.85 |
| Gemini 2.5 Flash | $2.10 | $7.50 | $9.60 | $4.80 |
| Claude Haiku 4.5 | $7.00 | $15.00 | $22.00 | - |
| GPT-5.4 | $17.50 | $45.00 | $62.50 | $31.25 |
| Claude Sonnet 4.6 | $21.00 | $45.00 | $66.00 | - |
| GPT-4o | $35.00 | $60.00 | $95.00 | $47.50 |
| Claude Opus 4.6 | $35.00 | $75.00 | $110.00 | - |
The same 10M token workload costs $1.46 on DeepSeek-V3.2 (with caching) versus $110 on Claude Opus 4.6. Even within OpenAI's ecosystem, switching from GPT-4o to GPT-4o-mini saves $89.30 per month, or over $1,000 per year.
8. Cost Optimization Strategies
Prompt Caching (50-90% savings)
All major providers now support some form of input caching. The savings are dramatic:
- OpenAI: Cached input at 50% of standard price (GPT-5.4: $1.25 vs $2.50)
- Anthropic: Cache read at 90% off (Sonnet 4.6: $0.30 vs $3.00)
- DeepSeek: Cache hit at 90% off (V3.2: $0.028 vs $0.28)
- Google: Context cache as low as $0.025/M (Gemini 2.0 Flash)
If your app sends the same system prompt on every request, caching is the single highest-impact optimization you can make.
Batch API (50% savings)
OpenAI and Google both offer Batch APIs that cut costs by 50%. The tradeoff is higher latency (results within hours, not seconds). This is ideal for bulk processing, data extraction, content generation, and any non-real-time workload.
Model Routing / Cascading (20-50% savings)
Route simple tasks (classification, extraction, formatting) to cheap models like GPT-4.1-nano or DeepSeek-V3.2, and only escalate to premium models (GPT-5.4, Claude Sonnet 4.6) for complex reasoning. A well-designed router can cut costs by 30-50% while maintaining quality where it matters.
Fine-Tuning for Repetitive Tasks
If you process thousands of similar requests daily, fine-tuning a smaller model can replace a larger one. OpenAI charges ~$20/hour for fine-tuning training. The break-even point depends on volume, but for high-throughput applications, fine-tuned GPT-4.1-mini can match GPT-4o quality at 6x lower cost.
Token Optimization (10-30% savings)
Shorter prompts, structured output formats (JSON), response length limits via max_tokens, and removing unnecessary few-shot examples can reduce token consumption by 10-30% with zero quality impact.
9. Hidden Costs and Gotchas
- Vision/image inputs: Gemini charges per image (~560 tokens or $0.0011 each). Image output pricing can reach $60/M tokens, which is 6x higher than text output.
- Tool/function calling overhead: Each function definition adds ~70 extra tokens to every request. With 10 tools defined, that is 700 tokens of overhead per call.
- Rate limits: Free and low-tier accounts face strict rate limits. Hitting them means queuing delays, which translates to slower user experience or the need for expensive tier upgrades.
- Embedding models: Separate cost. OpenAI embeddings run ~$0.30-3.00/M tokens. Heavy RAG pipelines can accumulate significant embedding costs.
- Fine-tuning training: OpenAI charges $10-100/hour depending on model size. A single training run on GPT-4.1 can cost $200+ before you process a single inference token.
- Regional pricing: Anthropic charges +10% for US-region data processing on Claude models. AWS Bedrock and Google Vertex may add their own markup on top of base API prices.
10. Decision Framework: Which Provider to Pick
| Priority | Best Choice | Why |
|---|---|---|
| Lowest cost | DeepSeek-V3.2 / Gemini 2.0 Flash-Lite | Under $0.50/M combined. DeepSeek with caching drops to $0.028 input. |
| Best quality | GPT-5.4 / Claude Opus 4.6 / Gemini 2.5 Pro | Top benchmark scores. Use caching and batching to manage costs. |
| Lowest latency | GPT-4o-mini / Gemini 2.0 Flash | Small models with sub-second response times for real-time applications. |
| Best reasoning | o3 / o4-mini / DeepSeek-R1 | Reasoning-optimized models. DeepSeek-R1 is 4-7x cheaper than o3/o4. |
| Privacy / self-host | Mistral / DeepSeek (open-weight) | Run on your own infrastructure. No data leaves your servers. |
| Free prototyping | Google Gemini (free tier) | ~6M tokens/day free. Best for testing and development. |
The smartest approach for most teams? Use a model router. Send 80% of requests to a cheap model (DeepSeek-V3.2 or GPT-4.1-nano), route complex tasks to a premium model (GPT-5.4 or Claude Sonnet 4.6), and enable caching everywhere. This combination typically reduces API costs by 60-80% compared to using a single flagship model for everything.
LLM API pricing in 2026 spans an 80x range from $0.375/M (Gemini Flash-Lite) to $30/M (Claude Opus 4.6). The three highest-impact cost strategies are: prompt caching (50-90% savings on input), Batch API (50% off with OpenAI/Google), and model routing (use cheap models for simple tasks). A SaaS company processing 10M tokens/month can reduce costs from $110 to under $5 by combining these strategies with the right model selection.