OpenAI API Cost Calculator (GPT-4.1, GPT-4o, o3 & o4-mini)
Estimate live token usage and monthly API spend across every OpenAI model — including 75% cached-input savings on GPT-4.1/o3 and 50% Batch API pricing.
| # | Model & Provider | Context / Speed | Input $/1M (edit) | Output $/1M (edit) | Cached $/1M | 1 Call | 1,000 Calls | 100,000 Calls | vs GPT-4o |
|---|---|---|---|---|---|---|---|---|---|
| 1 | GPT-4.1 nano OpenAI·Fast / Budget | 1.0M ctx 170 tok/s | $0.025 | $0.0002 | $0.18 | $17.75 | -96% | ||
| 2 | GPT-4o miniFocus OpenAI·Fast / Budget | 128K ctx 135 tok/s | $0.075 | $0.0003 | $0.27 | $26.77 | -94% | ||
| 3 | GPT-4.1 miniFocus OpenAI·Fast / Budget | 1.0M ctx 115 tok/s | $0.10 | $0.0007 | $0.71 | $71.02 | -84% | ||
| 4 | OpenAI o4-miniFocus OpenAI·Reasoning | 200K ctx 95 tok/s | $0.28 | $0.0020 | $1.95 | $195.31 | -56% | ||
| 5 | GPT-4.1Focus OpenAI·Frontier | 1.0M ctx 78 tok/s | $0.50 | $0.0036 | $3.55 | $355.10 | -20% | ||
| 6 | OpenAI o3Focus OpenAI·Reasoning | 200K ctx 52 tok/s | $0.50 | $0.0036 | $3.55 | $355.10 | -20% | ||
| 7 | GPT-4oFocus OpenAI·Frontier | 128K ctx 85 tok/s | $1.25 | $0.0045 | $4.46 | $446.25 | Baseline |
Tip: Click any Input or Output $/1M cell to test custom enterprise discounts, Bedrock/Vertex tiers, or Gemini 2.5 Pro >200k long-context rates inline.
Key Cost Benchmarks & Pricing Dynamics
GPT-4.1 drops uncached input from $2.50 to $2.00/1M and cached input by 60% ($0.50 vs $1.25/1M).
Repeated prefixes >=1,024 tokens trigger automatic caching on OpenAI with zero extra write fees.
Non-urgent evals, summaries, and backfills completed within 24 hours cost half on both input and output.
Focused Models in This Calculator
Coding, 1M-context RAG, instruction following
High-volume agents, classification, extraction
Multimodal chat, vision + text assistants
Support chatbots, summarization, JSON extraction
Deep math, architecture planning, complex code
Fast STEM reasoning, agentic tool verification
Production FinOps Optimization Playbook
Keep Static System Prompts & Tool Schemas First
OpenAI caches exact prefix matches in 128-token increments after 1,024 tokens. Always place immutable instructions and JSON tool definitions at the top before dynamic user timestamps or IDs.
Route 80% of Traffic to GPT-4.1 mini or nano
Using GPT-4.1 mini ($0.40/$1.60) for classification, RAG retrieval grading, and drafts while escalating only complex synthesis to GPT-4.1 or o3 cuts bills by 65–80%.
Watch Reasoning Token Multipliers on o3 & o4-mini
OpenAI reasoning models bill hidden chain-of-thought tokens at the output rate. Always budget 2x–4x your visible word count when forecasting o3 or o4-mini workloads.
Frequently Asked Questions
How much does 1 million tokens cost on GPT-4.1 vs GPT-4o?
At reference public API rates, GPT-4.1 costs $2.00 per 1M input tokens and $8.00 per 1M output tokens ($0.50 cached input), compared to GPT-4o at $2.50 input / $10.00 output ($1.25 cached input).
Does OpenAI charge extra to write to the prompt cache?
No. Unlike Anthropic's explicit cache-write premium, OpenAI prompt caching is automatic and charges no write surcharge—you simply pay the discounted cached rate on hits.
How do I estimate OpenAI o3 reasoning token costs?
Visible answer words multiply by ~1.35 for output tokens, plus hidden reasoning tokens depending on reasoning_effort (low/medium/high). Increase Expected Output Words by 2x–3x in the calculator above to model medium reasoning.
Can I stack Prompt Caching with the OpenAI Batch API?
OpenAI Batch API gives a flat 50% discount on standard input and output rates for asynchronous 24-hour jobs. Toggle Batch API in the workbench to view exact per-100k-call batch totals.
Related LLM Cost Calculators
GPT-4o & GPT-4.1 vs Claude Sonnet 4 Cost Comparison
Open calculator OpenAI Automatic CachingOpenAI Prompt Caching Savings Calculator (50%–75% Off Input)
Open calculator Async Batch API SavingsLLM Batch API 50% Discount Cost Calculator (OpenAI, Claude & Gemini)
Open calculator Reasoning Model ComparisonDeepSeek R1 vs OpenAI o3 & o4-mini Cost Calculator
Open calculatorFree 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 SignupEverything 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
Pro
Founders & PMsNever 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 GuardrailsConnect 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