Guides

Cursor

Run Cursor's chat models on any model in the MiniRouter catalog.

Cursor is an AI code editor. Its OpenAI key and base URL override send chat requests to MiniRouter's Chat Completions endpoint, so chat runs on any model in the catalog, with one balance and per-key spend limits.

1. Create a key

Create a key for Cursor alone.

2. Check the key

One request outside Cursor proves the key and balance work.

Terminal
curl https://api.minirouter.sh/v1/chat/completions \
  -H "Authorization: Bearer mr-live-YOUR-KEY-HERE" \
  -H "Content-Type: application/json" \
  -d '{"model":"zai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}]}'

3. Enter the settings

Open Cursor Settings → Models → OpenAI API Key → Override OpenAI Base URL.

SettingValue
OpenAI API Keymr-live-… (your key)
Override OpenAI Base URLhttps://api.minirouter.sh/v1This override applies globally to OpenAI-shaped model traffic in Cursor.
Model IDzai/glm-5.3-flashCompatibility depends on Cursor's global OpenAI override.

4. Send a prompt

Pick zai/glm-5.3-flash in the chat model menu and send a prompt. Then open Request logs. The request lists its model, tokens and exact cost.

What your key serves

  • Chat modelsRun on MiniRouter with your key.
  • Tab completionStays on Cursor's built-in models.

Add more models

Add any catalog ID as another Model ID. Copy IDs from Models.

Model IDAnswers with
@preset/your-slugYour saved preset. Change its model in Presets without touching Cursor.
minirouter/auto:codeA model with reliable tool calling, picked by Auto.
minirouter/fusionThe model Fusion picks per request.

Teams and privacy

TopicCursor's rule
Teams and EnterpriseCursor still charges its Token Rate, $0.25 per million tokens.
Individual plansOwn-key requests do not use included usage.
Zero Data RetentionDoes not apply. MiniRouter's privacy terms do.

Giving a team access? See Teams.

Keep spend in check

Restrict models or filter content with Guardrails.

Troubleshooting

Built-in Cursor models stop working while the override is enabled

Cursor's OpenAI base-URL override is global. Turn it off when switching back to models served by Cursor rather than MiniRouter.

The override works, but requests still pass through Cursor

Cursor builds the final request on its own backend before forwarding it to the overridden endpoint. This is not a direct client-to-MiniRouter connection.

Override OpenAI Base URL is missing

Newer Cursor builds do not show it on every plan. Without it, Cursor cannot reach MiniRouter.

Tab completion ignores MiniRouter

Expected. Tab always uses Cursor's own models; your key serves chat models only.

404, HTML, or a parse error on every request

Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.

Error: 400 invalid_request.

401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error: 401 invalid_api_key.

Every error code, with its fix: Errors.

Next steps