LLM API Pricing Calculator: Compare OpenAI, Claude, Gemini, Mistral & More
Estimate real LLM API costs from your expected input and output tokens. Compare current models from OpenAI, Claude, Gemini, Mistral, Cohere, DeepSeek, Grok and more — with pricing, context windows and total cost in one place.
tokens
Use-case presets
Choose a realistic starting point, then fine-tune token values.
Quick result for 10,000,000 input tokens + 10,000,000 output tokens
Cheapest overall
Command R7B
$1.8750
Best pure price
Cheapest OpenAI
GPT-5 nano
$4.5000
Low-cost OpenAI option
Cheapest Gemini
Gemini 2.5 Flash-Lite
$5.0000
Low-cost Gemini option
Best long context
DeepSeek V4 Flash
$4.2000
Large context window
| Model | Provider | Status | Context Window | Input / 1M | Output / 1M | Total Cost |
|---|---|---|---|---|---|---|
|
Command R7B
|
Cohere | CURRENT | 128k tokens | $0.0375 | $0.1500 | $1.8750 |
|
Ministral 3 3B
|
Mistral | CURRENT | 256k tokens | $0.1000 | $0.1000 | $2.0000 |
|
Ministral 3 8B
|
Mistral | CURRENT | 256k tokens | $0.1500 | $0.1500 | $3.0000 |
|
Ministral 14 8B
|
Mistral | CURRENT | 256k tokens | $0.2000 | $0.2000 | $4.0000 |
|
DeepSeek V4 Flash
|
DeepSeek | CURRENT | 1m tokens | $0.1400 | $0.2800 | $4.2000 |
|
GPT-5 nano
|
OpenAI | CURRENT | 400k tokens | $0.0500 | $0.4000 | $4.5000 |
|
Gemini 2.5 Flash-Lite
|
CURRENT | 1m tokens | $0.1000 | $0.4000 | $5.0000 | |
|
GPT-4.1 nano
|
OpenAI | CURRENT | 1m tokens | $0.1000 | $0.4000 | $5.0000 |
|
Command R
|
Cohere | CURRENT | 128k tokens | $0.1500 | $0.6000 | $7.5000 |
|
Mistral Small 4
|
Mistral | CURRENT | 256k tokens | $0.1500 | $0.6000 | $7.5000 |
|
GPT-4o mini
|
OpenAI | CURRENT | 128k tokens | $0.1500 | $0.6000 | $7.5000 |
|
GPT-5.4 nano
|
OpenAI | CURRENT | 400k tokens | $0.2000 | $1.2500 | $14.5000 |
|
Gemini 3.1 Flash-Lite
|
CURRENT | 1m tokens | $0.2500 | $1.5000 | $17.5000 | |
|
Mistral Large 3
|
Mistral | CURRENT | 256k tokens | $0.5000 | $1.5000 | $20.0000 |
|
GPT-4.1 mini
|
OpenAI | CURRENT | 1m tokens | $0.4000 | $1.6000 | $20.0000 |
|
GPT-5 mini
|
OpenAI | CURRENT | 400k tokens | $0.2500 | $2.0000 | $22.5000 |
|
Mistral Medium 3.1
|
Mistral | CURRENT | 128k tokens | $0.4000 | $2.0000 | $24.0000 |
|
Gemini 2.5 Flash
|
CURRENT | 1m tokens | $0.3000 | $2.5000 | $28.0000 | |
|
Grok 4.3
|
xAI | CURRENT | 1m tokens | $1.2500 | $2.5000 | $37.5000 |
|
DeepSeek V4 Pro
|
DeepSeek | CURRENT | 1m tokens | $1.7400 | $3.4800 | $52.2000 |
|
GPT-5.4 mini
|
OpenAI | CURRENT | 400k tokens | $0.7500 | $4.5000 | $52.5000 |
|
o1-mini
|
OpenAI | CURRENT | 128k tokens | $1.1000 | $4.4000 | $55.0000 |
|
o3-mini
|
OpenAI | CURRENT | 200k tokens | $1.1000 | $4.4000 | $55.0000 |
|
o4-mini
|
OpenAI | CURRENT | 200k tokens | $1.1000 | $4.4000 | $55.0000 |
|
Claude Haiku 4.5
|
Anthropic | CURRENT | 200k tokens | $1.0000 | $5.0000 | $60.0000 |
|
Magistral Medium
|
Mistral | CURRENT | 128k tokens | $2.0000 | $5.0000 | $70.0000 |
|
Mistral Medium 3.5
|
Mistral | CURRENT | 256k tokens | $1.5000 | $7.5000 | $90.0000 |
|
GPT-4.1
|
OpenAI | CURRENT | 1m tokens | $2.0000 | $8.0000 | $100.0000 |
|
o3
|
OpenAI | CURRENT | 200k tokens | $2.0000 | $8.0000 | $100.0000 |
|
Gemini 3.5 Flash
|
CURRENT | 1m tokens | $1.5000 | $9.0000 | $105.0000 | |
|
Gemini 2.5 Pro
|
CURRENT | 1m tokens | $1.2500 | $10.0000 | $112.5000 | |
|
GPT-5
|
OpenAI | CURRENT | 400k tokens | $1.2500 | $10.0000 | $112.5000 |
|
GPT-5.1
|
OpenAI | CURRENT | 400k tokens | $1.2500 | $10.0000 | $112.5000 |
|
Command A
|
Cohere | CURRENT | 256k tokens | $2.5000 | $10.0000 | $125.0000 |
|
Command R+
|
Cohere | CURRENT | 128k tokens | $2.5000 | $10.0000 | $125.0000 |
|
GPT-4o
|
OpenAI | CURRENT | 128k tokens | $2.5000 | $10.0000 | $125.0000 |
|
Gemini 3.1 Pro
|
CURRENT | 1m tokens | $2.0000 | $12.0000 | $140.0000 | |
|
GPT-5.2
|
OpenAI | CURRENT | 400k tokens | $1.7500 | $14.0000 | $157.5000 |
|
GPT-5.4
|
OpenAI | CURRENT | 1.1m tokens | $2.5000 | $15.0000 | $175.0000 |
|
Claude Sonnet 4.5
|
Anthropic | CURRENT | 1m tokens | $3.0000 | $15.0000 | $180.0000 |
|
Claude Sonnet 4.6
|
Anthropic | CURRENT | 1m tokens | $3.0000 | $15.0000 | $180.0000 |
|
Claude Opus 4.5
|
Anthropic | CURRENT | 200k tokens | $5.0000 | $25.0000 | $300.0000 |
|
Claude Opus 4.6
|
Anthropic | CURRENT | 1m tokens | $5.0000 | $25.0000 | $300.0000 |
|
Claude Opus 4.7
|
Anthropic | CURRENT | 1m tokens | $5.0000 | $25.0000 | $300.0000 |
|
GPT-5.5
|
OpenAI | CURRENT | 1.1m tokens | $5.0000 | $30.0000 | $350.0000 |
|
o1
|
OpenAI | CURRENT | 200k tokens | $15.0000 | $60.0000 | $750.0000 |
|
Claude Opus 4.1
|
Anthropic | CURRENT | 200k tokens | $15.0000 | $75.0000 | $900.0000 |
|
o3-pro
|
OpenAI | CURRENT | 200k tokens | $20.0000 | $80.0000 | $1,000.0000 |
|
GPT-5 pro
|
OpenAI | CURRENT | 400k tokens | $15.0000 | $120.0000 | $1,350.0000 |
|
GPT-5.2 pro
|
OpenAI | CURRENT | 400k tokens | $21.0000 | $168.0000 | $1,890.0000 |
|
GPT-5.4 pro
|
OpenAI | CURRENT | 1.1m tokens | $30.0000 | $180.0000 | $2,100.0000 |
|
GPT-5.5 pro
|
OpenAI | CURRENT | 1.1m tokens | $30.0000 | $180.0000 | $2,100.0000 |
|
o1-pro
|
OpenAI | CURRENT | 200k tokens | $150.0000 | $600.0000 | $7,500.0000 |
Command R7B
Cohere
Ministral 3 3B
Mistral
Ministral 3 8B
Mistral
Ministral 14 8B
Mistral
DeepSeek V4 Flash
DeepSeek
GPT-5 nano
OpenAI
Gemini 2.5 Flash-Lite
GPT-4.1 nano
OpenAI
Command R
Cohere
Mistral Small 4
Mistral
GPT-4o mini
OpenAI
GPT-5.4 nano
OpenAI
Gemini 3.1 Flash-Lite
Mistral Large 3
Mistral
GPT-4.1 mini
OpenAI
GPT-5 mini
OpenAI
Mistral Medium 3.1
Mistral
Gemini 2.5 Flash
Grok 4.3
xAI
DeepSeek V4 Pro
DeepSeek
GPT-5.4 mini
OpenAI
o1-mini
OpenAI
o3-mini
OpenAI
o4-mini
OpenAI
Claude Haiku 4.5
Anthropic
Magistral Medium
Mistral
Mistral Medium 3.5
Mistral
GPT-4.1
OpenAI
o3
OpenAI
Gemini 3.5 Flash
Gemini 2.5 Pro
GPT-5
OpenAI
GPT-5.1
OpenAI
Command A
Cohere
Command R+
Cohere
GPT-4o
OpenAI
Gemini 3.1 Pro
GPT-5.2
OpenAI
GPT-5.4
OpenAI
Claude Sonnet 4.5
Anthropic
Claude Sonnet 4.6
Anthropic
Claude Opus 4.5
Anthropic
Claude Opus 4.6
Anthropic
Claude Opus 4.7
Anthropic
GPT-5.5
OpenAI
o1
OpenAI
Claude Opus 4.1
Anthropic
o3-pro
OpenAI
GPT-5 pro
OpenAI
GPT-5.2 pro
OpenAI
GPT-5.4 pro
OpenAI
GPT-5.5 pro
OpenAI
o1-pro
OpenAI
Building with these APIs?
You compared model costs. DigitalOcean can help host the rest of your stack — API backend, Laravel app, queues, workers, database, or small AI prototype.
This link is an affiliate link. This means that, at zero cost to you, we earn commissions when you shop through the link.
Frequently Asked Questions
Text generation API costs are calculated based on token usage - the fundamental unit of text processing. Providers charge for:
- Input tokens: Text sent to the model (prompts, instructions, context)
- Output tokens: Text generated by the model (completions, responses)
Each provider (OpenAI, Anthropic, Google Gemini, etc.) sets unique pricing tiers per 1,000,000 tokens, with premium models typically costing more than base models.
Input tokens represent the text you send to the LLM API (your prompt or context), while output tokens are what the model generates in response. For example:
- Input: "Write a summary about Paris." (6 tokens)
- Output: "Paris is the capital of France and a global center for art, fashion, and culture." (18 tokens)
Most providers charge different rates for input versus output tokens, with output tokens typically costing 2-5x more than input tokens.
Our Text generation API pricing database is monitored and updated regularly. We track official pricing pages, API documentation, and company announcements to try to ensure accuracy across all models from OpenAI, Anthropic, Google, Mistral, Cohere, and DeepSeek. If you notice any discrepancies, please feel free to send us a message to test@test.de.
The most cost-effective LLM depends on your specific requirements. OpenAI's GPT-4o-mini offers competitive pricing for general applications, while Anthropic's models excel at processing lengthy documents. Mistral and DeepSeek provide affordable alternatives for certain tasks. Our comparison tool helps you calculate exact costs based on your expected token usage and performance needs.
Yes, several strategies can optimize API costs:
- Prompt engineering: Craft concise, effective prompts to reduce input tokens
- Response parameters: Set maximum token limits for outputs
- Caching: Store common responses to avoid redundant API calls
- Model selection: Choose the most affordable model that meets your quality requirements
- Batch processing: Combine multiple requests where possible
Each LLM has a maximum context window (the total tokens it can process at once). Context window sizes vary dramatically across providers, from Google Gemini's expansive 2M token capacity to more modest windows in other models. While OpenAI's GPT-4o and GPT-4o-mini share the same context window size, the mini version offers a more economical option. Similarly, Claude models offer large windows at different price points. Our calculator helps you determine if using a larger context model is more economical than breaking your task into multiple calls with a smaller-context, less expensive model.
While we strive to maintain accurate pricing information across all LLM providers, the rapid evolution of AI services means occasional discrepancies may occur. If you spot any errors in our pricing data or calculations, please feel free to contact us at test@test.de. We appreciate user feedback as it helps us maintain the most reliable comparison tool possible. However, we recommend that all users conduct their own due diligence and verify current pricing with the official provider documentation before making final decisions for production systems or budget-critical applications.