Skip to main content
Watch: Anthropic Just Hit the Brakes on Its Next AI Model

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

  1. 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).

    Terminal
    unset ANTHROPIC_AUTH_TOKEN
    unset ANTHROPIC_BASE_URL
  2. 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.

    Terminal
    npx -y mmx-cli@latest agent setup
  3. 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]"
      }
    }
  4. Step 4.

    Go to your working directory, run claude, and select Trust This Folder to start.

    Terminal
    claude
  5. 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.

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.

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.