MiniMax has a direct Anthropic-compatible endpoint, so Claude Code can use M3 without a translation proxy. The setup is mostly a matter of putting the current endpoint, API key, and model ID in Claude Code’s settings file.
MiniMax M3 supports text, images, and video with a context window of up to 1 million tokens. MiniMax says API access is available through its developer platform and Token Plan.
Before you configure Claude Code
Install Claude Code using the current instructions in the Windows and WSL setup guide, then create an API key in the MiniMax Developer Platform.
Old Anthropic variables in the shell can override the settings file. Check and remove them before continuing:
unset ANTHROPIC_AUTH_TOKEN
unset ANTHROPIC_BASE_URL
If you previously added either export to ~/.bashrc or ~/.zshrc, remove that line as well.
Add MiniMax to Claude Code
Open ~/.claude/settings.json in WSL or your user-level Claude settings file on Windows. Merge this env object with any settings you already have:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic",
"ANTHROPIC_AUTH_TOKEN": "YOUR_MINIMAX_API_KEY",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"ANTHROPIC_MODEL": "MiniMax-M3",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M3",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M3"
}
}
The endpoint above is for international accounts. Use https://api.minimaxi.com/anthropic if your API account is on MiniMax’s mainland China platform.
Start and verify
Run Claude Code from the project you want it to work on:
cd /path/to/project
claude
Once the interface opens, run:
/status
/model
/status should display the MiniMax Anthropic base URL. /model should report MiniMax-M3. Test it on a small change and review the diff before assigning a larger task.
Common problems
An authentication error usually means the key belongs to a different service region, contains a copying error, or is being overridden by an exported shell variable. A model error usually means the capitalization is wrong. The current ID is MiniMax-M3.
If Claude Code still connects to Anthropic, close it, clear the old variables, open a new terminal, and check /status again. Environment variables already present in the launching shell take priority over values in settings.json.
MiniMax M3 setup check
- Create a MiniMax API key
- Use the endpoint for the same service region as the key
- Set the model to MiniMax-M3 in Claude Code settings
- Clear older Anthropic variables from the launching shell
- Confirm the endpoint with /status and the model with /model
MiniMax still exposes older M2 models through its API. Use M3 for a new setup unless a tool or project requires an older model.
For a different terminal agent, see MiniMax with OpenCode. To compare providers, see MiniMax vs DeepSeek vs GLM.