Skip to content

How to Run MiniMax M2.5 With Claude Code

Run MiniMax M2.5 with Claude Code for cheap agentic coding. API key, endpoint setup, model choice, pricing and lightning mode, and the common fixes — Windows or WSL.

MGMCSA Guru Team July 12, 2026 3 min read
Claude Code on Windows running MiniMax M2.5 for agentic coding

MiniMax built the M2 family specifically for agentic coding — a compact mixture-of-experts design that keeps latency low while running multi-step tasks end to end. M2.5 is one of the cheapest credible models for exactly the kind of work Claude Code does, which makes the pairing attractive if cost and responsiveness both matter.

This covers connecting MiniMax to Claude Code, the model and mode choices, and the pricing picture. For the routing options generally, see use cheap AI models with Claude Code.

Step 1: Get a MiniMax API key

Sign up on the MiniMax platform and create an API key. Add a little credit — the rates are low, so it lasts.

Step 2: Connect to Claude Code

There are two paths, depending on what MiniMax exposes:

If MiniMax offers an Anthropic-compatible endpoint (check its docs), point Claude Code straight at it:

export ANTHROPIC_BASE_URL="https://api.minimax.io/anthropic"
export ANTHROPIC_AUTH_TOKEN="your-minimax-key"
export ANTHROPIC_MODEL="minimax-m2.5"
claude

Otherwise, use Claude Code Router with MiniMax’s OpenAI-compatible endpoint as a provider:

{
  "Providers": [
    {
      "name": "minimax",
      "api_base_url": "https://api.minimax.io/v1/chat/completions",
      "api_key": "$MINIMAX_API_KEY",
      "models": ["minimax-m2.5"]
    }
  ],
  "Router": { "default": "minimax,minimax-m2.5" }
}

Step 3: Model and mode

MiniMax models for coding

minimax-m2.5 Flagship agentic coding model; cheap
minimax-m2 Earlier compact agentic model
lightning mode Higher throughput, same quality (if available)

M2.5 is the agentic coding pick. If a lightning/high-throughput mode is offered, it keeps the agent loop snappy.

Pricing

MiniMax positions M2.5 as a fraction of frontier-model cost — low input and output rates per million tokens — with automatic caching that helps in agent sessions. It offers pay-per-token and, for some products, subscription plans. Confirm the current rates and any plan on MiniMax’s pricing overview, since they change.

Verify

claude
# then: "implement a small feature across these files and run the tests"

If it works through the multi-step task cleanly, MiniMax is serving Claude Code.

Troubleshooting

  • Auth errors — token/key not set in the current shell.
  • Format errors — if using the Anthropic path, confirm it’s the /anthropic endpoint; if using the router, confirm the OpenAI endpoint and any needed transformer.
  • “Model not found” — verify the current model ID on MiniMax’s docs.
  • Config not applied (router) — run ccr restart.

MiniMax + Claude Code checklist

  • MiniMax API key created and funded
  • Claude Code installed
  • Connected via Anthropic endpoint or Claude Code Router
  • Model set to minimax-m2.5 (verify ID)
  • Tested on a multi-step task

Wrapping up

MiniMax M2.5 is a cheap, agentic-focused model that suits Claude Code’s multi-step work well. Connect it via an Anthropic-compatible endpoint if MiniMax offers one, or through Claude Code Router otherwise, set the model, and you’ve got responsive agentic coding at a fraction of frontier cost. Verify the current endpoints and rates on MiniMax’s docs.

To use it in a terminal agent instead, see MiniMax M2 + OpenCode; to compare, see MiniMax vs DeepSeek vs GLM.

Frequently asked questions

Is MiniMax M2.5 good for agentic coding?

Yes — the M2 family is specifically optimized for end-to-end coding and agentic workflows, with a compact mixture-of-experts design that keeps latency low. It's a strong, very cheap pick when you want an agent that runs multi-step tasks efficiently.

How do I connect MiniMax to Claude Code?

If MiniMax exposes an Anthropic-compatible endpoint, set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN to it. Otherwise use Claude Code Router with MiniMax's OpenAI-compatible endpoint as a provider. Check MiniMax's docs for the current endpoints.

How cheap is MiniMax M2.5?

Very — MiniMax positions M2.5 as a fraction of frontier-model cost (low input and output rates per million tokens), with automatic caching. Exact figures change, so confirm on MiniMax's pricing page.

What is lightning mode?

MiniMax offers a higher-throughput mode that returns output faster at the same quality, useful for keeping an agent loop responsive. Availability and naming can change, so check the current docs.

Does MiniMax have a subscription plan?

MiniMax offers both pay-per-token API pricing and subscription plans depending on the product. For agentic coding, pay-per-token on M2.5 is the common route. Confirm current plans on MiniMax's pricing overview.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.