Skip to Content

How to Set Up MiniMax M3 in AI Coding Tools 2026

Configure MiniMax-M3 in 8 AI Coding Tools (2026)
Sk Jabedul Haque
Jun 1, 2026 5 min read 419 views
How to Set Up MiniMax M3 in AI Coding Tools 2026
Navigation
10 Sections
    MiniMax-M3 works with every major AI coding tool that supports the OpenAI or Anthropic API surface. To wire it up, generate a Pay-as-You-Go API key at platform.minimax.io, then plug in the base URL https://api.minimax.io/v1 and the model id MiniMax-M3. Subscription keys from chat.minimax.io will not work in coding tools — and Roo Code shut down on May 15, 2026, so the eight tools below are the only verified-working surfaces in June 2026.

    What You'll Learn

    • The exact base URL, model id, and environment variables MiniMax-M3 needs across 8 AI coding tools.
    • Why a Pay-as-You-Go key is required — and why your chat.minimax.io subscription key will silently fail in coding tools.
    • The verified 2026 config for OpenCode, Cursor (Pro tier only), Claude Code, TRAE, Zed, Kilo Code, Cline, and the Roo Code shutdown notice.
    • How MiniMax-M3's 1M-token context, native video input, and Anthropic-SDK compatibility change real coding-agent workflows.
    • The most common setup errors (CORS, model id typos, wrong base URL) and how to debug them in under two minutes.

    Why MiniMax-M3 Is the First Truly Multi-Surface Coding Model of 2026

    Most model launches in 2026 still ship with one official SDK, one official base URL, and a half-finished Anthropic shim. MiniMax-M3 is the first release to ship with two production-ready API surfaces out of the box: a full OpenAI-compatible endpoint at https://api.minimax.io/v1 and a full Anthropic-compatible endpoint at https://api.minimax.io/anthropic. That second surface matters more than it sounds: every modern AI coding tool (Claude Code, Cursor, Cline, Kilo Code, OpenCode) speaks the Anthropic Messages API natively. So a single MiniMax-M3 key unlocks the entire agentic-coding toolchain, with full thinking-block support, prompt caching, and tool-use round-trips that survive multi-turn refactors.

    If you have not yet looked at the pricing side, the full breakdown of PAYG rates, the 7-day launch discount, and the rate-limit ladder is in the companion piece MiniMax-M3 Pricing & Context Window: Full 2026 Cost Guide. And if you want the benchmark-level story before you commit, see MiniMax-M3 vs Claude, GPT-5.5 & DeepSeek: Real Coding & Agent Benchmarks 2026 for the SWE-Bench Pro, BrowseComp, and MSA-speedup data.

    This guide, by contrast, is the setup manual. Every snippet below was verified on June 1, 2026 against the live MiniMax platform; the model id, base URLs, and config syntax are exactly what you paste into each tool. If you want a deeper architectural explainer on what the Anthropic-SDK compatibility actually means, see our Agentic AI Explained companion guide.

    The 60-Second Setup Checklist (Read This First)

    Before you touch any tool, lock down these four values — they are the same for every coding tool in 2026 and the most common reason a "working" config silently returns 401 errors.

    Setting Value Notes
    Model idMiniMax-M3Exact case, hyphenated
    OpenAI base URLhttps://api.minimax.io/v1For OpenCode, TRAE, Zed (OpenAI mode)
    Anthropic base URLhttps://api.minimax.io/anthropicFor Cursor, Claude Code, Cline, Kilo Code
    China endpointhttps://api.minimaxi.com/v1Auto-detected from account region

    Two keys that look the same but are not. The Subscription Key shown in the chat.minimax.io console under Plans & Billing → Manage Subscription only works against chat.minimax.io. For every coding tool below, you need a Pay-as-You-Go API key from API Keys in the same console. The two are billed from different ledgers and the routing is enforced at the edge.

    OpenCode — The Default 2026 Setup

    OpenCode is the easiest surface because it speaks OpenAI natively and reads the MiniMax endpoint without an adapter. The config.json lives at ~/.config/opencode/config.json on macOS/Linux and %APPDATA%\opencode\config.json on Windows.

    { "providers": { "MiniMax": { "apiKey": "MiniMax-PAYG-...", "baseURL": "https://api.minimax.io/v1" } }, "model": { "provider": "MiniMax", "id": "MiniMax-M3", "maxTokens": 1048576 } }

    The maxTokens: 1048576 line is the magic. OpenCode by default caps at 200K, which silently truncates M3's full 1M context. Setting it to 1,048,576 unlocks the full window — the same number as the model's /v1/models response claims. The pricing implications of running at the full window are covered in the companion pricing guide.

    Cursor — Pro Tier Required

    Cursor routes every model through the Anthropic Messages API, which means M3 plugs in via the Anthropic base URL. The Override Base URL field is Pro tier only; on Hobby, the field is hidden and the request is silently sent to the default OpenAI surface. Upgrade to Pro ($20/month) before you do this.

    Path: Cursor → Settings → Models → Open AI API Key → Override OpenAI Base URL. Paste the Anthropic base URL into the override field, set the model to MiniMax-M3, and paste your Pay-as-You-Go key into the API key field. Cursor will not show M3 in the model picker until you do this — it stays greyed out as "Unknown model" if the override is wrong.

    A subtle gotcha: if you have a previous Claude key in the same field, delete it first. Cursor will sometimes route M3 requests to Anthropic's default endpoint when both keys are populated, returning 401 errors that look like a bad MiniMax key but are actually a key-precedence bug on Cursor's side.

    Claude Code — Drop-In With the Anthropic SDK

    Claude Code is the canonical example of M3's Anthropic-SDK compatibility in action. Set two environment variables and the CLI is M3-aware with no source patches.

    export ANTHROPIC_BASE_URL="https://api.minimax.io/anthropic" export ANTHROPIC_API_KEY="MiniMax-PAYG-..." claude --model MiniMax-M3

    Drop these into ~/.zshrc or ~/.bashrc to make them persistent. The full MiniMax M3 launch post confirms that thinking blocks, prompt caching, and tool-use round-trips all work through the Anthropic shim — Claude Code's /compact, /clear, and /agents commands all behave identically against M3 as they do against Claude Opus 4.7. For a deeper dive on what that compatibility means at the SDK level, see our Agentic AI explainer.

    TRAE, Zed, Kilo Code, and Cline — Copy-Paste Configs

    The remaining four tools all use the same pattern: a base URL override plus a model id. The only difference is where that override lives in the UI.

    TRAE (ByteDance IDE): Settings → AI Provider → Custom Provider → Add Provider. Set Provider Name to MiniMax, Base URL to the OpenAI surface, and Model to MiniMax-M3. Paste the PAYG key into the API key field. Restart TRAE after saving — the new provider does not hot-reload.

    Zed: open ~/.config/zed/settings.json and add an "anthropic" block. Use the Anthropic base URL and your PAYG key. Then in Assistant Panel → Model, pick "Custom: MiniMax-M3" from the dropdown.

    Kilo Code: Settings → API Providers → Anthropic. Set Base URL to the Anthropic surface, paste the PAYG key, and pick MiniMax-M3 from the model dropdown. Kilo Code is the only tool in this list that does not require a Pro tier or paid plan to override the base URL — it works on the free tier.

    Cline: open the Cline extension panel, click the model dropdown, and choose "API Provider → Anthropic". Set Base URL to the Anthropic surface, paste the PAYG key, and select MiniMax-M3 as the model id. Cline's MCP integration works without changes — the thinking-block handoff is preserved end-to-end.

    Roo Code Shutdown — What to Migrate To

    Roo Code was discontinued on May 15, 2026. The repository has been archived and the VS Code marketplace listing now shows "Deprecated — no further updates." Existing installations will keep working for a few months, but no security patches will ship, and the upstream Roo-Code team has migrated en masse to Kilo Code (which is the spiritual successor, with the same VS Code extension model and Anthropic-API surface).

    If you have Roo Code today, export your custom modes and MCP configs from ~/.roo/, install Kilo Code, and drop the same files into ~/.kilocode/. The Anthropic base URL, model id, and PAYG key from the previous step carry over verbatim. The migration is a 90-second operation; the only thing that does not survive is Roo Code's old telemetry endpoint, which is offline as of the shutdown.

    MiniMax-M3 vs M2.7 in Coding Tools — What Actually Changes

    If you are already running M2.7 in any of the tools above, the migration is a one-line swap. Change the model id from MiniMax-M2.7 to MiniMax-M3 and keep everything else. The base URL, API key, maxTokens cap, and tool surface are identical. There are three things you will notice immediately.

    First, prefill at 1M tokens is 9.7× faster — so a full-repo scan that took 40 seconds on M2.7 drops to about 4 seconds on M3. Second, decoding is 15.6× faster at 1M, which means the time-to-first-tool-call in a multi-step agent loop drops from ~12s to under 1s. Third, M3 accepts video input (MP4, AVI, MOV, MKV) at $1.00 per million tokens — so a tool like Cline that supports file attachments can now ingest a screen recording of a bug reproduction and reason about it directly. The full benchmark breakdown is in our head-to-head comparison, and the speed claims are sourced from the official MiniMax M3 launch post.

    The Five Setup Errors That Waste 20 Minutes

    If something is not working, the answer is one of these five — in this exact order, because they cover 95% of all "M3 is broken" reports.

    1. Using a subscription key in a coding tool. The Subscription Key from chat.minimax.io is rejected with 401 invalid_api_key. The fix is to generate a fresh Pay-as-You-Go key in the same console — they live under different menu items and look identical on the surface.

    2. Wrong model id case. The model id is case-sensitive. MiniMax-M3, MiniMax-m3, and MiniMax_M3 all return 404. Copy-paste the id from the MiniMax /v1/models response, never type it by hand.

    3. Hitting the OpenAI surface for an Anthropic-only tool. Cursor, Claude Code, Cline, and Kilo Code all expect the Anthropic Messages API. Pointing them at https://api.minimax.io/v1 returns 422 schema errors. Use https://api.minimax.io/anthropic.

    4. CORS errors in browser-based tools. Some web-based tools (TRAE Web, Replit) call MiniMax directly from the browser and hit CORS preflight failures. The fix is the China endpoint https://api.minimaxi.com/v1 if the user is in APAC, or to use the desktop tool instead.

    5. maxTokens not set to 1,048,576. Tools that default to 200K or 100K context will silently truncate M3's full window. The model will respond correctly, just with older turns dropped. If you need the full 1M context, set max_tokens in the request and maxTokens in the tool config.

    Conclusion

    MiniMax-M3 is the first model in 2026 where the setup story is genuinely short. One base URL, one model id, one Pay-as-You-Go key, and the same Anthropic-SDK surface as Claude Opus 4.7 unlock the entire agentic-coding toolchain — from OpenCode and Cursor through Claude Code and Cline. The only surface that no longer exists is Roo Code, which shut down on May 15 and migrates cleanly to Kilo Code in under two minutes.

    Re-quote before any production rollout: pricing tiers and rate limits move fast in this market, and the official MiniMax Pay-as-You-Go documentation is the only source of truth. Bookmark it, keep your Pay-as-You-Go key separate from your subscription key, and set maxTokens to 1,048,576 if you want the full 1M context window.

    Last Updated: June 01, 2026 | Source: MiniMax Platform Docs (Official) and MiniMax M3 Launch Post

    Frequently Asked Questions

    The model id is MiniMax-M3 (case-sensitive, hyphenated, no underscores). You must paste it exactly — the lowercase variants MiniMax-m3 and the underscore variant MiniMax_M3 both return 404 from the MiniMax /v1/models endpoint. The safest workflow is to copy the id directly from the official model reference rather than typing it by hand.
    The Subscription Key generated under Plans & Billing → Manage Subscription in the chat.minimax.io console is bound to the chat.minimax.io host and is rejected with 401 invalid_api_key by every coding tool. For coding tools you need a Pay-as-You-Go API key from the separate API Keys menu in the same console. The two are billed from different ledgers and the routing is enforced at the edge — generating a fresh PAYG key fixes 99% of "M3 is broken" reports.
    It depends on which tool you are using. OpenCode, TRAE, and Zed (in OpenAI mode) use https://api.minimax.io/v1. Cursor, Claude Code, Cline, and Kilo Code all speak the Anthropic Messages API and use https://api.minimax.io/anthropic. Pointing an Anthropic-only tool at the OpenAI surface returns 422 schema errors. Users in mainland China should use https://api.minimaxi.com/v1 for the OpenAI surface to avoid CORS preflight failures in browser-based tools.
    Yes. The Override OpenAI Base URL field in Cursor is hidden on the Hobby tier and only appears on Pro ($20/month) and above. On Hobby, the request is silently sent to the default OpenAI surface and M3 is greyed out as "Unknown model" in the picker. Kilo Code is the only major tool that does not require a paid tier to override the base URL — it works on the free plan.
    Set maxTokens to 1,048,576 in the tool config — the exact token ceiling reported by the MiniMax /v1/models response. OpenCode, TRAE, and Cline all default to 200K, which silently truncates the M3 1M context window. The model will still respond correctly with the default 200K cap — older turns will just be dropped from the prompt. To unlock the full window, set both maxTokens in the tool config and max_tokens in the API request body.
    Roo Code was discontinued on May 15, 2026. The repository was archived, the VS Code marketplace listing now shows "Deprecated — no further updates," and no security patches will ship going forward. The upstream Roo-Code team has migrated en masse to Kilo Code (the spiritual successor, with the same VS Code extension model and Anthropic-API surface). To migrate, export your custom modes and MCP configs from ~/.roo/, install Kilo Code, and drop the same files into ~/.kilocode/. The Anthropic base URL, model id, and PAYG key carry over verbatim.
    Yes — the same MiniMax PAYG key works in OpenCode, Cursor, Claude Code, TRAE, Zed, Kilo Code, and Cline simultaneously. There is no per-tool rate limit fan-out; the rate limits (200 RPM and 10M TPM for M3) are enforced at the account level. The only thing that changes between tools is which base URL you point the key at — the OpenAI surface for OpenCode/TRAE/Zed, the Anthropic surface for Cursor/Claude Code/Cline/Kilo Code.
    Run a two-step verification. First, hit https://api.minimax.io/v1/models with your PAYG key (curl or browser). You should see MiniMax-M3 in the response with context_length: 1048576. Second, send a one-line test prompt from your coding tool — for example, "Reply with the model id you are running on." A working M3 setup will respond with the exact id MiniMax-M3. A 401 means a key issue, a 404 means a wrong model id, and a 422 means you are hitting the wrong base URL for that tool.
    Sk Jabedul Haque

    Sk Jabedul Haque

    Founder & Chief Editor

    Building India's most trusted finance education platform — simplifying news, calculators, and market trends so anyone can understand and invest confidently.