LLM API Pricing Comparison
Compare pricing across 289+ LLM APIs from OpenAI, Anthropic, Google, DeepSeek, Mistral, xAI, and more. Sorted by quality, price, or value score.
Pricing TLDR
- • Budget models from $0.07/M input tokens — premium models up to $75/M output tokens
- • Quality scores from 0-100 based on independent benchmarks (Theozard)
- • Value score = quality per dollar of output cost — find the best bang for your buck
LLM API Cost Comparison — Monthly Pricing
Calculate by
Input Tokens
Output Tokens
API Calls / Month
Quick Examples:
Sort:
(anthropic/claude-opus-4.6)
Context
Quality
Per 1M Tokens
In: $5.00
Out: $25.00
Value
Monthly Cost
(openai/gpt-5.2-chat)
Context
Quality
Per 1M Tokens
In: $1.75
Out: $14.00
Value
Monthly Cost
(openai/gpt-5.2)
Context
Quality
Per 1M Tokens
In: $1.75
Out: $14.00
Value
Monthly Cost
(openai/gpt-5.2-pro)
Context
Quality
Per 1M Tokens
In: $21.00
Out: $168.00
Value
Monthly Cost
(z-ai/glm-5)
Context
Quality
Per 1M Tokens
In: $0.80
Out: $2.56
Value
Monthly Cost
(anthropic/claude-opus-4.5)
Context
Quality
Per 1M Tokens
In: $5.00
Out: $25.00
Value
Monthly Cost
(openai/gpt-5.2-codex)
Context
Quality
Per 1M Tokens
In: $1.75
Out: $14.00
Value
Monthly Cost
(openai/gpt-5.1)
Context
Quality
Per 1M Tokens
In: $1.25
Out: $10.00
Value
Monthly Cost
(openai/gpt-5.1-chat)
Context
Quality
Per 1M Tokens
In: $1.25
Out: $10.00
Value
Monthly Cost
(google/gemini-3-pro-image-preview)
Context
Quality
Per 1M Tokens
In: $2.00
Out: $12.00
Value
Monthly Cost
(google/gemini-3-pro-preview)
Context
Quality
Per 1M Tokens
In: $2.00
Out: $12.00
Value
Monthly Cost
(moonshotai/kimi-k2.5)
Context
Quality
Per 1M Tokens
In: $0.45
Out: $2.25
Value
Monthly Cost
(google/gemini-3-flash-preview)
Context
Quality
Per 1M Tokens
In: $0.50
Out: $3.00
Value
Monthly Cost
(openai/gpt-5-codex)
Context
Quality
Per 1M Tokens
In: $1.25
Out: $10.00
Value
Monthly Cost
(openai/gpt-5-chat)
Context
Quality
Per 1M Tokens
In: $1.25
Out: $10.00
Value
Monthly Cost
(openai/gpt-5)
Context
Quality
Per 1M Tokens
In: $1.25
Out: $10.00
Value
Monthly Cost
(openai/gpt-5-pro)
Context
Quality
Per 1M Tokens
In: $15.00
Out: $120.00
Value
Monthly Cost
(anthropic/claude-sonnet-4.5)
Context
Quality
Per 1M Tokens
In: $3.00
Out: $15.00
Value
Monthly Cost
(deepseek/deepseek-v3.2)
Context
Quality
Per 1M Tokens
In: $0.25
Out: $0.38
Value
Monthly Cost
(minimax/minimax-m2.5)
Context
Quality
Per 1M Tokens
In: $0.30
Out: $1.20
Value
Monthly Cost
(z-ai/glm-4.7)
Context
Quality
Per 1M Tokens
In: $0.40
Out: $1.50
Value
Monthly Cost
(openai/gpt-5.1-codex-max)
Context
Quality
Per 1M Tokens
In: $1.25
Out: $10.00
Value
Monthly Cost
(openai/gpt-5.1-codex)
Context
Quality
Per 1M Tokens
In: $1.25
Out: $10.00
Value
Monthly Cost
(xiaomi/mimo-v2-flash)
Context
Quality
Per 1M Tokens
In: $0.09
Out: $0.29
Value
Monthly Cost
(moonshotai/kimi-k2-thinking)
Context
Quality
Per 1M Tokens
In: $0.40
Out: $1.75
Value
Monthly Cost
(openai/gpt-5-mini)
Context
Quality
Per 1M Tokens
In: $0.25
Out: $2.00
Value
Monthly Cost
(x-ai/grok-4)
Context
Quality
Per 1M Tokens
In: $3.00
Out: $15.00
Value
Monthly Cost
(openai/o3-pro)
Context
Quality
Per 1M Tokens
In: $20.00
Out: $80.00
Value
Monthly Cost
(minimax/minimax-m2.1)
Context
Quality
Per 1M Tokens
In: $0.27
Out: $0.95
Value
Monthly Cost
(qwen/qwen3-max-thinking)
Context
Quality
Per 1M Tokens
In: $1.20
Out: $6.00
Value
Monthly Cost

