LLM Pricing Comparison — Compare AI API Costs
Side-by-side pricing comparison for every major LLM API. Compare costs across OpenAI, Anthropic, and Google Gemini to find the best model for your budget. All prices are per million tokens, updated for 2026.
Side-by-Side Provider Comparison
| Model | Input $/1M tokens | Output $/1M tokens | Type | Notes |
|---|---|---|---|---|
| claude-3-7-sonnet | $3.00 | $15.00 | Flat | |
| claude-haiku-3 | $0.250 | $1.25 | Flat | |
| claude-haiku-3-5 | $0.800 | $4.00 | Flat | |
| claude-haiku-4-5 | $1.00 | $5.00 | Flat | |
| claude-opus-3 | $15.00 | $75.00 | Flat | |
| claude-opus-4-0 | $15.00 | $75.00 | Flat | |
| claude-opus-4-1 | $15.00 | $75.00 | Flat | |
| claude-opus-4-5 | $5.00 | $25.00 | Flat | |
| claude-opus-4-6 | $5.00 / $10.00 | $25.00 / $37.50 | Breakpoint | Threshold: 200K tokens |
| claude-sonnet-4-0 | $3.00 / $6.00 | $15.00 / $22.50 | Breakpoint | Threshold: 200K tokens |
| claude-sonnet-4-5 | $3.00 / $6.00 | $15.00 / $22.50 | Breakpoint | Threshold: 200K tokens |
| gemini-2.0-flash | $0.100 | $0.400 | Flat | |
| gemini-2.0-flash-lite | $0.075 | $0.300 | Flat | |
| gemini-2.5-computer-use | $1.25 / $2.50 | $10.00 / $15.00 | Breakpoint | Threshold: 200K tokens |
| gemini-2.5-flash | $0.300 | $2.50 | Flat | |
| gemini-2.5-flash-image | $0.300 | $2.50 | Multimodal | text, image |
| gemini-2.5-flash-lite | $0.100 | $0.400 | Flat | |
| gemini-2.5-flash-native-audio | $0.500 | $2.00 | Multimodal | text, audio |
| gemini-2.5-flash-preview-tts | $0.500 | $10.00 | Flat | |
| gemini-2.5-pro | $1.25 / $2.50 | $10.00 / $15.00 | Breakpoint | Threshold: 200K tokens |
| gemini-2.5-pro-preview-tts | $1.00 | $20.00 | Flat | |
| gemini-3-flash | $0.500 | $3.00 | Flat | |
| gemini-3-pro-image-preview | $2.00 | $12.00 | Multimodal | text, image |
| gemini-3-pro-preview | $2.00 / $4.00 | $12.00 / $18.00 | Breakpoint | Threshold: 200K tokens |
| gemini-3.1-pro-preview | $2.00 / $4.00 | $12.00 / $18.00 | Breakpoint | Threshold: 200K tokens |
| gpt-4.1 | $2.00 | $8.00 | Flat | |
| gpt-4.1-mini | $0.400 | $1.60 | Flat | |
| gpt-4.1-nano | $0.100 | $0.400 | Flat | |
| gpt-4o | $2.50 | $10.00 | Flat | |
| gpt-4o-mini | $0.150 | $0.600 | Flat | |
| gpt-5 | $1.25 | $10.00 | Flat | |
| gpt-5-codex | $1.25 | $10.00 | Flat | |
| gpt-5-mini | $0.250 | $2.00 | Flat | |
| gpt-5-nano | $0.050 | $0.400 | Flat | |
| gpt-5-pro | $15.00 | $120.00 | Flat | |
| gpt-5.1 | $1.25 | $10.00 | Flat | |
| gpt-5.1-codex | $1.25 | $10.00 | Flat | |
| gpt-5.1-codex-max | $1.25 | $10.00 | Flat | |
| gpt-5.2 | $1.75 | $14.00 | Flat | |
| gpt-5.2-codex | $1.75 | $14.00 | Flat | |
| gpt-5.2-pro | $21.00 | $168.00 | Flat | |
| gpt-5.3-codex | $1.75 | $14.00 | Flat | |
| gpt-5.4 | $2.50 / $5.00 | $15.00 / $22.50 | Breakpoint | Threshold: 272K tokens |
| gpt-5.4-pro | $30.00 / $60.00 | $180.00 / $270.00 | Breakpoint | Threshold: 272K tokens |
| o1 | $15.00 | $60.00 | Flat | |
| o1-mini | $1.10 | $4.40 | Flat | |
| o1-pro | $150.00 | $600.00 | Flat | |
| o3 | $2.00 | $8.00 | Flat | |
| o3-deep-research | $10.00 | $40.00 | Flat | |
| o3-mini | $1.10 | $4.40 | Flat | |
| o3-pro | $20.00 | $80.00 | Flat | |
| o4-mini | $1.10 | $4.40 | Flat | |
| o4-mini-deep-research | $2.00 | $8.00 | Flat |
Cheapest LLM APIs in 2026
Looking for the lowest-cost LLM API? Here are the 10 cheapest models by input token price. Use our LLM cost calculator to estimate your total spend.
| Rank | Model | Provider | Input / 1M | Output / 1M |
|---|---|---|---|---|
| 1 | gpt-5-nano | OpenAI | $0.050 | $0.40 |
| 2 | gemini-2.0-flash-lite | Google Gemini | $0.075 | $0.30 |
| 3 | gemini-2.0-flash | Google Gemini | $0.100 | $0.40 |
| 4 | gemini-2.5-flash-lite | Google Gemini | $0.100 | $0.40 |
| 5 | gpt-4.1-nano | OpenAI | $0.100 | $0.40 |
| 6 | gpt-4o-mini | OpenAI | $0.150 | $0.60 |
| 7 | claude-haiku-3 | Anthropic Claude | $0.250 | $1.25 |
| 8 | gpt-5-mini | OpenAI | $0.250 | $2.00 |
| 9 | gemini-2.5-flash | Google Gemini | $0.300 | $2.50 |
| 10 | gpt-4.1-mini | OpenAI | $0.400 | $1.60 |
OpenAI vs Anthropic vs Google: Quick Comparison
How do the three major LLM providers compare at each price tier? Here's a side-by-side view of the best model from each provider at budget, mid-range, and flagship levels. All prices are per million tokens (input/output).
| Tier | OpenAI | Anthropic | |
|---|---|---|---|
| Budget | GPT-5 Nano — $0.05/$0.40 | Haiku 3 — $0.25/$1.25 | Flash Lite — $0.075/$0.30 |
| Mid-range | GPT-5 — $1.25/$10 | Sonnet 4.5 — $3/$15 | Gemini 2.5 Pro — $1.25/$10 |
| Flagship | GPT-5.4 — $2.50/$15 | Opus 4.6 — $5/$25 | Gemini 3.1 Pro — $2/$12 |
| Reasoning | o3 — $2/$8 | Sonnet 4.5 — $3/$15 | Gemini 2.5 Pro — $1.25/$10 |
Winner by tier: OpenAI wins on budget (GPT-5 Nano is the cheapest). Google and OpenAI are tied at mid-range. Google offers the best value at flagship tier. For detailed provider breakdowns, see OpenAI pricing, Claude pricing, and Gemini pricing.
Cheapest LLM API by Use Case
The best model depends on what you're building. Here are our recommendations for the most cost-effective model for common use cases, based on the balance of quality and price.
| Use Case | Best Model | Provider | Input / 1M | Output / 1M |
|---|---|---|---|---|
| High-volume chatbot | GPT-5 Nano | OpenAI | $0.05 | $0.40 |
| Code generation | Gemini 2.5 Pro | $1.25 | $10.00 | |
| Document analysis | Gemini 2.5 Flash | $0.30 | $2.50 | |
| Complex reasoning | Claude Opus 4.6 | Anthropic | $5.00 | $25.00 |
| Classification / extraction | Gemini Flash Lite | $0.075 | $0.30 | |
| Agentic workflows | Claude Sonnet 4.5 | Anthropic | $3.00 | $15.00 |
Compare by Provider
How to Choose the Right Model
The cheapest model isn't always the best choice. Consider these factors when comparing LLM API pricing:
- Task complexity: Simple tasks (classification, extraction) work well with budget models like GPT-5 Nano or Flash Lite. Complex reasoning, coding, or research benefits from flagship models like Opus 4.6 or Gemini 2.5 Pro.
- Output vs input ratio: If your use case generates long responses, focus on output token cost — it's typically 2-8x more than input. For output-heavy tasks, Google Gemini Flash Lite has the cheapest output at $0.30/1M.
- Context length: Models with breakpoint pricing (Claude Sonnet/Opus, Gemini Pro, GPT-5.4) charge more above 200-272K tokens. Stay under the threshold if possible, or use flat-rate models for long-context tasks.
- Model routing: Use cheap models for triage and only escalate to expensive models when needed. Route simple queries to GPT-5 Nano ($0.05/1M) and only send complex ones to GPT-5 ($1.25/1M). This can cut costs 50-80%.
- Latency requirements: If response speed matters, Flash and Nano models are significantly faster. Budget models also have higher rate limits, making them better for real-time applications.
- Prompt caching: Anthropic and some other providers offer prompt caching that dramatically reduces costs for repeated system prompts. If your application uses the same instructions across many requests, factor caching savings into your cost comparison.
Frequently Asked Questions
What is the cheapest LLM API?
The cheapest LLM APIs in 2026 are GPT-5 Nano ($0.05/1M input), Gemini 2.0 Flash Lite ($0.075/1M input), and GPT-4.1 Nano ($0.10/1M input). These budget models are ideal for high-volume tasks like classification and extraction.
How do LLM API prices compare across providers?
All three major providers offer budget, mid-range, and flagship tiers. Google Gemini Flash models are the cheapest for fast inference. OpenAI GPT-5 Nano leads on absolute lowest cost. Anthropic Claude Haiku is the cheapest option with strong reasoning. Flagship models (Gemini Pro, Claude Sonnet/Opus, GPT-5) range from $1.25-15/1M input tokens.
How much do LLM APIs cost per token?
LLM APIs typically charge $0.05-15 per million input tokens and $0.30-75 per million output tokens. Costs vary by model tier: budget models cost under $0.15/1M input, mid-range models cost $0.25-3/1M, and flagship models cost $1.25-15/1M input.
Which LLM is cheapest for high-volume usage?
For high-volume usage, GPT-5 Nano ($0.05/1M input, $0.40/1M output) and Gemini 2.0 Flash Lite ($0.075/1M input, $0.30/1M output) offer the lowest costs. If you need better quality, Gemini 2.0 Flash ($0.10/1M input) provides strong performance at minimal cost.
Which is cheaper, OpenAI or Anthropic?
At the budget tier, OpenAI is cheaper — GPT-5 Nano ($0.05/1M input) costs 5x less than Claude Haiku 3 ($0.25/1M). At mid-range, OpenAI and Google are similarly priced at $1.25/1M input, while Anthropic Sonnet costs $3/1M. For flagship models, Google Gemini offers the best value.
What is the cheapest AI API in 2026?
The absolute cheapest LLM API is OpenAI GPT-5 Nano at $0.05 per million input tokens. Google Gemini Flash Lite ($0.075/1M) is a close second. Both are suitable for high-volume, low-complexity tasks like classification and extraction.
How much does it cost to run an AI chatbot?
Running an AI chatbot typically costs $5-100/month for small-scale deployments using budget models, $100-500/month for production apps with mid-range models, and $500+/month for high-volume enterprise deployments. The exact cost depends on your model choice, message volume, and average conversation length.
Are there free LLM APIs?
Google offers a free tier for the Gemini API with rate limits through AI Studio. OpenAI provides free credits for new accounts. Most providers offer free trials but not permanent free tiers for production use. For ongoing free options, consider open-weight models like Llama or DeepSeek hosted on free-tier cloud platforms.
How do I estimate my LLM API costs?
Use our LLM cost calculator to estimate costs based on your expected token usage. You need to know your average input/output tokens per request, your expected request volume, and which model you plan to use. For programmatic cost estimation, try the ModelPricing API which returns real-time pricing for any model.
Automate Your LLM Cost Estimation
Get programmatic access to real-time pricing for every model with our API. Or try the LLM cost calculator for quick estimates.
Get Started Free