LLM API & Prompt Caching Cost Calculator
Model monthly token bills across OpenAI, Anthropic Claude, Google Gemini, and DeepSeek—including real prompt-caching discounts that naive token estimators ignore.
API workload & caching
Monthly volume: 150,000 calls/mo
$89.16/mo
vs. $1,968.75/mo on Claude Sonnet 4. Caching saves $506.25/mo on the top model.
Monthly API bill across models (50% cached)
Key takeaway (December 2026 benchmark)
At 5,000 API calls/day (2,500 input / 600 output tokens, 50% prompt cache hit rate), Gemini 2.5 Flash costs ~$89/month, DeepSeek V3 costs ~$162/month, GPT-4.1 mini costs ~$238/month, GPT-4.1 costs ~$1,188/month, and Claude Sonnet 4 costs ~$1,969/month. Enabling prompt caching cuts frontier model bills by 35%–65% on RAG and coding-agent workloads.
Audited LLM API rate card (USD per 1M tokens)
| Model | Provider | Input / 1M | Cached Input / 1M | Output / 1M | Context |
|---|---|---|---|---|---|
| GPT-4.1 | OpenAI | $2.00 | $0.50 | $8.00 | 1M |
| GPT-4.1 mini | OpenAI | $0.40 | $0.10 | $1.60 | 1M |
| Claude Sonnet 4 | Anthropic | $3.00 | $0.30 | $15.00 | 200K |
| Claude 3.5 Haiku | Anthropic | $0.80 | $0.0800 | $4.00 | 200K |
| Gemini 2.5 Pro | $1.25 | $0.31 | $10.00 | 1M+ | |
| Gemini 2.5 Flash | $0.15 | $0.0375 | $0.60 | 1M | |
| DeepSeek V3 | DeepSeek | $0.27 | $0.0700 | $1.10 | 128K |
| DeepSeek R1 | DeepSeek | $0.55 | $0.14 | $2.19 | 128K |
Token & prompt-caching formula
Every provider bills input and output tokens separately, with output tokens priced 4×–8× higher due to decoding bandwidth. When prompt caching hits, the cached input fraction is billed at the discounted cache-read rate (up to 90% off on Anthropic; ~75% off on OpenAI, Google, and DeepSeek):
Monthly Cost = InputM × [(1 − CacheRate) × InputRate + CacheRate × CachedRate] + OutputM × OutputRate
Frequently asked questions
How much does prompt caching save on real production apps?
Anthropic discounts cached input tokens by 90%, while OpenAI, Google Gemini, and DeepSeek discount cached inputs by ~75%. For RAG apps and multi-turn coding agents, caching typically saves 35%–65% of monthly token bills.
When is self-hosting GPUs cheaper than paying LLM APIs?
Only once steady monthly spend exceeds $1,500–$4,500/month on workloads solvable by open-weights models. Use our Self-Hosted LLM vs. API Break-Even Calculator to check your exact token threshold.
More pricing calculators
View all 12 toolsZapier vs. Make vs. n8n Cost Calculator
Normalize Zapier Tasks, Make Credits, n8n Cloud Executions, and Self-Hosted VPS costs for your exact workflow volume.
Agency Software Stack Consolidation Calculator
Compare HubSpot, ClickFunnels, ActiveCampaign, Zapier, Calendly, and Typeform against flat-rate GoHighLevel.
Newsletter Platform Cost Calculator (beehiiv vs. Kit vs. Substack)
Model subscriber tiers and Substack's 10% paid revenue share alongside Stripe processing fees.
AI Voice Agent Cost-per-Minute Calculator
Break down Vapi, Retell AI, Bland AI, and DIY Deepgram + LLM + ElevenLabs + Twilio bills per call minute.