How to Set Up MiniMax M3 in AI Coding Tools 2026
MiniMax-M3 with either the OpenAI-compatible base URL https://api.minimax.io/v1 or the Anthropic-compatible base URL https://api.minimax.io/anthropic. MiniMax documents M3 as a coding and agentic model with a 1M-token context window. The right key, protocol, and client-specific setting matter more than copying a generic config.https://api.minimax.io/v1. The Anthropic-compatible route uses https://api.minimax.io/anthropic. Both routes use the exact model ID MiniMax-M3.What You'll Learn
- Which model ID, base URL, and protocol MiniMax documents for M3.
- How to choose the OpenAI-compatible or Anthropic-compatible route for a coding client.
- How to configure OpenCode, Cursor, Claude Code, Zed, Kilo Code, and TRAE without exposing an API key.
- How to test the connection and debug environment, model, endpoint, and plan mismatches.
What MiniMax M3 Is and What the Setup Requires
MiniMax M3 is the current M-series language model that MiniMax positions for coding, agentic reasoning, tool use, and long-context work. The official model overview lists a 1,000,000-token context window. The M3 product page describes the model as a coding and agentic system with native multimodality and a 1M-context MSA architecture.
That context figure describes the model API. A coding tool can impose its own limit through a configuration field, a user-interface setting, a compacting policy, or the request it sends. A large model window does not automatically mean that an IDE will place an entire repository into one request.
The official API overview says that M3 can be accessed through HTTP requests, the Anthropic SDK, and the OpenAI SDK. This gives software clients a choice of protocol. It does not mean that the two base URLs are interchangeable in every application.
Before configuring anything, identify four items: the model ID, the protocol supported by the client, the correct base URL for that protocol, and the credential type accepted by the MiniMax product you plan to use. Keep the key out of source files and screenshots. Use the client’s secret store or an environment variable that is not committed to version control.
| Setup item | Documented value | Why it matters |
|---|---|---|
| Model ID | MiniMax-M3 | Use the exact capitalization and hyphen |
| OpenAI-compatible base URL | https://api.minimax.io/v1 | Use for OpenAI-format clients |
| Anthropic-compatible base URL | https://api.minimax.io/anthropic | Use for Anthropic-format clients |
| API window | 1,000,000 tokens | Provider-listed M3 context window |
| Guaranteed API minimum | 512K tokens | Provider statement on the M3 product page |
Choose the Correct Protocol Before Adding a Key
MiniMax's configuration reference groups clients by the API format they expect. Claude Code-style terminal clients use the Anthropic-compatible route. Cursor, Continue, Aider, and OpenAI-format IDE plugins use the OpenAI-compatible route. If a client supports both, the MiniMax documentation recommends the Anthropic-compatible route for prompt-cache benefits.
The choice is about request shape, not brand preference. An OpenAI-format client usually asks for an OpenAI base URL and an OpenAI API key field. An Anthropic-format client usually asks for an Anthropic base URL and an Anthropic authentication field. If the client adds its own path to a base URL, pasting a full endpoint path can create a malformed request.
Use the value shown in the client’s field label. If the field says Base URL, enter the documented base URL. If it asks for a provider entrypoint, follow the client’s own format. Kilo Code, for example, documents an entrypoint of api.minimax.io in its MiniMax provider settings, while Zed documents the OpenAI-compatible URL with the /v1 path.
Get the Right MiniMax Credential and Protect It
The API Overview separates a Pay-as-you-go API Key from a Token Plan Subscription Key. The Pay-as-you-go route is created from the API Keys area. The Token Plan route uses a Subscription Key. MiniMax's coding-tool reference specifically points users to the Token Plan key for the documented Token Plan integrations.
Do not assume that a key from one MiniMax product is valid in every surface. The credential, billing route, account region, and client protocol all matter. A 401 response can mean a wrong key, but it can also mean that the key is being sent to the wrong endpoint or that a client variable is overriding the setting you just entered.
Store the secret in the client’s protected credential field where available. If a command-line tool requires an environment variable, export it only in the shell session that needs it. Never place a live key inside a public repository, a shared issue, a tutorial screenshot, or a browser bookmark.
Before testing, clear old provider variables when the official tool page tells you to do so. Claude Code documents clearing ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL before configuration. Cursor documents clearing OPENAI_API_KEY and OPENAI_BASE_URL when they could conflict with its custom-provider settings.
How Request Formats Change Across Coding Clients
The provider can expose the same model through different request formats, but the client still decides how it sends messages, tools, attachments, and history. OpenAI-compatible and Anthropic-compatible routes are documented interfaces. They are not a guarantee that every client feature maps perfectly between protocols.
Use a protocol that the client officially supports. If a tool has a native MiniMax provider, use that flow first. If it asks for a custom provider, enter the fields it names and confirm whether it wants a base URL or a host. This distinction prevents duplicated paths and misleading authentication errors.
When a feature fails after the basic text test works, isolate the feature. Test a short prompt, then a read-only file operation, then a tool call or attachment. Record which step fails. This gives you a client-specific diagnosis instead of treating every error as a model outage.
OpenCode Setup Uses the Built-In MiniMax Flow
MiniMax's Other Tools documentation says OpenCode has built-in MiniMax M3 support. That makes it different from a client where you manually create a custom provider. The documented route is to run opencode auth login, search for MiniMax Token Plan (minimax.io), enter the Token Plan key, and then run opencode.
Start the login flow from the project directory where you intend to work. Select the MiniMax Token Plan provider exactly as shown by the client. Then select MiniMax M3 when the model picker is available. If the model does not appear, check the authentication result and the installed OpenCode version before writing a manual configuration file.
OpenCode is a good first test because the provider selection is explicit. It also avoids a common mistake in generic configuration guides, where users copy a field from one client into another client with a different provider schema.
Keep the verification simple. Ask the tool to identify the active model or inspect its provider status. Then ask for a harmless file listing or a short explanation of a local code file. Do not start with a destructive command. A successful text response confirms connectivity, not permission safety or repository correctness.
| OpenCode step | Action | Expected result |
|---|---|---|
| Authenticate | Run opencode auth login | Provider menu opens |
| Select provider | Choose MiniMax Token Plan (minimax.io) | MiniMax credential prompt appears |
| Enter secret | Paste the Token Plan key into the prompt | Authentication completes without exposing the key |
| Launch | Run opencode | The coding client starts |
| Choose model | Select MiniMax-M3 | The active model matches the documented ID |
Cursor Setup Has a Plan and Global-Override Caveat
The official MiniMax Cursor page says custom models require a Cursor Pro subscription or above. It also documents a global Override OpenAI Base URL setting. That setting can affect other keys and built-in models in Cursor. It is not a per-model switch.
Open Cursor settings and go to Models. In API Keys, enable Override OpenAI Base URL and enter https://api.minimax.io/v1 for international users. Add the MiniMax key in the OpenAI API Key field, verify the key, open View All Models, and add a custom model named exactly MiniMax-M3. Enable it, then select it in the chat panel.
Clear old OPENAI_API_KEY and OPENAI_BASE_URL values if they are taking precedence. If Cursor’s built-in providers stop working after the override is enabled, disable the override when you are not using the custom MiniMax provider. The official documentation warns that Cursor does not currently provide separate base URLs for each custom model.
Do not confuse Chat, Composer, and Edit with Tab autocomplete. The MiniMax Cursor page says the custom key works in Chat, Composer, and Edit modes. It also says Cursor Tab autocomplete continues to use Cursor's own model and is not powered by the custom MiniMax key.
For a broader comparison of models and tools, the site's MiniMax M3 benchmark guide is a separate reference. It should not be read as a substitute for the current Cursor configuration page.
Claude Code Uses the Anthropic-Compatible Endpoint
MiniMax documents Claude Code through the Anthropic-compatible route. For international users, the documented base URL is https://api.minimax.io/anthropic. Before setting it, clear old ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL values. If those exports live in ~/.bashrc or ~/.zshrc, remove or update them so a new shell does not restore the wrong provider.
The documented settings file is ~/.claude/settings.json. Its environment section can contain the MiniMax base URL, the Token Plan key, CLAUDE_CODE_AUTO_COMPACT_WINDOW set to 1000000, and the model aliases set to MiniMax-M3[1m]. The square-bracket form is the value shown in the MiniMax Claude Code guide. It is not the same spelling as the API model ID, which remains MiniMax-M3.
After saving the file, enter a working directory and run claude. Claude Code asks you to trust the folder before it can work with the project. Use /status and /model inside the client to check the active base URL and model. MiniMax says M3 supports Claude Code extended thinking and that the setting can be changed through /config.
If the status screen shows the default provider, inspect environment precedence first. The MiniMax guide says environment variables take priority over the settings file. A stale export can therefore make a correct JSON file appear ineffective.
Zed, Kilo Code, TRAE, and Cline Need Client-Specific Fields
Several coding clients accept a custom provider, but their field names differ. Do not paste a configuration from Cursor into Zed or treat a provider entrypoint as a complete URL. The official MiniMax reference gives separate instructions for each client.
| Client | Documented route | Key setup detail |
|---|---|---|
| Zed | OpenAI-compatible | Use https://api.minimax.io/v1, the Token Plan key, and MiniMax-M3 |
| Kilo Code | MiniMax provider | Use api.minimax.io as the entrypoint, the Token Plan key, and MiniMax-M3 |
| TRAE | Custom provider | Use the OpenAI-compatible base URL, the key, and MiniMax-M3 |
| Cline | Anthropic-compatible | Use the Anthropic base URL, the key, and MiniMax-M3 |
For Zed, the MiniMax page documents the OpenAI provider, the https://api.minimax.io/v1 API URL, the Token Plan key, and the model name MiniMax-M3. It also says to save the provider, re-enter the key, and press Enter to confirm it before selecting the model in the agent panel.
For Kilo Code, the official reference says to clear ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL first if they could override the provider. Then select the MiniMax provider, use the documented api.minimax.io entrypoint, enter the Token Plan key, and select MiniMax-M3.
TRAE and Cline are client-specific. The MiniMax page documents a custom provider for TRAE with the OpenAI-compatible route and an Anthropic provider for Cline. Follow the fields displayed by the installed version. A client update can change labels without changing the MiniMax model ID or the provider URLs.
If you work with agent workflows rather than an IDE, the site's agentic AI explainer gives background on tool use and multi-step execution. Keep that conceptual material separate from the live credential configuration.
Test the Connection with a Minimal Request
A minimal request isolates provider access from repository permissions, editor integrations, and tool-calling behavior. The official OpenAI SDK guide documents OPENAI_BASE_URL=https://api.minimax.io/v1, an OPENAI_API_KEY, and the model MiniMax-M3. A safe test can ask for a short response without sending project files.
For an OpenAI-format client, the essential values look like this. Replace your_private_key with your private key in your private shell only. Never paste a real key into an article, issue, or shared terminal recording.
export OPENAI_BASE_URL=https://api.minimax.io/v1 export OPENAI_API_KEY=your_private_key model=MiniMax-M3 For an Anthropic-format client, use the documented international base URL and the environment variable names required by that client. Do not assume that an OpenAI variable will be read by an Anthropic client or that an Anthropic variable will override a setting in every IDE.
| Test result | Likely meaning | Next check |
|---|---|---|
| Model responds | Credential and basic route work | Verify the client model and project permissions |
| 401 or authentication error | Key, credential type, or precedence problem | Check the provider account and environment variables |
| 404 or route error | Wrong protocol path or client-added path | Compare the field value with the documented base URL |
| Unknown model | Model spelling or custom-model registration problem | Use MiniMax-M3 exactly |
| Context error | Client limit or request-size issue | Inspect the client window and compacting settings |
Check Context, Multimodality, and Client Limits
The MiniMax model and API pages describe M3 with a 1,000,000-token context window. The M3 product page says the API supports up to 1M tokens with a guaranteed minimum of 512K tokens. The API overview adds that the maximum token count refers to the total input and output tokens.
That last distinction matters in long coding sessions. A request that contains a large repository excerpt leaves less room for the response and tool messages within the same total allowance. A client may also compact or summarize history before the provider window is reached. Treat context as a shared budget, not a guarantee that every response can generate 1M tokens.
MiniMax's OpenAI-compatible guide says M3 accepts text, image, and video input through message content parts. A coding client may support only text, or it may transform attachments before sending them. Confirm the client behavior before designing a workflow around multimodal input.
Performance examples on the M3 product page are vendor-reported demonstrations. The page describes a paper-reproduction example lasting nearly 12 hours with 18 commits and 23 experimental figures. It also describes a CUDA example with 147 benchmark submissions, 1,959 tool calls, about 24 hours, 7.6% to 71.3% hardware peak utilization, and a 9.4x speedup. Those examples illustrate what MiniMax chose to publish. They are not guaranteed results for a personal repository.
Debug Environment Conflicts and Failed Requests
Environment precedence is the first place to look when a saved configuration seems ignored. Claude Code documents that ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL can override settings in the JSON file. Cursor documents a similar risk for OPENAI_API_KEY and OPENAI_BASE_URL. Check the current shell values before changing a working application configuration.
The second check is the exact model spelling. The documented model ID is MiniMax-M3. Variants such as minimax-m3, MiniMax M3, or a legacy M-series name can fail even when the endpoint and key are valid.
The third check is the base URL field. Some clients expect a base URL and append their own request path. Others expose a provider entrypoint and build the URL internally. If the client sends a request to a duplicated path, inspect its provider documentation rather than adding more path segments by trial and error.
The fourth check is the account route. A Token Plan integration and a Pay-as-you-go integration may expose different credential instructions. Recreate or rotate a key only after confirming which product the client documentation requires. A new key will not fix a protocol mismatch.
Finally, reduce the test. Remove repository attachments, disable optional tools, and send one short prompt. If the minimal request works, add one feature at a time. This is faster than debugging authentication, context size, tool calls, and editor permissions in the same request.
What to Do After MiniMax M3 Connects
Once a short request succeeds, verify the active model inside the client and test a harmless read-only task. Then confirm how the application handles context compaction, tool permissions, file access, and logging. A connection test proves that a request reached a model. It does not prove that an agent can safely modify a repository.
Keep a private record of the protocol, base URL, credential type, model spelling, and client version that worked. This makes later debugging easier when a shell profile, editor update, or account setting changes. It also prevents a common mistake: replacing a working provider route with a copied configuration designed for a different client.
MiniMax M3's documented setup values are stable enough to memorize, but the surrounding client behavior is not. Re-check the official MiniMax documentation when a tool changes its settings layout, when a key is rejected, or when a new model alias appears. For pricing and plan details, use the site's AI token pricing analysis as background and then confirm current terms in the provider account.
The safe sequence is short. Choose the protocol, obtain the credential required by that route, enter the exact model ID, test a minimal request, and only then grant project-level permissions. That sequence prevents most setup failures without claiming that every client exposes the same capabilities.
Frequently Asked Questions
SK Jabedul Haque
Building India's most trusted finance education platform — simplifying news, schemes and market trends so anyone can understand and invest confidently.
Read full bioNever miss an update
Get our clearest explainers on schemes, markets and money — read what matters, without the noise.
Explore more articles