OpenAI API Pricing 2026
OpenAI offers a range of models from the most powerful (GPT-5, o3) to the most affordable (GPT-4o mini). All pricing is per million tokens:
| Model | Context Window | Input / 1M Tokens | Output / 1M Tokens | Best Use Case |
|---|---|---|---|---|
| GPT-5 | 128K tokens | $10.00 | $40.00 | Highest capability, complex reasoning |
| GPT-5 mini | 128K tokens | $0.75 | $3.00 | High capability at low cost |
| GPT-4o | 128K tokens | $2.50 | $10.00 | Balanced power and cost |
| GPT-4o mini | 128K tokens | $0.15 | $0.60 | High-volume, cost-sensitive apps |
| o3 (reasoning) | 200K tokens | $20.00 | $80.00 | Complex reasoning, math, coding |
| o3-mini (reasoning) | 200K tokens | $4.00 | $16.00 | Affordable reasoning tasks |
| o1 | 128K tokens | $15.00 | $60.00 | Complex problem solving |
| o1-mini | 128K tokens | $3.00 | $12.00 | Fast reasoning at lower cost |
How to Use This Calculator
- Select your model: Choose from the dropdown — pricing auto-populates
- Enter average tokens: Your typical input and output tokens per API call
- Set daily request volume: How many API calls you make per day
- Read your budget: Instantly see daily, monthly, and annual cost estimates
Real-World Usage Examples
Example 1: AI Chatbot (10,000 daily users)
Model: GPT-4o mini (500 in / 200 out tokens)
Requests/day: 10,000
Daily cost: 10,000 × [(500/1M × $0.15) + (200/1M × $0.60)] = $1.95/day
Monthly cost: $58.50/month
Cost per user: $0.00585/month (~$0.0002/day)
Example 2: Content Generation Tool (50,000 articles/month)
Model: GPT-4o mini (1,000 in / 800 out tokens)
Requests/day: ~1,667 (50K/month)
Monthly cost: 1,667 × 30 × [(1000/1M × $0.15) + (800/1M × $0.60)] = $38.50/month
Cost per article: $0.00077 (less than 0.1 cents)
Example 3: Code Review Tool (o3-mini, 500 reviews/day)
Model: o3-mini (3,000 in / 500 out tokens)
Requests/day: 500
Daily cost: 500 × [(3000/1M × $4.00) + (500/1M × $16.00)] = $7.60/day
Monthly cost: $228/month
Cost per code review: $0.015 (1.5 cents)
OpenAI API Cost Formulas
Cost per request:
= (Input Tokens × Input Price / 1,000,000) + (Output Tokens × Output Price / 1,000,000)
Daily cost:
= Cost per request × Requests per day
Monthly cost:
= Daily cost × 30 (or actual days)
How to Reduce OpenAI API Costs
- Use GPT-4o mini for most tasks: It's 94% cheaper than GPT-4o and handles 90% of use cases equally well
- Implement smart model routing: Simple queries to mini models, complex ones to larger models
- Cache repeated responses: For identical or near-identical queries, serve cached results
- Use completion hints: Set
max_tokensto cap output costs - Batch API for async workloads: OpenAI's Batch API offers 50% discount for non-real-time tasks
- Optimize prompts: Shorter, precise prompts use fewer input tokens
- Negotiate enterprise pricing: For $100K+/month spend, custom rates can reduce costs 20–40%
Frequently Asked Questions
What is the difference between o1/o3 and GPT-4o?
o1 and o3 are reasoning models that spend more compute "thinking" before responding. They're optimized for complex math, coding, and multi-step reasoning. GPT-4o is a general-purpose model that's faster and more cost-effective for most tasks. o3 costs 8x more per token than GPT-4o but can solve harder problems.
Does OpenAI charge for failed requests?
No. OpenAI only charges for successful API responses. If a request fails due to server issues, rate limits, or validation errors, you are not billed. However, requests that exceed your context window may still be charged for the tokens processed before the error.
What is OpenAI's free tier?
New accounts receive $5 in free credits valid for the first 3 months. After that, all usage is pay-as-you-go. There is no free tier for ongoing production usage. The free credits expire and cannot be accumulated.