TryLLMCost
All 20 Calculators/Caching & Batch Savings
OpenAI Automatic Caching

OpenAI Prompt Caching Savings Calculator (50%–75% Off Input)

Simulate OpenAI's zero-config automatic prompt caching across GPT-4.1 (75% off), o3/o4-mini (75% off), and GPT-4o (50% off) for multi-turn agents.

Reference public API rates (2025–2026) — editable inline
75% Cached Input
0% (No cache)50% (RAG)80%–90% (Coding/Multi-turn Agent)
Total Monthly API Calls
150.0K
1.03B total tokens/mo
70% Gross Margin API Ceiling
$8.70 /user/mo
Max $8,700.00/mo total bill
Monthly Recurring Revenue
$29,000.00
1,000 MAU × $29/mo
Models Below 70% Margin
1 / 25
Use routing or caching to protect P&L

Model Routing Savings Optimizer (80% Fast / 20% Frontier vs 100% Frontier)

Save $1,423.02/mo (76%)
Fast Traffic %80%
100% Frontier
$1,877.18
93.5% margin
Routed Bill
$454.15
$0.45/user
Routed Margin
98.4%
Healthy P&L
All 25 models ranked by monthly API bill (1,000 MAU · 30 runs × 5 steps · 75% cache)
#ModelProvider / TierMonthly API BillCost / Active UserGross Margin %Margin Health
1Gemini 2.0 Flash-LiteGoogle · Fast / Budget$49.20$0.0599.8%Healthy
2Llama 3.1 8B Instant (Groq)Meta (Groq) · Fast / Budget$55.60$0.0699.8%Healthy
3GPT-4.1 nanoOpenAI · Fast / Budget$63.66$0.0699.8%Healthy
4Gemini 2.5 FlashGoogle · Balanced$98.39$0.1099.7%Healthy
5GPT-4o miniOpenAI · Fast / Budget$122.91$0.1299.6%Healthy
6Mistral Small 3.1Mistral · Fast / Budget$123.47$0.1299.6%Healthy
7Llama 4 Scout 17B (Groq)Meta (Groq) · Fast / Budget$130.10$0.1399.6%Healthy
8Grok 3 MinixAI · Reasoning$157.30$0.1699.5%Healthy
9DeepSeek V3 (Chat)DeepSeek · Balanced$178.25$0.1899.4%Healthy
10GPT-4.1 miniOpenAI · Fast / Budget$254.63$0.2599.1%Healthy
11Llama 4 Maverick (Together)Meta (Together) · Balanced$320.19$0.3298.9%Healthy
12DeepSeek R1DeepSeek · Reasoning$358.44$0.3698.8%Healthy
13Claude 3.5 HaikuAnthropic · Fast / Budget$500.58$0.5098.3%Healthy
14Amazon Nova Pro (Bedrock)Amazon · Balanced$529.62$0.5398.2%Healthy
15Llama 3.3 70B (Groq)Meta (Groq) · Balanced$647.62$0.6597.8%Healthy
16OpenAI o4-miniOpenAI · Reasoning$700.22$0.7097.6%Healthy
17Gemini 2.5 ProGoogle · Reasoning$1,090.70$1.0996.2%Healthy
18GPT-4.1OpenAI · Frontier$1,273.13$1.2795.6%Healthy
19OpenAI o3OpenAI · Reasoning$1,273.13$1.2795.6%Healthy
20Claude Sonnet 4Anthropic · Frontier$1,877.18$1.8893.5%Healthy
21Claude 3.7 SonnetAnthropic · Frontier$1,877.18$1.8893.5%Healthy
22GPT-4oOpenAI · Frontier$2,048.44$2.0592.9%Healthy
23Grok 3xAI · Frontier$2,108.53$2.1192.7%Healthy
24Mistral Large 2Mistral · Frontier$2,469.30$2.4791.5%Healthy
25Claude Opus 4Anthropic · Frontier$9,385.88$9.3967.6%Alert <70%

Key Cost Benchmarks & Pricing Dynamics

GPT-4.1 & o3 Cache Discount
75% Off Input

GPT-4.1 cached input drops from $2.00 to $0.50/1M; GPT-4.1 mini drops from $0.40 to $0.10/1M.

Zero Code Changes Needed
Automatic >=1,024 Tok

