What Happened

A developer in mainland China documented a working setup that keeps the Claude Code CLI interface while swapping the backend to MiniMax, a Chinese AI provider offering an Anthropic-compatible API endpoint. The tool enabling this swap is cc-switch, an open-source provider switcher for Claude Code. On April 4, Anthropic also announced that Pro and Max plan credits would no longer apply to third-party relay services, cutting off many existing workarounds like OpenClaw.

Why It Matters

Claude Code remains one of the most capable AI coding CLIs available, but mainland China users face two compounding problems: network instability for direct Anthropic access, and the April 4 policy change eliminating third-party relay options for paid subscribers. This setup offers a third path: keep the Claude Code UX, replace only the API layer. The cost is concrete — MiniMax's token plan runs ¥98/month, with full API access and documented Anthropic-compatible endpoints. The tradeoff is also concrete: MiniMax-M2.7 is not Claude 3.5 Sonnet. Coding quality will differ.

Asia-Pacific Angle

This workflow is specifically designed for developers in mainland China and is directly actionable. MiniMax provides two separate base URLs — one for domestic (api.minimax.chat) and one for international (api.minimaxi.com) — and using the wrong one is the most common failure point reported. The setup also applies to Southeast Asian developers who face intermittent Anthropic API reliability and want a stable fallback using a model with strong Chinese-language and multilingual performance. GLM-4 was considered as an alternative but rejected due to rate-limit queuing and slower response times under load. For teams building products targeting Chinese users, MiniMax's multilingual capabilities may actually be an advantage over Claude for certain prompts.

Action Item This Week

  • Install cc-switch from its releases page for your OS, create a MiniMax API key from their console, configure a new provider in cc-switch with Base URL set to the correct regional endpoint, model set to MiniMax-M2.7, and API format set to Anthropic Messages.
  • Before testing, clear the environment variables ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL, and add {"hasCompletedOnboarding": true} to ~/.claude.json to skip the onboarding flow.
  • Verify in a throwaway directory that the model shown in the Claude Code header is MiniMax, not Claude, before using it on real projects.