Skip to main content

Documentation Index

Fetch the complete documentation index at: https://platform.minimax.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Install Claude Code

Refer to the Claude Code documentation for installation.

Configure MiniMax API

Important: Clear Anthropic Environment Variables Before ConfigurationBefore configuring, ensure you clear the following Anthropic-related environment variables to avoid conflicts with MiniMax API:
  • ANTHROPIC_AUTH_TOKEN
  • ANTHROPIC_BASE_URL
unset ANTHROPIC_AUTH_TOKEN
unset ANTHROPIC_BASE_URL
If you previously exported these in ~/.bashrc or ~/.zshrc, also remove the export lines there to prevent re-export in new shells.
  1. Edit or create the Claude Code configuration file located at ~/.claude/settings.json. In this file, add or update the env field as shown below.
  • The ANTHROPIC_BASE_URL should be set based on your location: for international users, use https://api.minimax.io/anthropic; for users in China, use https://api.minimaxi.com/anthropic.
  • Set <MINIMAX_API_KEY> to the API key obtained from the MiniMax Developer Platform (For users in China, visit MiniMax Developer Platform).
  • Note: Environment variables ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL take priority over settings.json configuration.
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "<MINIMAX_API_KEY>",
    "API_TIMEOUT_MS": "3000000",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "ANTHROPIC_MODEL": "MiniMax-M2.7",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2.7",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M2.7",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M2.7"
  }
}
  1. After completing the configuration, navigate to your working directory and run the claude command in the terminal to start using Claude Code. After startup, select Trust This Folder to allow it to access the files in your folder as shown below:
claude-trust
  1. You can now start using Claude Code for development.
Important Note:After completing the configuration, if you also want to enable Image Understanding & Web Search capabilities, you will need to follow this tutorial to configure the Image Understanding & Web Search MCP.

Verify the Configuration

After starting claude, run the following slash commands inside the TUI to confirm Claude Code is using MiniMax instead of the default Claude provider:
/status
/model
  • /status should show the ANTHROPIC_BASE_URL pointing to api.minimax.io/anthropic (or api.minimaxi.com/anthropic for users in China).
  • /model should show the active model as MiniMax-M2.7.

Use M2.7 in Claude Code Extension for VS Code

1

Install Plugin

Install Claude Code Extension for VS Code
2

Open Settings

After installation, click Settings
3

Configure Model

Configure the model to MiniMax-M2.7
  • In Settings → Claude Code: Selected Model, enter MiniMax-M2.7
Or
  • Click Edit in settings.json, modify claude-code.selectedModel to MiniMax-M2.7 in the configuration file.
{
  "claudeCode.preferredLocation": "panel",
  "claudeCode.selectedModel": "minimax-m2.7",
  "claudeCode.environmentVariables": []
}
4

Configure Environment Variables

  • If Claude Code is already installed, please refer to the configuration above for environment variable settings.
  • If Claude Code is not installed, click Edit in settings.json
Modify claudeCode.environmentVariables to following settings:
  • The ANTHROPIC_BASE_URL value should be set based on your location: for international users, use https://api.minimax.io/anthropic; for users in China, use https://api.minimaxi.com/anthropic
"claudeCode.environmentVariables": [
        {
            "name": "ANTHROPIC_BASE_URL",
        "value": "https://api.minimax.io/anthropic"
        },
        {
            "name": "ANTHROPIC_AUTH_TOKEN",
            "value": "<MINIMAX_API_KEY>"
        },
        {
            "name": "API_TIMEOUT_MS",
            "value": "3000000"
        },
        {
            "name": "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC",
            "value": "1"
        },
        {
            "name": "ANTHROPIC_MODEL",
            "value": "MiniMax-M2.7"
        },
        {
            "name": "ANTHROPIC_DEFAULT_SONNET_MODEL",
            "value": "MiniMax-M2.7"
        },
        {
            "name": "ANTHROPIC_DEFAULT_OPUS_MODEL",
            "value": "MiniMax-M2.7"
        },
        {
            "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL",
            "value": "MiniMax-M2.7"
        }
    ],