---
title: "Cursor integration"
description: "Settings for using Cursor with MiniRouter."
canonical_url: "https://minirouter.sh/docs/integrations/cursor"
markdown_url: "https://minirouter.sh/docs/integrations/cursor.md"
last_updated: "2026-09-26"
---

# Cursor

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

[Get a key](https://minirouter.sh/key)

[Cursor](https://cursor.com) is an AI code editor. Its OpenAI key and base URL override send chat requests to MiniRouter's [Chat Completions endpoint](https://minirouter.sh/docs/parameters), so chat runs on any model in the [catalog](https://minirouter.sh/models), with one balance and per-key [spend limits](https://minirouter.sh/docs/rate-limits).

> **Note:** Cursor builds every request on its own servers, then forwards it to MiniRouter. Your key travels with each request.

## Quick start

### 1. Create a key

[Create a key](https://minirouter.sh/key) for Cursor alone.

> **Tip:** Give Cursor its own key, so its spend shows separately in [Usage](https://minirouter.sh/dashboard/usage) and a limit stops only Cursor.

### 2. Check the key

One request outside Cursor proves the key and balance work.

```sh
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.

| Setting | Value |
| --- | --- |
| `OpenAI API Key` | `mr-live-… (your key)` |
| `Override OpenAI Base URL` | `https://api.minirouter.sh/v1`. This override applies globally to OpenAI-shaped model traffic in Cursor. |
| `Model ID` | `zai/glm-5.3-flash`. Compatibility 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 [Activity](https://minirouter.sh/dashboard/activity). The request lists its model, tokens and exact cost.

## What your key serves

- **Chat models**: Run on MiniRouter with your key.
- **Tab completion**: Stays on Cursor's built-in models.

## Add more models

Add any catalog ID as another Model ID. Copy IDs from [Models](https://minirouter.sh/models).

| Model ID | Answers with |
| --- | --- |
| `@preset/your-slug` | Your saved [preset](https://minirouter.sh/docs/presets). Change its model in [Presets](https://minirouter.sh/dashboard/presets) without touching Cursor. |
| `minirouter/auto:code` | A model with reliable tool calling, picked by [Auto](https://minirouter.sh/docs/auto-router). |
| `minirouter/fusion` | The model [Fusion](https://minirouter.sh/docs/fusion) picks per request. |

## Teams and privacy

| Topic | Cursor's rule |
| --- | --- |
| Teams and Enterprise | Cursor still charges its Token Rate, $0.25 per million tokens. |
| Individual plans | Own-key requests do not use included usage. |
| Zero Data Retention | Does not apply. MiniRouter's [privacy](https://minirouter.sh/docs/privacy) terms do. |

Giving a team access? See [Teams](https://minirouter.sh/docs/teams).

## Keep spend in check

- [Own key](https://minirouter.sh/dashboard/keys): One key for Cursor.
- [Spend cap](https://minirouter.sh/docs/rate-limits): Daily or monthly limit on that key.
- [Activity](https://minirouter.sh/dashboard/activity): Every request and its cost.

Restrict models or filter content with [Guardrails](https://minirouter.sh/docs/guardrails).

## Recommended models

| Model | Why |
| --- | --- |
| [`zai/glm-5.3-flash`](https://minirouter.sh/models/zai/glm-5.3-flash) | Best current balance of coding ability, agentic performance, context and cost. |
| [`openai/gpt-5.6-sol`](https://minirouter.sh/models/openai/gpt-5.6-sol) | Higher-intelligence option when task quality matters more than spend. |
| [`spacexai/grok-4.6`](https://minirouter.sh/models/spacexai/grok-4.6) | Strong agentic alternative with a 500K-token window. |
| [`google/gemini-3.8-flash`](https://minirouter.sh/models/google/gemini-3.8-flash) | Multimodal coding alternative with a 1M-token window. |

Browse every model in the [catalog](https://minirouter.sh/models).

## 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`](https://minirouter.sh/docs/errors#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`](https://minirouter.sh/docs/errors#invalid_api_key).

Every error code, with its fix: [Errors](https://minirouter.sh/docs/errors).

## Next steps

- [Presets](https://minirouter.sh/docs/presets): Save a model and its settings under one name.
- [Guardrails](https://minirouter.sh/docs/guardrails): Budgets and model lists per key.
- [Auto router](https://minirouter.sh/docs/auto-router): Let MiniRouter pick the model.
