MiniMax-M3 API: the 1M-context flagship model
MiniMax's newest flagship text model with a 1,048,576-token context, tiered pricing and cache hits from $0.0627 per million tokens.
About MiniMax-M3
MiniMax-M3 is MiniMax's 2026 flagship text model with a 1,048,576-token (1M) context window, built for whole-repository code analysis, long-document understanding, multi-step agent workloads and long conversations. It posts strong results on coding benchmarks such as SWE-Bench while keeping per-token cost low.
MiniMax-M3 API pricing (USD per 1M tokens)
| Input context | Input | Output | Cache hit |
|---|---|---|---|
| ≤ 512K tokens | $0.3134 | $1.2537 | $0.0627 |
| 512K to 1M tokens | $0.6269 | $2.5075 | $0.1254 |
The tier is chosen from the total input length of a request, cached tokens included. Tokens served from the prompt cache are billed at the cache price only, so multi-turn conversations with a long system prompt or document get markedly cheaper.
Quick start
curl
curl https://yiduochan.com/v1/chat/completions \
-H "Authorization: Bearer $YIDUOCHAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M3",
"messages": [{"role": "user", "content": "Introduce the MiniMax models in one sentence"}]
}'
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(base_url="https://yiduochan.com/v1", api_key="YIDUOCHAN_API_KEY")
resp = client.chat.completions.create(
model="MiniMax-M3",
messages=[{"role": "user", "content": "Introduce the MiniMax models in one sentence"}],
)
print(resp.choices[0].message.content)
Use it in Claude Code and other Anthropic-compatible tools
The same key also works against our Anthropic Messages compatible endpoint /v1/messages, so MiniMax models plug straight into Claude Code or the Anthropic mode of Cline. For Claude Code, export three variables:
export ANTHROPIC_BASE_URL=https://yiduochan.com
export ANTHROPIC_AUTH_TOKEN=YIDUOCHAN_API_KEY
export ANTHROPIC_MODEL=MiniMax-M3
Where it shines
- Long-document Q&A and summarization: load a whole manual, contract or paper collection without chunking and retrieval.
- Codebase analysis and refactoring: feed the relevant files of an entire repository for cross-file bug hunting and change proposals.
- Agents and tool use: function calling plus a huge context keeps the full task state in the conversation.
- Multilingual writing and translation: balanced Chinese and English quality for content pipelines.
MiniMax-M3 or MiniMax-M2.7?
Both cost the same in the ≤512K tier. Choose MiniMax-M3 when you need the 1M context or stronger reasoning; for everyday chat, support bots and bulk generation where latency matters, MiniMax-M2.7 and M2.7-highspeed are the economical pick.
FAQ
What is the context length of MiniMax-M3?
MiniMax-M3 supports a 1,048,576-token context window. Requests whose input exceeds 512K tokens are billed at the long-context tier.
How is the MiniMax-M3 API billed?
Per input and output token: in the ≤512K tier, $0.3134 input and $1.2537 output per million tokens with cache hits at $0.0627; in the 512K to 1M tier, $0.6269 input, $2.5075 output and $0.1254 for cache hits.
Does prompt caching need any setup?
No. MiniMax caches repeated prefixes automatically; cached tokens are reported as cached_tokens in the usage object and billed at the cache price.
Can I use MiniMax-M3 in Claude Code?
Yes. Point ANTHROPIC_BASE_URL at https://yiduochan.com and set ANTHROPIC_MODEL to MiniMax-M3 to run Claude Code on the 1M-context model through the Anthropic-compatible endpoint.
Does MiniMax-M3 support streaming and function calling?
Yes. Pass stream and tools on the OpenAI-compatible chat completions endpoint.