MiniMax · Flagship · 1M context window
$0.006000 per call at 4,000 input / 4,000 output tokens.
Per call
$0.006000
10K calls/mo
$60
Cache savings
80% off input
Batch savings
0% off all
Adjust token counts, volume, and discount toggles to model your code refactoring spend. Prices verified daily against provider pricing pages.
Call MiniMax M3 with the OpenAI Python SDK pointed at api.minimax.chat:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.minimax.chat/v1",
api_key=os.environ["MINIMAX_API_KEY"],
)
response = client.chat.completions.create(
model="minimax-m3",
max_tokens=4000,
messages=[{"role": "user", "content": "Your prompt here"}]
)
# Cost: ~$0.006000 per call at standard rates
# Input: $0.30/MTok
# Output: $1.20/MTokPer-call cost for all models scoring 50+ on code refactoring benchmarks. Hover for details.
Highest-quality affordable option: Claude Haiku 4.5 at $0.0240/call (4.0x the cost, 72/100 quality). MiniMax M3 is already the cheapest choice for code refactoring.
Refactoring sends existing code and gets a rewritten version back, so input and output are roughly symmetric, unusual for a code task. That symmetry means neither rate dominates and total cost tracks the size of the file. The practical lever is scope: refactoring one module per call rather than a whole package keeps you off the long-context pricing tier, where some providers re-rate the entire request.
For MiniMax M3 specifically, that means output tokens cost 4.0x more than input, at $1.20 vs $0.30 per MTok. At this use case’s 4,000/4,000 token split, output accounts for 80% of the $0.006000 per-call cost.
| Direction | $/MTok | Tokens per call |
|---|---|---|
| Input | $0.30 | 4,000 |
| Output | $1.20 | 4,000 |
Caching drops input cost from $0.30 to $0.06/MTok. For repeated system prompts, that saves $0.000960 per call.
Submit requests asynchronously and receive 0% off all token costs. This works best for offline pipelines where latency requirements are flexible.
| Monthly volume | Cost per call | Standard monthly | Cached monthly | You save with caching |
|---|---|---|---|---|
| 10,000 calls | $0.006000 | $60 | $50.4 | $9.6 |
| 50,000 calls | $0.006000 | $300 | $252 | $48 |
| 100,000 calls | $0.006000 | $600 | $504 | $96 |
| 500,000 calls | $0.006000 | $3,000 | $2,520 | $480 |
| 1,000,000 calls | $0.006000 | $6,000 | $5,040 | $960 |
Benchmark data for code refactoring is pending for MiniMax M3. Test against your own evaluation suite before moving to production.
Benchmark data is not yet available for MiniMax M3. We recommend testing against your own evaluation criteria.
5 models score 80+ on code refactoring benchmarks, sorted by input rate. Cheapest: Claude Haiku 4.5 (300% more, 72/100 quality).
| Model | Provider | Input $/MTok | Output $/MTok | Quality | Per call | vs MiniMax |
|---|---|---|---|---|---|---|
| Claude Haiku 4.5 | Claude | $1.00 | $5.00 | 72/100 | $0.0240 | 300% more |
| Claude Opus 5.5 | Claude | $4.00 | $20.00 | 79/100 | $0.0960 | 1500% more |
| Claude Opus 5 | Claude | $5.00 | $25.00 | 72/100 | $0.1200 | 1900% more |
| Claude Fable 5.1 | Claude | $10.00 | $50.00 | 74/100 | $0.2400 | 3900% more |
| Claude Fable 5 | Claude | $10.00 | $50.00 | 72/100 | $0.2400 | 3900% more |
Provider
MiniMax
Tier
Flagship
Context
1M tokens
Released
Jun 2026
Prices from platform.minimax.io/docs/pricing/overview (read 2026-10-11). Long context (>512K tokens) is billed above the listed input and output rates. Cache hit: $0.06/MTok input. No batch discount published. Not yet benchmarked, so never recommended.
| Model | Tier | Input $/MTok | Output $/MTok | Context |
|---|---|---|---|---|
| MiniMax M2 | Mid-tier | $0.26 | $1.00 | 200K |
You can compare MiniMax M3 head-to-head against any other model on our model comparison pages, or track how pricing has changed over time on the pricing history tracker.
See how MiniMax M3 costs change across different workload types.
Code Generation
$0.005400/call
Unit Test Generation
$0.006900/call
SQL Generation
$0.001650/call
API Generation
$0.008100/call
Code Review
$0.003900/call
PR Review
$0.006000/call
Security Review
$0.004800/call
Bug Detection
$0.003900/call
Document Summarization
$0.004200/call
PDF Summarization
$0.006300/call
Meeting Notes
$0.004800/call
Email Summarization
$0.001500/call
Chatbot
$0.001800/call
RAG Pipeline
$0.003600/call
Customer Support Bot
$0.002100/call
FAQ Bot
$0.001410/call
Data Extraction
$0.002400/call
JSON Extraction
$0.001860/call
Invoice Parsing
$0.001320/call
Resume Parsing
$0.001710/call
Chain of Thought
$0.006900/call
Legal Analysis
$0.007800/call
Math Reasoning
$0.004050/call
Financial Analysis
$0.007200/call
Content Moderation
$0.000270/call
Sentiment Analysis
$0.000270/call
Categorization
$0.000420/call
Intent Detection
$0.000210/call
Copywriting
$0.002550/call
Blog Writing
$0.009900/call
Marketing Copy
$0.003840/call
Product Descriptions
$0.001950/call
A typical code refactoring call using MiniMax M3 costs about $0.006000 per call. This estimate uses 4,000 input tokens and 4,000 output tokens at standard rates. Standard rates are $0.30 per million input tokens and $1.20 per million output tokens.
Our benchmark data does not yet include a code refactoring ranking for MiniMax M3. We recommend testing it against your own evaluation criteria before production usage.
The most affordable model for code refactoring above 80/100 quality is Claude Haiku 4.5. It comes from Claude at $1.00 per million input tokens. Output costs $5.00 per million tokens with a quality score of 72/100. Claude Haiku 4.5 costs more per call than MiniMax M3 but scores higher on quality benchmarks for this task type.
Three strategies lower MiniMax M3 costs for this task type effectively. Prompt caching gives a 80% discount on input tokens when reusing system prompts. The batch API gives 0% off all tokens for asynchronous processing workloads. Prompt optimization reduces token counts through more concise instructions and context windows. Combining caching with batching brings your cost from $0.006000 to about $0.001200 per call.
MiniMax has 1 other models alongside MiniMax M3 today: MiniMax M2 at $0.26/$1.00 per million tokens (mid-tier). The right choice depends on whether your code refactoring workload prioritizes quality, cost, or speed.
MiniMax M3 supports a context window of 1M tokens per API call. This sets the maximum combined length of your input prompt and generated response. For code refactoring, typical calls use 4,000 input and 4,000 output tokens. That is well within this limit, leaving room for longer prompts or multi-turn conversations.
This calculator estimates costs based on published rates only. Connect your API usage to see where your money goes and which models drive your spend.