OpenAI automatically caches matching prefixes of 1,024+ tokens in 128-token increments with no write fee.

GPT-4o Cache Discount
50% Off Input

Upgrading legacy GPT-4o apps to GPT-4.1 cuts cached input costs by 60% ($0.50 vs $1.25/1M).

Focused Models in This Calculator

GPT-4.1OpenAI
Input/1M
$2.00
Output/1M
$8.00
Cached/1M
$0.50
1.0M context~78 tok/s

Coding, 1M-context RAG, instruction following

GPT-4.1 miniOpenAI
Input/1M
$0.40
Output/1M
$1.60
Cached/1M
$0.10
1.0M context~115 tok/s

High-volume agents, classification, extraction

GPT-4oOpenAI
Input/1M
$2.50
Output/1M
$10.00
Cached/1M
$1.25
128K context~85 tok/s

Multimodal chat, vision + text assistants

OpenAI o3OpenAI
Input/1M
$2.00
Output/1M
$8.00
Cached/1M
$0.50
200K context~52 tok/s

Deep math, architecture planning, complex code

OpenAI o4-miniOpenAI
Input/1M
$1.10
Output/1M
$4.40
Cached/1M
$0.28
200K context~95 tok/s

Fast STEM reasoning, agentic tool verification

Production FinOps Optimization Playbook

Keep Tool Arrays Deterministically Sorted

Even swapping the order of two JSON tool definitions breaks OpenAI prefix matching. Serialize tool schemas deterministically before every request.

Send Consistent prompt_cache_key for Multi-Tenant SaaS

When serving thousands of users with identical system prompts, ensure shared prefixes stay byte-identical across tenants so OpenAI's routing layer maximizes cache hit ratio.

Monitor cached_tokens in API Usage Logs

Inspect `usage.prompt_tokens_details.cached_tokens` in production responses and plug your real hit rate % into the slider above.

Frequently Asked Questions

How long does OpenAI keep prompts in cache?

OpenAI caches typically remain active for 5–10 minutes of inactivity and up to 1 hour during off-peak periods.

Why is my OpenAI cache hit rate 0%?

The two most common causes are prefixes shorter than 1,024 tokens or dynamic variables (user IDs, request timestamps, random UUIDs) placed near the start of the system prompt.

Which OpenAI model gets the biggest prompt caching discount?

The GPT-4.1 family (4.1, 4.1 mini, 4.1 nano) and o3/o4-mini receive a 75% cached-input discount, compared to 50% on GPT-4o and GPT-4o mini.

Does OpenAI prompt caching apply to images and tool schemas?

Yes—messages, images, structured output schemas, and function/tool definitions all participate in prefix caching.

Transparent SaaS Pricing

Free Forever Calculator. Upgrade When Spend Scales.

Model 25 LLMs with zero login today. Upgrade to Pro or Team for automated API price-drop alerts, saved CFO scenarios, and live usage overrun guards.

Free

No Signup
$0/ forever

Everything you need for architecture sizing, prompt tokenization, and SaaS margin checks.

  • Unlimited comparisons across 25+ models
  • Live client-side prompt token counter (EN/Code/CJK)
  • Prompt caching (0–90%) & Batch API 50% toggles
  • AI Agent & SaaS Gross Margin Simulator
  • 80/20 Model Routing Optimizer + inline rate edits
  • Unlimited CSV financial exports
Use Free Calculator Now
Most Popular

Pro

Founders & PMs
$15/ month

Never get blindsided by provider price changes or margin erosion across investor reviews.

  • Everything in Free, plus cloud-saved scenarios
  • Compare multiple multi-agent architecture versions
  • Weekly API price-drop & new-model email alerts
  • 1-click branded CFO / Board Deck PDF export
  • Custom enterprise discount profiles (AWS/Vertex/OpenAI)
  • Historical token price tracker & depreciation notices

Team

Live Guardrails
$39/ month

Connect real production token telemetry and catch runaway agent loops before the bill lands.

  • Everything in Pro for up to 10 team seats
  • Zero-latency live usage telemetry proxy endpoint
  • Real-time Slack & webhook budget overrun alerts
  • Per-customer / per-tenant gross margin leaderboard
  • Automatic anomaly detection on infinite agent loops
  • Scheduled weekly FinOps digest to #ai-infra