o4-mini: token counter & pricing
OpenAI · exact (uses official tokenizer) · pricing as of 2026-05-31.
- Provider
- OpenAI
- API model ID
o4-mini- Context window
- 200,000 tokens
- Input price
- $1.10 per 1M tokens
- Output price
- $4.40 per 1M tokens
- Tokenizer accuracy
- exact (uses official tokenizer)
- Pricing as of
- 2026-05-31
Open the counter to count tokens for o4-mini in real time.
What is o4-mini?
o4-mini is OpenAI's newer-generation reasoning model, same approach as o3-mini (extended internal reasoning before responding) with broader reasoning improvements at the same price point: $1.10 input / $4.40 output per 1M tokens.
For new reasoning work where you don't need o3's full capacity, o4-mini is the rational default, same cost as o3-mini, better behavior.
How tokens are counted here
OpenAI's o200k_base tokenizer. Browser-side via js-tiktoken. Exact.
But: o4-mini generates "reasoning tokens", internal chain-of-thought tokens that count toward your output bill but don't appear in the final response. Typical 5-15× output overhead vs the visible reply. The calculator's per-call cost is visible-tokens only; budget several multiples of the output line for real-world spend.
Pricing notes
$1.10 input / $4.40 output per 1M. Cached input $0.275/M, 75% off standard, the best caching discount in the o-series.
200K context window.
For 1,000 input + 200 visible output (real billed output 1k-3k with reasoning):
- Visible-only estimate: $0.0019 per call
- Realistic with 10× reasoning overhead: $0.013 per call
When to use o4-mini
- New reasoning workloads, default to o4-mini over o3-mini for the quality lift at no extra cost.
- Cost-sensitive multi-step math / logic / code where GPT-5.2 isn't quite enough.
- Agent loops with stable system prompts, o4-mini's 75%-off cached input rate is structurally better than o3-mini's 50%-off rate.
When not to use it:
- Real-time chat, reasoning latency is too high.
- Routine workloads, reasoning tokens balloon what should be a cheap bill.
- Hardest reasoning, escalate to o3-pro ($20/$80).
Common questions
o4-mini vs o3-mini?
Same price, better behavior. For new work always pick o4-mini. o3-mini stays in the catalog for workloads pinned to its specific behavior profile.
o4-mini vs GPT-5.4?
GPT-5.4 ($2.50/$15) doesn't generate invisible reasoning tokens. For tasks where you don't actually need extended reasoning, GPT-5.4 is the cheaper effective choice. The break-even depends on how much reasoning your prompts actually require.
Is o4-mini still on the API after Feb 2026 ChatGPT retirement?
Yes, same situation as GPT-4o / GPT-4.1: retired from the ChatGPT UI, still callable via the API. No deprecation date published.
Compare o4-mini to other models
- GPT-5.5 (OpenAI, $5.00/$30.00)
- GPT-5.5 Pro (OpenAI, $30.00/$180.00)
- GPT-5.4 (OpenAI, $2.50/$15.00)
- GPT-5.4 Mini (OpenAI, $0.75/$4.50)
- GPT-5.4 Nano (OpenAI, $0.20/$1.25)
- GPT-5.4 Pro (OpenAI, $30.00/$180.00)
- GPT-5.3 (OpenAI, $1.75/$14.00)
- GPT-5.2 (OpenAI, $1.75/$14.00)
- GPT-5.2 Pro (OpenAI, $21.00/$168.00)
- GPT-5.1 (OpenAI, $1.25/$10.00)
- GPT-5 (OpenAI, $1.25/$10.00)
- GPT-5 Mini (OpenAI, $0.25/$2.00)
- GPT-5 Nano (OpenAI, $0.05/$0.40)
- GPT-5 Pro (OpenAI, $15.00/$120.00)
- GPT-4.1 (OpenAI, $2.00/$8.00)
- GPT-4.1 Mini (OpenAI, $0.40/$1.60)
- GPT-4.1 Nano (OpenAI, $0.10/$0.40)
- o3 (OpenAI, $2.00/$8.00)
- o3-mini (OpenAI, $1.10/$4.40)
- o3-pro (OpenAI, $20.00/$80.00)
- GPT-4o (OpenAI, $2.50/$10.00)
- GPT-4o mini (OpenAI, $0.15/$0.60)
- GPT-4 Turbo (OpenAI, $10.00/$30.00)
- Claude Haiku 4.5 (Anthropic, $1.00/$5.00)
- Gemini 2.5 Pro (Google, $1.25/$10.00)
- Qwen 2.5 72B (Alibaba, $0.90/$0.90)