Use MiniMax-M2.7 and MiniMax-M3 in Cursor
Cursor can call any OpenAI-compatible endpoint from its Models settings. This guide adds MiniMax-M2.7, MiniMax-M2.7-highspeed and MiniMax-M3 as custom models backed by a YiduoChan API key, then covers which Cursor features use them, what each model costs, and how to fix the usual errors.
How Cursor reaches a custom OpenAI-compatible model
Cursor's Models settings let you supply your own OpenAI API key and, separately, override the base URL that key is used with. Once the override is active, every request Cursor makes for a model routed through its OpenAI provider goes to <base URL>/chat/completions with your key in the Authorization header. YiduoChan serves MiniMax's text models on exactly that interface at https://yiduochan.com/v1, so Cursor needs no plugin or extension: three custom model names, one key and one URL.
Two properties matter before you start. First, the model name you type into Cursor is passed through verbatim as the model field, so it must match a YiduoChan model ID character for character. Second, Cursor's own documentation on custom API keys describes how such requests are routed, and this can differ between versions; if your organisation has rules about which services may see source code, read it before rolling this out to a team.
Prerequisites
- A YiduoChan account with a positive balance. Register, then top up. Credits are prepaid USD, pay-as-you-go, no subscription, minimum top-up $5, valid for 12 months. There are no free credits, so a first top-up is required before any request succeeds.
- An API key created in the YiduoChan console. It is sent as
Authorization: Bearer <API key>, so treat it like any other secret and do not commit it to a repository. - A current Cursor build. Label wording in the Models tab changes occasionally, but the three controls involved (custom model names, OpenAI API key, base URL override) have been stable across recent releases.
Step-by-step: add MiniMax models in Cursor Settings > Models
- Open Cursor Settings. Use the gear icon in the top right of the editor, or run Cursor Settings from the command palette. Select the Models tab.
- Add the custom model names. In the model list, choose Add model (some builds label it Add custom model) and enter
MiniMax-M2.7. Repeat forMiniMax-M2.7-highspeedandMiniMax-M3. Do not add a prefix, suffix or lower-case variant; the string is forwarded unchanged. - Enable the OpenAI API key. Turn on the OpenAI API Key switch and paste your YiduoChan key. Cursor uses this key for every model it treats as OpenAI-compatible, which now includes the three you just added.
- Override the OpenAI base URL. Enable Override OpenAI Base URL and enter
https://yiduochan.com/v1. Include the/v1segment and do not add a trailing slash or any path beyond it; Cursor appends/chat/completionsitself. - Verify. Press Verify. Cursor issues a small request to the configured URL with your key. Success means the key authenticated and the endpoint answered. An error here is almost always a key or URL problem, covered under troubleshooting below.
- Tidy the model picker. Untick the built-in OpenAI model names in the list while the override is active. Cursor may send those through the overridden URL as well, and YiduoChan does not serve them, so leaving them enabled produces confusing errors in the picker. Keep your three MiniMax entries ticked.
- Select a model in Chat. Open the chat panel, pick
MiniMax-M2.7from the model dropdown and send a short prompt. The same dropdown appears in Composer.
Confirm the endpoint independently
If Verify fails, or you want to separate Cursor problems from account problems, test the same key and URL from a terminal. The first call lists the models visible to your key; the second sends a minimal request to the same chat completions endpoint Cursor calls.
export YIDUOCHAN_API_KEY="<API key>"
curl https://yiduochan.com/v1/models \
-H "Authorization: Bearer $YIDUOCHAN_API_KEY"
curl https://yiduochan.com/v1/chat/completions \
-H "Authorization: Bearer $YIDUOCHAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M2.7",
"messages": [{"role": "user", "content": "Reply with the single word OK."}],
"max_tokens": 16
}'
A 200 response with a choices array confirms the account side. If both calls succeed but Cursor still fails, the problem is in the Cursor configuration.
What works in Cursor with a custom model
Cursor treats a custom OpenAI-compatible model like any other selectable model: wherever the interface shows a model dropdown, your MiniMax entries appear and can be chosen.
- Chat. The chat panel works with a custom model, including the files and symbols you reference with
@. This is the quickest way to confirm the configuration end to end. - Composer. Multi-file editing runs with whichever model is selected in the Composer dropdown. Select
MiniMax-M2.7there explicitly; the chat selection is not always carried over.
Some Cursor-native capabilities are built on models Cursor hosts itself and do not consult these settings. Anything that never shows a model dropdown falls into this category, and a given release may tie further features to Cursor-hosted models. Cursor does not publish a stable list and it changes between versions, so the practical rule is: if a feature lets you select MiniMax-M2.7, it runs on YiduoChan; if it does not, it runs on Cursor's side regardless of your key. Try any feature you depend on against a low-stakes file first.
A custom key only affects billing for the requests it handles. Whatever plan you have with Cursor for the editor itself is governed by Cursor's terms; YiduoChan bills only the tokens that reach https://yiduochan.com/v1.
Choosing between MiniMax-M2.7, M2.7-highspeed and M3
All three are served through the same endpoint and configured the same way. They differ in latency, context length and price. Figures are USD per 1M tokens at MiniMax list-level rates, prepaid, no subscription.
| Model ID | When to select it in Cursor | Input | Output | Cache read |
|---|---|---|---|---|
MiniMax-M2.7 | Default for chat and Composer. Lowest standard rate of the three. | $0.30 | $1.20 | $0.06 |
MiniMax-M2.7-highspeed | Same quality as M2.7 with lower latency. Use it for tight edit-run-fix loops where waiting on the model is the bottleneck. | $0.60 | $2.40 | $0.06 |
MiniMax-M3, prompt up to 512K tokens | 1,048,576-token (1M) context. Use when one conversation needs a very large slice of the repository or long logs. | $0.30 | $1.20 | $0.06 |
MiniMax-M3, prompt 512K to 1M tokens | Same model. The higher tier applies only when the prompt exceeds 512K tokens. | $0.60 | $2.40 | $0.12 |
Cache write for MiniMax-M2.7 and MiniMax-M2.7-highspeed is $0.375 per 1M tokens. Two points are specific to Cursor. The M2.7 and highspeed variants produce the same quality, so choose between them by how you work rather than by task difficulty: interactive back-and-forth benefits from lower latency, a long Composer run you leave alone does not. And Cursor decides how much context it sends; selecting MiniMax-M3 raises the ceiling but does not force a 1M-token prompt, so a routine Cursor turn on M3 is billed at the same standard rate as M2.7. Model details are on the MiniMax-M2.7 and MiniMax-M3 pages.
Keeping Cursor spend predictable
- Billing is prepaid and pay-as-you-go. There is no subscription to renew, and a request that fails is never charged. Start with a $5 or $10 top-up, work normally for a few days and read the actual usage in the console before topping up more. Presets are $5, $10, $20, $50, $100, $200 and $500, or any custom amount; credits stay valid for 12 months.
- Make
MiniMax-M2.7the default and switch toMiniMax-M2.7-highspeeddeliberately. The highspeed variant doubles the input and output rate for the same output quality, so it pays off only when latency is what slows you down. - Output tokens cost four times input tokens on every tier. Ask for diffs or specific functions rather than full-file rewrites; for editing tasks the output side dominates the bill.
- Cache reads are billed at $0.06 per 1M tokens against $0.30 for fresh input on the standard tier. Long, stable prefixes such as a large system prompt or a pinned set of files benefit most; churning the attached context every turn benefits least.
- Do not leave
MiniMax-M3selected out of habit. It costs the same as M2.7 below 512K prompt tokens, but the upper tier doubles the input rate, and the only way to reach it is a context far larger than a routine edit needs. - The current list is on the pricing page; the console shows per-model usage so you can see which selection is driving cost.
Troubleshooting
401 Unauthorized
The key was rejected. Common causes: a key copied with leading or trailing whitespace, a key deleted or disabled in the console, or the key pasted into a different provider field on the same settings page (the Anthropic and Google fields do not apply here). Re-copy the key, paste it into the OpenAI API Key field and press Verify again. If the curl call above also returns 401, the key itself is the problem.
model_not_found
The model string reached YiduoChan but does not match a served model. Check the custom entry character for character against MiniMax-M2.7, MiniMax-M2.7-highspeed or MiniMax-M3. The other frequent trigger is a built-in OpenAI model name still ticked in the list: with the override active, Cursor may route it to https://yiduochan.com/v1, where it does not exist. Untick it. The /v1/models call lists exactly what your key can use.
Verify fails, or 404
The base URL must be https://yiduochan.com/v1, ending in /v1. Entering https://yiduochan.com alone makes Cursor call https://yiduochan.com/chat/completions, which does not exist. A trailing slash, or /chat/completions typed into the field, are the other two ways to break the path. After correcting it, toggle the override off and on so the new value is picked up, then Verify.
curl works, Cursor does not
Save the settings, close and reopen the chat panel, and if that does not help restart Cursor; settings changes are not always applied to an open session. Confirm the OpenAI API Key switch is on, because the base URL override has no effect while the key is disabled.
Errors mentioning balance or quota
Credits are exhausted. Top up from the console; the failed requests were not charged. Because the account is prepaid, a zero balance stops requests rather than accruing debt.
Slow responses
Switch to MiniMax-M2.7-highspeed for the same quality at lower latency, and trim the context you attach with @.
Same key, other tools
The key you configured for Cursor works unchanged with any OpenAI SDK pointed at https://yiduochan.com/v1, and with Anthropic-compatible tools through the Messages endpoint at /v1/messages. For Claude Code the environment is:
export ANTHROPIC_BASE_URL=https://yiduochan.com
export ANTHROPIC_AUTH_TOKEN=<API key>
export ANTHROPIC_MODEL=MiniMax-M2.7
# optional
export ANTHROPIC_DEFAULT_HAIKU_MODEL=MiniMax-M2.7-highspeed
See MiniMax in Claude Code for that setup and its limitations, and the MiniMax overview for the full model list, including the speech models. Questions about a specific configuration go to [email protected].
FAQ
Can I use MiniMax models in Cursor?
Yes. In Cursor Settings > Models, add MiniMax-M2.7, MiniMax-M2.7-highspeed or MiniMax-M3 as custom model names, enable the OpenAI API Key with your YiduoChan key, and override the OpenAI base URL to https://yiduochan.com/v1.
What base URL do I enter in Cursor for MiniMax?
Enter https://yiduochan.com/v1 exactly, including the /v1 segment and without a trailing slash; Cursor appends /chat/completions itself.
Which MiniMax model should I select in Cursor?
MiniMax-M2.7 is the default choice at $0.30 input and $1.20 output per 1M tokens; MiniMax-M2.7-highspeed gives the same quality with lower latency at twice the rate, and MiniMax-M3 adds a 1,048,576-token context for very large prompts. See MiniMax-M2.7 and MiniMax-M3.
Why does Cursor return model_not_found with MiniMax?
The model string sent by Cursor must match MiniMax-M2.7, MiniMax-M2.7-highspeed or MiniMax-M3 exactly; also untick any built-in OpenAI model names, since Cursor may route them to the overridden base URL where they do not exist.
Why does Cursor's Verify button fail with a 401 error?
A 401 means the key was rejected: re-copy the API key from the YiduoChan console without surrounding whitespace, paste it into the OpenAI API Key field (not the Anthropic or Google field), and confirm the key is still active.
How is MiniMax usage from Cursor billed?
YiduoChan bills prepaid USD credits per token used, with no subscription, a $5 minimum top-up and no charge for failed requests; full rates are on the pricing page and you can register to create a key.