LLM API Pricing & Self-Host Break-Even Calculator
Compare monthly API bills across 26 frontier models with prompt caching and see when renting GPUs saves money.
| Model & Tier | Context | Rates / 1M tok (In / Out) | Per 1K Reqs | Monthly Total | Tools |
|---|---|---|---|---|---|
Qwen-TurboOpen-Weight Alibaba | 1M | $0.05 / $0.2 Cached: $0.0125 | $0.21 | $12.45 | |
Gemini 2.5 Flash-Lite Google | 1M | $0.075 / $0.3 Cached: $0.01875 | $0.31 | $18.68 | |
GPT-4.1 nano OpenAI | 1M | $0.1 / $0.4 Cached: $0.025 | $0.41 | $24.90 | |
Gemini 2.5 Flash Google | 1M | $0.15 / $0.6 Cached: $0.0375 | $0.62 | $37.35 | |
GPT-4o mini OpenAI | 128K | $0.15 / $0.6 Cached: $0.075 | $0.66 | $39.60 | |
GLM-4.5-AirOpen-Weight Zhipu | 128K | $0.2 / $0.8 Cached: $0.05 | $0.83 | $49.80 | |
DeepSeek-V3Open-Weight DeepSeek | 128K | $0.27 / $1.1 Cached: $0.07 | $1.14 | $68.10 | |
DeepSeek-V4Open-Weight DeepSeek | 1M | $0.3 / $1.2 Cached: $0.075 | $1.25 | $74.70 | |
MiniMax-M2.7Open-Weight MiniMax | 256K | $0.3 / $1.2 Cached: $0.075 | $1.25 | $74.70 | |
Qwen-PlusOpen-Weight Alibaba | 128K | $0.4 / $1.2 Cached: $0.1 | $1.42 | $85.20 | |
GPT-4.1 mini OpenAI | 1M | $0.4 / $1.6 Cached: $0.1 | $1.66 | $99.60 | |
Kimi-K2.5Open-Weight Moonshot | 128K | $0.45 / $2 Cached: $0.11 | $1.98 | $119.10 | |
GLM-5Open-Weight Zhipu | 128K | $0.5 / $2 Cached: $0.125 | $2.07 | $124.50 | |
DeepSeek-R1Open-Weight DeepSeek | 128K | $0.55 / $2.19 Cached: $0.14 | $2.28 | $136.74 | |
Kimi-K3Open-Weight Moonshot | 256K | $0.6 / $2.5 Cached: $0.15 | $2.55 | $153.00 | |
Claude Haiku 4.5 Anthropic | 200K | $0.8 / $4 Cached: $0.08 | $3.68 | $220.80 | |
OpenAI o4-mini OpenAI | 200K | $1.1 / $4.4 Cached: $0.275 | $4.56 | $273.90 | |
Qwen3-MaxOpen-Weight Alibaba | 256K | $1.2 / $6 Cached: $0.3 | $5.70 | $342.00 | |
Mistral LargeOpen-Weight Mistral | 128K | $2 / $6 Cached: $0.5 | $7.10 | $426.00 | |
GPT-5 OpenAI | 400K | $1.25 / $10 Cached: $0.125 | $8.00 | $480.00 | |
Gemini 2.5 Pro Google | 1M | $1.25 / $10 Cached: $0.31 | $8.18 | $491.10 | |
GPT-4.1 OpenAI | 1M | $2 / $8 Cached: $0.5 | $8.30 | $498.00 | |
OpenAI o3 OpenAI | 200K | $2 / $8 Cached: $0.5 | $8.30 | $498.00 | |
GPT-4o OpenAI | 128K | $2.5 / $10 Cached: $1.25 | $11.00 | $660.00 | |
Claude Sonnet 4.6 Anthropic | 200K | $3 / $15 Cached: $0.3 | $13.80 | $828.00 | |
Claude Opus 4.6 Anthropic | 200K | $15 / $75 Cached: $1.5 | $69.00 | $4,140.00 |
Cloud GPU Self-Hosting vs API Break-Even
Estimated 24/7 monthly cloud GPU rental (730 hrs/mo)How to Optimize LLM API Costs in Production
Output tokens typically cost 3x to 8x more than input tokens, while prompt caching cuts repeated system prompt and codebase context fees by 50% to 90%.
1. Exploit Prompt Caching
Keep system prompts, tool schemas, and shared knowledge prefixes deterministic so Anthropic, OpenAI, and DeepSeek automatically bill cache hits at steep discounts.
2. Route by Task Complexity
Send classification and extraction traffic to GPT-4.1 mini, Gemini 2.5 Flash, or DeepSeek-V3, reserving reasoning models like o3 or Claude Opus 4.6 for hard planning.
3. Benchmark Self-Host Break-Even
Once API spend passes $2,000-$3,000/month with steady traffic, open-weight MoE models on rented H100, L40S, or RTX 5090 nodes often slash marginal cost per token.
Check GPU Model Fit →