GPT-4.1 Mini: token counter & pricing
OpenAI · exact (uses official tokenizer) · pricing as of 2026-05-31.
- Provider
- OpenAI
- API model ID
gpt-4.1-mini- Context window
- 1,000,000 tokens
- Input price
- $0.40 per 1M tokens
- Output price
- $1.60 per 1M tokens
- Tokenizer accuracy
- exact (uses official tokenizer)
- Pricing as of
- 2026-05-31
Open the counter to count tokens for GPT-4.1 Mini in real time.
What is GPT-4.1 Mini?
GPT-4.1 Mini is the mid-tier of OpenAI's GPT-4.1 line, same 1M-token context window as full GPT-4.1, substantially cheaper at $0.40 input / $1.60 output per 1M tokens. The cheapest 1M-context exact-tokenizer model in OpenAI's catalog.
How tokens are counted here
OpenAI's o200k_base tokenizer. Browser-side via js-tiktoken. Exact.
Pricing notes
$0.40 input / $1.60 output per 1M. Cached input $0.10/M.
Single-tier pricing, no long-context surcharge across the full 1M window. For workloads that need >128K context regularly, GPT-4.1 Mini's predictable cost is a real advantage over GPT-5.4 Mini's tier behavior.
For 1,000 input + 200 output: $0.00072 per call, $720 per 1M calls.
When to use GPT-4.1 Mini
- Long-context cost-sensitive workloads. RAG over big documents, summarizing long transcripts.
- Workloads that need 1M context but can't justify full GPT-4.1's price, meaningful cost reduction at the same context tier.
- Production stability, Mini is still on the API after Feb 2026 ChatGPT retirement.
When not to use it:
- Short-context only. GPT-5.4 Mini ($0.75/$4.50) or GPT-5 Mini ($0.25/$2) are better-tuned.
- Highest-reasoning long-context work, full GPT-4.1 ($2/$8) gives better quality at the same context tier.
Common questions
GPT-4.1 Mini vs Gemini 2.5 Flash for long context?
Gemini 2.5 Flash: $0.30/$2.50 with 1M context. GPT-4.1 Mini: $0.40/$1.60. Gemini is cheaper on input, more expensive on output. For input-heavy RAG, Gemini wins on raw cost; for balanced workloads, GPT-4.1 Mini's lower output rate ($1.60 vs $2.50) takes over.
Cached input savings?
$0.10/M cached vs $0.40/M standard, 75% discount, the strongest in the GPT-4.1 family. Worth structuring agents to maximize stable system-prompt reuse.
Will GPT-4.1 Mini be deprecated soon?
No published date. ChatGPT retirement (Feb 2026) was UI-only; API remains supported. Historical pattern: 12-24 months on the API after UI retirement.
Compare GPT-4.1 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 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)
- o4-mini (OpenAI, $1.10/$4.40)
- GPT-4o (OpenAI, $2.50/$10.00)
- GPT-4o mini (OpenAI, $0.15/$0.60)
- GPT-4 Turbo (OpenAI, $10.00/$30.00)
- Gemini 3 Flash (Google, $0.50/$3.00)
- Gemini 2.5 Flash (Google, $0.30/$2.50)
- DeepSeek V3 (DeepSeek, $0.27/$1.10)