AI API Pricing
Calculator
Compare token costs across OpenAI GPT-5.4, Anthropic Claude, Google Gemini 3.1, and DeepSeek. Estimate your monthly API spend with batch pricing, prompt caching, and budget planning.
Set Your Usage
Enter your average input/output tokens per request and daily request volume.
Compare Models
See real-time cost comparisons across all major AI providers with visual charts.
Optimize Costs
Toggle batch pricing and cache hit rate to find the cheapest option for your workload.
Monthly Cost Comparison
| Model | Daily | Monthly |
|---|---|---|
GPT-4.1 Nano | $0.0300 | $0.9000 |
GPT-4o Mini | $0.0500 | $1.35 |
DeepSeek V3 | $0.0800 | $2.46 |
Gemini 3.1 Flash Lite | $0.1000 | $3.00 |
GPT-4.1 Mini | $0.1200 | $3.60 |
Gemini 2.5 Flash | $0.1600 | $4.65 |
DeepSeek R1 | $0.1600 | $4.94 |
Gemini 3 Flash | $0.2000 | $6.00 |
o4 Mini | $0.3300 | $9.90 |
Claude Haiku 4.5 | $0.3500 | $10.50 |
GPT-4.1 | $0.6000 | $18.00 |
Gemini 2.5 Pro | $0.6300 | $18.75 |
GPT-4o | $0.7500 | $22.50 |
Gemini 3.1 Pro | $0.8000 | $24.00 |
GPT-5.4 | $1.00 | $30.00 |
Claude Sonnet 4.6 | $1.05 | $31.50 |
Claude Opus 4.6 | $1.75 | $52.50 |
o3 | $3.00 | $90.00 |
Prices as of March 2026. Actual costs may vary. Check each provider's pricing page for the latest rates.
AI API Pricing Comparison (March 2026)
Per 1 million token pricing for major AI model providers. Prices updated March 2026.
| Model | Provider | Input / 1M | Output / 1M |
|---|---|---|---|
| GPT-5.4 | OpenAI | $2.50 | $15.00 |
| GPT-4.1 | OpenAI | $2.00 | $8.00 |
| GPT-4.1 Mini | OpenAI | $0.40 | $1.60 |
| GPT-4.1 Nano | OpenAI | $0.10 | $0.40 |
| o3 | OpenAI | $10.00 | $40.00 |
| o4 Mini | OpenAI | $1.10 | $4.40 |
| Claude Opus 4.6 | Anthropic | $5.00 | $25.00 |
| Claude Sonnet 4.6 | Anthropic | $3.00 | $15.00 |
| Claude Haiku 4.5 | Anthropic | $1.00 | $5.00 |
| Gemini 3.1 Pro | $2.00 | $12.00 | |
| Gemini 3 Flash | $0.50 | $3.00 | |
| Gemini 3.1 Flash Lite | $0.25 | $1.50 | |
| Gemini 2.5 Pro | $1.25 | $10.00 | |
| Gemini 2.5 Flash | $0.30 | $2.50 | |
| DeepSeek V3 | DeepSeek | $0.27 | $1.10 |
| DeepSeek R1 | DeepSeek | $0.55 | $2.19 |
Prices shown are standard API rates per 1 million tokens as of March 2026. Prompt caching and batch processing can reduce costs by 50-90%. Check each provider's pricing page for the most current rates.
AI API Pricing FAQ
5 Ways to Reduce Your AI API Costs
Practical strategies to optimize your AI spending without sacrificing quality.
1. Use Prompt Caching
Cache your system prompts and repeated context. Anthropic offers 90% off cached tokens, OpenAI's GPT-4.1 offers 75% off, and Google offers 75% off. If your system prompt is 2,000 tokens and you make 10,000 requests/day, caching saves $15-50/month on input tokens alone.
2. Batch Non-Urgent Requests
Use the Batch API for tasks that don't need real-time responses (data analysis, content generation, classification). You get 50% off both input and output tokens. Submit requests and get results within 24 hours.
3. Choose the Right Model
Don't use GPT-5.4 for tasks that GPT-4.1 Nano can handle. Start with the cheapest model and only upgrade if quality is insufficient. For simple classification or extraction, budget models are often 95%+ as accurate at 1/20th the cost.
4. Optimize Your Prompts
Shorter prompts = fewer input tokens = lower costs. Remove filler words, use concise instructions, and avoid repeating context. A well-crafted 500-token prompt often outperforms a verbose 2,000-token one.
5. Set Max Output Tokens
Always set a max_tokens limit on your API calls. Without it, the model might generate unnecessarily long responses. For structured outputs (JSON, short answers), setting a tight limit prevents wasted output tokens.