GPT-4.1 mini API Pricing: Cheapest OpenAI 1M Context at $0.40/M Tokens

GPT-4.1 mini offers OpenAI's largest context window (1M tokens) at budget prices — ideal for long document analysis and large codebase processing.

Updated Aug 8, 2026 · 93 models tracked across 11 providers

⚠️ Deprecation Notice: GPT-4.1 mini is scheduled for shutdown on October 23, 2026. It will be replaced by GPT-5.6 Luna ($0.20/$1.20, 1.05M context). For new projects, start with GPT-5.6 Luna. Plan to migrate existing integrations before October 2026.

TL;DR

GPT-4.1 mini Pricing Breakdown

At $0.40 per million input tokens and $1.60 per million output tokens, GPT-4.1 mini is the most affordable way to process 1M-token documents on OpenAI's API:

Monthly Volume Input Cost Output Cost Total Cost
1M tokens$0.40$1.60$2.00
10M tokens$4.00$16.00$20.00
100M tokens$40.00$160.00$200.00
1B tokens$400.00$1,600.00$2,000.00

At 100M tokens/month, GPT-4.1 mini costs $200. The same volume on GPT-5.4 ($2.50/$15) would cost $1,800 — making GPT-4.1 mini 9x cheaper for 1M-context workloads.

How GPT-4.1 mini Compares to Other 1M-Context Models

Model Input $/M Output $/M Context Vision Provider
Qwen 3.7 Flash $0.03 $0.13 1M Alibaba
DeepSeek V4 Flash $0.14 $0.28 1M DeepSeek
GPT-5.6 Luna $0.20 $1.20 1.05M OpenAI
Gemini 3.1 Flash-Lite $0.25 $1.50 1M Google
GPT-4.1 mini $0.40 $1.60 1M OpenAI
GPT-4.1 $2.00 $8.00 1M OpenAI
Claude Sonnet 5 $2.00 $10.00 1M Anthropic

GPT-4.1 mini is OpenAI's cheapest 1M-context model, but GPT-5.6 Luna ($0.20/$1.20) is even cheaper and replaces it in October 2026. For new projects, start with Luna. For existing GPT-4.1 mini integrations, plan your migration now.

Migration Guide: GPT-4.1 mini → GPT-5.6 Luna

GPT-4.1 mini shuts down October 23, 2026. Here's how GPT-5.6 Luna compares as the replacement:

FeatureGPT-4.1 miniGPT-5.6 Luna
Input price$0.40/M$0.20/M (50% cheaper)
Output price$1.60/M$1.20/M (25% cheaper)
Context window1M1.05M
ReasoningGoodBetter (newer generation)
Function calling
Structured outputs
Shutdown dateOct 23, 2026No announced EOL

Migration is straightforward: Change the model ID from gpt-4.1-mini to gpt-5.6-luna. The API interface is identical. You'll get 50% cheaper input, 25% cheaper output, slightly more context, and better reasoning — with no shutdown date.

When to Use GPT-4.1 mini

📚 Long Document Analysis

Legal contracts, research papers, technical documentation. 1M context processes ~2,500 pages in a single request.

💻 Large Codebase Processing

Code review, refactoring, documentation generation across entire repositories. 1M context handles most codebases.

📄 Multi-Document Comparison

Compare contracts, analyze multiple reports, or synthesize information across many documents simultaneously.

🔬 Research Synthesis

Literature review, meta-analysis, and research paper synthesis. Process dozens of papers in a single context.

📊 Data Pipeline Processing

ETL-style processing of large text datasets. 1M context reduces the need for chunking and reassembly.

🤖 Long Conversations

Customer support with extensive history, therapy bots, coaching assistants. Maintain context across very long interactions.

When NOT to Use GPT-4.1 mini

GPT-4.1 mini is optimized for 1M context at budget prices. Consider alternatives when:

Real-World Cost Scenario

Let's say you're building a legal document analysis system that processes 5,000 contracts per month, with an average of 50,000 input tokens and 5,000 output tokens per contract:

ModelMonthly InputMonthly OutputTotal
Qwen 3.7 Flash$7.50$3.25$10.75
GPT-5.6 Luna$50$30$80
GPT-4.1 mini$100$40$140
GPT-4.1$500$200$700
Claude Sonnet 5$500$250$750
GPT-5.4$625$375$1,000

GPT-4.1 mini costs $140/month for 5,000 contract analyses — 5x cheaper than GPT-4.1 or Claude Sonnet 5. But GPT-5.6 Luna is even cheaper at $80/month, making it the better choice for new deployments.

Frequently Asked Questions

How much does GPT-4.1 mini cost?
$0.40 per million input tokens and $1.60 per million output tokens. It's the cheapest 1M-context model available on OpenAI's API — 2x cheaper than GPT-5.6 Luna ($0.20/$1.20) on input but with a slightly higher output price.
What is the context window of GPT-4.1 mini?
1M tokens — the largest available on OpenAI's API. This can process approximately 750,000 words or 2,500 pages of text in a single request, making it ideal for long document analysis and large codebase processing.
Is GPT-4.1 mini being deprecated?
Yes. GPT-4.1 mini is scheduled for shutdown on October 23, 2026. It will be replaced by GPT-5.6 Luna ($0.20/$1.20), which offers 50% cheaper input pricing and a slightly larger 1.05M context window. Plan to migrate before October 2026.
GPT-4.1 mini vs GPT-5.6 Luna — which should I use?
For new projects, use GPT-5.6 Luna ($0.20/$1.20) — it's cheaper on input, has a slightly larger context (1.05M vs 1M), and is the newer generation with better reasoning. GPT-4.1 mini is only relevant if you have existing integrations that haven't migrated yet.
What can GPT-4.1 mini be used for?
Long document analysis, large codebase processing, multi-document comparison, legal contract review, research paper synthesis, and any workload that needs 1M context at budget prices. For tasks under 400K tokens, GPT-5.4 nano ($0.20/$1.25) is cheaper.

Calculate Your GPT-4.1 mini Costs

Enter your token counts and see exactly what you'd pay. Compare against 93 other models instantly.