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.
⚠️ 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
- Price: $0.40/M input, $1.60/M output — cheapest 1M-context model on OpenAI
- Context: 1M tokens — processes ~750,000 words or 2,500 pages in a single request
- Vision: No — text-only input. For 1M context + vision, use Gemini 3.1 Flash ($0.50/$3.00)
- Provider: OpenAI API (platform.openai.com)
- Shutdown: October 23, 2026 — replaced by GPT-5.6 Luna ($0.20/$1.20)
- Best for: Long document analysis, large codebase processing, multi-document comparison
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 | ✅ | |
| 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:
| Feature | GPT-4.1 mini | GPT-5.6 Luna |
|---|---|---|
| Input price | $0.40/M | $0.20/M (50% cheaper) |
| Output price | $1.60/M | $1.20/M (25% cheaper) |
| Context window | 1M | 1.05M |
| Reasoning | Good | Better (newer generation) |
| Function calling | ✅ | ✅ |
| Structured outputs | ✅ | ✅ |
| Shutdown date | Oct 23, 2026 | No 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:
- Documents under 400K tokens: GPT-5.4 nano ($0.20/$1.25) is 2x cheaper on input with similar quality
- You need vision: Gemini 3.1 Flash ($0.50/$3.00, 1M) or Qwen 3.7 Flash ($0.03/$0.13, 1M) support image input
- Complex reasoning: GPT-5.4 ($2.50/$15) or Claude Sonnet 5 ($2/$10) offer better reasoning for complex tasks
- Maximum cost savings: Qwen 3.7 Flash ($0.03/$0.13, 1M) is 13x cheaper on input — though via Alibaba's API
- New project starting now: Use GPT-5.6 Luna ($0.20/$1.20, 1.05M) instead — it's the replacement and 50% cheaper on input
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:
| Model | Monthly Input | Monthly Output | Total |
|---|---|---|---|
| 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
Calculate Your GPT-4.1 mini Costs
Enter your token counts and see exactly what you'd pay. Compare against 93 other models instantly.