#tHow Many Tokens?

← All models

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

When not to use it:

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