Claude Code is Anthropic’s official terminal-native coding agent powered by Claude.
Install Claude Code
Refer to the Claude Code documentation for installation.Configure MiniMax API
- Edit or create the Claude Code configuration file located at
~/.claude/settings.json. In this file, add or update theenvfield as shown below.
- The
ANTHROPIC_BASE_URLshould be set based on your location: for international users, usehttps://api.minimax.io/anthropic; for users in China, usehttps://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_TOKENandANTHROPIC_BASE_URLtake priority oversettings.jsonconfiguration. CLAUDE_CODE_AUTO_COMPACT_WINDOWsets Claude Code’s auto-compact threshold to 512000 tokens, matching MiniMax-M3’s current context window.
- After completing the configuration, navigate to your working directory and run the
claudecommand 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:
- You can now start using Claude Code for development.
Verify the Configuration
After startingclaude, run the following slash commands inside the TUI to confirm Claude Code is using MiniMax instead of the default Claude provider:
/statusshould show theANTHROPIC_BASE_URLpointing toapi.minimax.io/anthropic(orapi.minimaxi.com/anthropicfor users in China)./modelshould show the active model asMiniMax-M3.