Tired of manually checking your API credits?
Monitor your credit balance and spending in real-time. Get alerts before you run out.
Privacy-first desktop app. No sign-up required.
Best Value LLM APIs — Quality Per Dollar
Value score = quality points per $1 of output cost (per 1M tokens). Higher is better. These models deliver the most capability per dollar spent.
#
Model
Meta: Llama 3.2 3B Instruct
Provider
Quality
Output / 1M
Value Score
#
Model
LiquidAI: LFM2-2.6B
Provider
Quality
Output / 1M
Value Score
#
Model
LiquidAI: LFM2-8B-A1B
Provider
Quality
Output / 1M
Value Score
#
Model
Qwen: Qwen3 235B A22B Instruct 2507
Provider
Quality
Output / 1M
Value Score
#
Model
Meta: Llama 3.1 8B Instruct
Provider
Quality
Output / 1M
Value Score
#
Model
Meta: Llama 3.2 11B Vision Instruct
Provider
Quality
Output / 1M
Value Score
#
Model
Meta: Llama 3 8B Instruct
Provider
Quality
Output / 1M
Value Score
#
Model
OpenAI: gpt-oss-120b
Provider
Quality
Output / 1M
Value Score
#
Model
OpenAI: gpt-oss-20b
Provider
Quality
Output / 1M
Value Score
#
Model
Mistral: Mistral Small 3
Provider
Quality
Output / 1M
Value Score
About LLM API Pricing
What is LLM API Pricing?
LLM APIs let you integrate large language models into your applications via HTTP requests. Every major AI provider — OpenAI, Anthropic, Google, DeepSeek, Mistral, xAI — offers API access to their models with per-token pricing. You pay separately for input tokens (your prompts) and output tokens (model responses), quoted per million tokens.
- Input vs Output Token Pricing: Input tokens (prompts, context) are cheaper because they only need to be processed once. Output tokens (completions) cost 2-5x more because each token requires a full forward pass through the model. Optimizing prompt length has the biggest impact on cost.
- Quality-Price Tradeoff: More expensive models generally deliver higher quality responses. Our quality scores (0-100) let you compare: Claude Opus 4.6 scores 100 at $25/1M output, while DeepSeek V3.2 scores 79 at $0.28/1M. The right choice depends on your quality requirements.
- Context Window Costs: Larger context windows let you send more data per request but increase token costs. A 200K context model processing long documents costs proportionally more in input tokens than a short chatbot interaction. Choose context size based on your actual needs.
When to Use LLM API Pricing
Different use cases call for different models. Match your quality requirements to your budget using the value score to find the optimal model.
Ideal for
- Chatbots and conversational AI — mid-tier models like Sonnet or GPT-4.1 offer the best quality/cost balance
- Code generation — specialized models like DeepSeek Coder or Codex variants optimize for code tasks
- Bulk content processing — budget models like Gemini Flash or DeepSeek V3 handle volume at minimal cost
- Complex reasoning tasks — premium models like Opus 4.6 or GPT-5 justify their cost for hard problems
- Prototyping — free tier models let you build without spending anything
Not ideal for
- Real-time applications needing sub-100ms latency (consider edge-deployed models)
- Tasks that don't need language understanding (use traditional algorithms instead)
- Processing sensitive data with compliance requirements (check each provider's data policies)
LLM API Monthly Cost Estimates
Hobby / Prototyping
$0-10/mo
• Free tier models
• < 1K requests/day
• Testing & development
Startup / MVP
$50-300/mo
• Mid-tier models (Sonnet, GPT-4.1)
• 5-20K requests/day
• Single product
Growth
$300-2,000/mo
• Mix of premium & budget models
• 20-100K requests/day
• Multiple use cases
Enterprise
$2,000+/mo
• Premium models for quality-critical tasks
• 100K+ requests/day
• Model fallback chains
5 LLM API Cost Optimization Tips
Use a Model Cascade
Route easy queries to cheap models (Haiku, Flash, GPT-5 Nano) and only escalate to expensive ones (Opus, GPT-5) when needed. A classifier model can decide the routing. This typically saves 60-80% vs using premium models for everything.
Optimize Prompt Length
Input tokens cost money. Strip unnecessary context, use concise system prompts, and avoid sending full documents when a summary suffices. A 50% reduction in prompt length = 50% savings on input costs.
Cache Frequent Requests
If you make similar API calls repeatedly, cache responses. Many providers also offer prompt caching features that reduce costs for repeated system prompts. Anthropic's prompt caching can save up to 90% on cached tokens.
Compare Value Scores, Not Just Prices
The cheapest model isn't always the best value. A model at $0.50/1M output with quality score 30 delivers less value than one at $2/1M with quality score 70. Use the value score column to find the sweet spot for your needs.
Monitor Per-Model Spending
Track costs per model and per use case with CostGoat. Identify which models consume the most budget, find opportunities to downgrade specific workflows, and catch cost spikes early before they become expensive surprises.

Track Your LLM API Costs in Real-Time
Monitor spending across OpenAI, Anthropic, Google, and other LLM providers. Track credit balances and get alerts when usage spikes.
Privacy-first desktop app. 7-day free trial, no sign-up required.
LLM API Pricing FAQ
Common questions about LLM API costs, pricing models, and how to save money
