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 steps3 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 (one-click setup wizard): run the wizard and select Claude Code. It runs the official installer if needed, 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 Subscription Key.
JSON{ "env": { "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic", "ANTHROPIC_AUTH_TOKEN": "<MINIMAX_API_KEY>", "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "524288", "ANTHROPIC_MODEL": "MiniMax-M3.1-Flash-Preview[1m]", "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M3.1-Flash-Preview[1m]", "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3.1-Flash-Preview[1m]", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M3.1-Flash-Preview[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-Preview.
Snippet/status /model
Caveats
- The guide lives under MiniMax's M Plan docs and uses an M Plan Subscription Key. MiniMax's SDK pages state 'MiniMax-M3.1-Flash-Preview is available only through M Plan and MiniMax Code for now.' Pay-as-you-go API key holders would substitute another model listed on the Anthropic-compatible page (for example MiniMax-M3); that substitution is not shown in the Claude Code guide itself.
- The [1m] suffix on the model id is part of MiniMax's documented Claude Code settings (declares the 1M context window to Claude Code); the bare API model id is MiniMax-M3.1-Flash-Preview.
- MiniMax-M3.1-Flash-Preview always enables thinking and cannot turn it off.
- MiniMax recommends a 512K auto-compaction window (CLAUDE_CODE_AUTO_COMPACT_WINDOW=524288); it reports ~20% lower estimated cost vs 1M with similar performance in its own ProgramBench comparison.
- 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.
- Conductor Joins Meta: Shutdown Dates and AlternativesConductor is joining Meta. Cloud goes read-only Nov 13 and shuts down Nov 20, and the local Mac app winds down in early 2027. The dates, what to export, and what to move to.
- Claude Code Limits Draining Faster? What the Evidence ShowsWeekly Claude Code limits are draining faster for many users since mid-October. What the GitHub measurements show, the headless claude -p metering gap, and what to check first.
- Claude Code Game Rule: It Won't Remake Existing GamesClaude Code on Opus 5.5 now refuses to recreate specific existing games, even renamed. What the two-sentence rule says, what it blocks, and what builders do next.
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-Preview, MiniMax-M3, MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5 and MiniMax-M2.5-highspeed. 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 3 official pages on October 17, 2026.
Sources
Last verified against 3 official pages.
- platform.minimax.iohttps://platform.minimax.io/docs/m-plan/claude-code.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.