Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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

  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 (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.

    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 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]"
      }
    }
  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-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.

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.

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.