Setup guide - Documented by MiniMax
Use MiniMax in Claude Code
MiniMax documents a dedicated Claude Code setup: point Claude Code at MiniMax's Anthropic-compatible endpoint (https://api.minimax.io/anthropic) via ~/.claude/settings.json env entries, or use MiniMax's one-click mmx-cli setup wizard.
Last verified 5 steps4 official sources
Steps
- Step 1.
Clear these environment variables first. MiniMax notes they take priority over the settings file and override the MiniMax configuration (also remove any exports of them from ~/.bashrc or ~/.zshrc).
Terminalunset ANTHROPIC_AUTH_TOKEN unset ANTHROPIC_BASE_URL - Step 2.
Option 1 (setup wizard): run the wizard and select Claude Code (if Claude Code isn't installed, select it again when prompted to choose which tools to install). The wizard runs the official installer, checks
claude --version, updates~/.claude/settings.json, and adds the MiniMax model list.Terminalnpx -y mmx-cli@latest agent setup - Step 3.
Option 2 (edit the settings file): edit or create ~/.claude/settings.json and replace <MINIMAX_API_KEY> with your M Plan API key.
JSON{ "env": { "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic", "ANTHROPIC_AUTH_TOKEN": "<MINIMAX_API_KEY>", "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "524288", "CLAUDE_CODE_EFFORT_LEVEL": "max", "ANTHROPIC_MODEL": "MiniMax-M3.1-Flash[1m]", "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M3.1-Flash[1m]", "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3.1-Flash[1m]", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M3.1-Flash[1m]" } } - Step 4.
Go to your working directory, run
claude, and select Trust This Folder to start.Terminalclaude - Step 5.
Verify inside the TUI: /status should show ANTHROPIC_BASE_URL pointing to api.minimax.io/anthropic, and /model should show the active model as MiniMax-M3.1-Flash.
Snippet/status /model
Caveats
- The guide lives under MiniMax's M Plan docs and uses an M Plan API key. MiniMax's Anthropic-compatible page lists MiniMax-M3.1-Flash and MiniMax-M3 as the supported models.
- The [1m] suffix on the model id is part of MiniMax's documented Claude Code settings (its CC Switch option sets the same model with Declare 1M); the bare API model id is MiniMax-M3.1-Flash.
- Thinking is always enabled for MiniMax-M3.1-Flash and cannot be disabled; settings such as MAX_THINKING_TOKENS=0 or "alwaysThinkingEnabled": false have no effect on it.
- CLAUDE_CODE_EFFORT_LEVEL sets the default reasoning effort (low, medium, high, xhigh or max); when it is not set, Claude Code uses high. While it is set, /effort in a session has no effect. MiniMax notes some Claude Code versions send xhigh as high.
- MiniMax recommends a 512K auto-compaction window (CLAUDE_CODE_AUTO_COMPACT_WINDOW=524288); its ProgramBench comparison with MiniMax-M3.1-Flash found similar performance to 1M with an estimated cost approximately 20% lower.
- A third documented option uses the third-party CC Switch app; omitted here as it is not an official tool.
More setup guides
Same tool, other providers
Related reading
- MiniMax M2.5 and M2.7 Retirement: How to Move to M3 Before November 18MiniMax closes M2.5 and M2.7 to new users on October 19, 2026 and retires them on November 18. Which model id to switch to, what it costs, and the exact API change.
- MiniMax H3: Omni-Modal Video, Native Audio, Open WeightsMiniMax H3 turns text, image, video and audio into video with native stereo sound. API from 0.80 CNY per second at 2K, and open weights are on Hugging Face.
- MiniMax M2.5 for Developers: The Anthropic-Compatible Budget Frontier ModelMiniMax M2.5 hits 80.2% on SWE-bench Verified and plugs into the Anthropic SDK with two environment variables. Here is what you need to know before switching.
- How to Build Agents That Run for Hours: Anthropic's Planner, Generator and Evaluator HarnessAnthropic Applied AI's Ash Prabaker and Andrew Wilson trace how Claude went from 20-minute runs to multi-hour builds, and the GAN-style planner, generator and evaluator harness behind their one-shot apps.
- Why One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 AgentsCJ Avilla and Harrison Stall of Anthropic on multi-agent topologies: lessons from Unix, OS/360 and Linux, Dynamic Workflows in Managed Agents, and when to use Flows vs UltraCode.
- The Claude Certified Architect Exam as a Field Guide to Agentic EngineeringUC Berkeley's Frank Coyle reads Anthropic's Claude Certified Architect exam as a map of production agent design: five domains, six scenarios and the anti-patterns each one tests.
FAQ
How do I use MiniMax in Claude Code?
MiniMax documents a dedicated Claude Code setup: point Claude Code at MiniMax's Anthropic-compatible endpoint (https://api.minimax.io/anthropic) via ~/.claude/settings.json env entries, or use MiniMax's one-click mmx-cli setup wizard.
Which MiniMax model ids work in Claude Code?
The official docs read for this guide list MiniMax-M3.1-Flash and MiniMax-M3. Requests go to https://api.minimax.io/anthropic.
Is this an official MiniMax and Claude Code setup?
MiniMax documents this setup in its own docs. It was last checked against 4 official pages on November 8, 2026.
Sources
Last verified against 4 official pages.
- platform.minimax.iohttps://platform.minimax.io/docs/m-plan/claude-code.md
- platform.minimax.iohttps://platform.minimax.io/docs/m-plan/codex.md
- platform.minimax.iohttps://platform.minimax.io/docs/api-reference/text-anthropic-api.md
- platform.minimax.iohttps://platform.minimax.io/docs/faq/models.md
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.