# Configure Cursor with a third-party API

> Configure a third-party API in Cursor — turn on Override OpenAI Base URL, enter your sk- key, and use Claude, GPT, and more in the Chat panel.

URL: https://docs.lmuai.ai/docs/tools/cursor



Cursor can point the Chat / Plan panel's requests at a third-party relay API via **Override OpenAI Base URL**. This page explains how to use that native method to connect to LMU AI.

<Callout type="warn" title="Key limitation: only the Chat / Plan panel is affected">
  Cursor's Override OpenAI Base URL **only affects the Chat / Plan panel** (the conversation opened with Cmd/Ctrl + L). Cursor's core agent features — **Composer, Tab autocomplete, Apply, Inline Edit** — are all locked to the Cursor official backend and cannot be taken over by a third-party relay.

  If you need a "full-capability" agent experience in Cursor (including Composer-type features), install instead (Cursor is compatible with the VS Code extension marketplace):

  * [Official Codex extension](/docs/tools/vscode-plugin) — a Codex agent over the LMU AI OpenAI protocol
  * [Claude Code for VS Code extension](/docs/tools/claude-code-vscode) — a Claude Code agent over the LMU AI Anthropic protocol
</Callout>

***

## Configuration steps [#configuration-steps]

### Step 1 — Open Cursor Settings [#step-1--open-cursor-settings]

Press **Cmd + Shift + J** (macOS) or **Ctrl + Shift + J** (Windows / Linux) to open Settings, and click **Models** in the left sidebar.

### Step 2 — Turn off the default models (recommended) [#step-2--turn-off-the-default-models-recommended]

Cursor ships with many default models (GPT-4 / Claude-3.5, etc.); leaving them enabled conflicts with custom routing. In the model list on the Models page, turn them all **off** (toggle grayed out on the left).

### Step 3 — Add custom models [#step-3--add-custom-models]

Click **Add Model** and enter the LMU AI model IDs you want, for example:

* `claude-opus-5`
* `claude-sonnet-5`
* `gpt-5.6-sol`
* `glm-5.2`
* `qwen3.8-max-preview`
* `deepseek-v4-pro`
* `kimi-k3`

**Add each model once.** For the full list of available models, see the [Model Gallery](/docs/guide/models).

### Step 4 — Turn on Override OpenAI Base URL [#step-4--turn-on-override-openai-base-url]

Scroll to the **OpenAI API Key** area on the Models page:

1. Turn on the **OpenAI API Key** toggle
2. Paste the LMU AI console key (starts with `sk-`) into the API Key box
3. Turn on the **Override OpenAI Base URL** toggle
4. Set Base URL to:
   ```
   https://api.lmuai.ai/v1
   ```
5. Click **Verify** to check the connection

<Callout type="info" title="A failed Verify doesn't mean it's misconfigured">
  Cursor's Verify checks using the **model name** you entered, and non-official OpenAI names (`claude-opus-5`, `glm-5.2`, etc.) won't pass. Workaround: **add a `gpt-4` first to pass Verify** (confirming the Base URL + key connect), then add the custom model IDs you want separately; Verify warns but it runs fine in practice.
</Callout>

### Step 5 — Switch model and use it [#step-5--switch-model-and-use-it]

Press **Cmd/Ctrl + L** to open the Chat panel → pick the custom model you added in Step 3 from the model dropdown at the top → start chatting, and requests will go through LMU AI.

***

## Common model IDs [#common-model-ids]

| Model ID              | Description                             |
| --------------------- | --------------------------------------- |
| `claude-opus-5`       | Claude Opus 5 (flagship, recommended)   |
| `claude-sonnet-5`     | Claude Sonnet 5 (balanced)              |
| `claude-haiku-4-5`    | Claude Haiku 4.5 (high-speed)           |
| `gpt-5.6-sol`         | GPT-5.6 Sol                             |
| `glm-5.2`             | Zhipu GLM-5.2                           |
| `qwen3.8-max-preview` | Qwen 3.8 Max Preview                    |
| `deepseek-v4-pro`     | DeepSeek V4 Pro                         |
| `kimi-k3`             | Kimi K3                                 |
| `claude-opus-4-8`     | Claude Opus 4.8 (previous generation)   |
| `claude-sonnet-4-6`   | Claude Sonnet 4.6 (previous generation) |
| `gpt-5.5`             | GPT-5.5 (previous generation)           |
| `glm-5.1`             | Zhipu GLM-5.1 (previous generation)     |

For the full list, see the [Model Gallery](/docs/guide/models).

***

## Common issues [#common-issues]

### Want Composer / Tab autocomplete to use LMU AI too? [#want-composer--tab-autocomplete-to-use-lmu-ai-too]

Native Override OpenAI Base URL can't do it — these Cursor core features are locked to the official backend. To route everything through LMU AI, use:

* [Official Codex extension](/docs/tools/vscode-plugin) — an OpenAI-protocol agent
* [Claude Code for VS Code extension](/docs/tools/claude-code-vscode) — an Anthropic-protocol agent

Cursor is compatible with the VS Code extension marketplace, so both extensions install directly in Cursor.

### Does the Base URL need `/v1`? [#does-the-base-url-need-v1]

**Yes.** Enter `https://api.lmuai.ai/v1`. Cursor appends `/chat/completions` for a final request to `https://api.lmuai.ai/v1/chat/completions`. Omitting `/v1` gives a 404.

### Built-in Claude 3.5 errors out after turning on Override? [#built-in-claude-35-errors-out-after-turning-on-override]

This is a known Cursor routing conflict — turning on the OpenAI Base URL override interrupts the Anthropic branch. To keep using Claude in the Chat panel, add the Claude model ID (e.g. `claude-opus-5`) as a custom model, and the LMU AI backend does the OpenAI ↔ Anthropic protocol translation.

### 401 / 403 errors? [#401--403-errors]

Check in order:

1. Is the **API Key** the `sk-` key generated in the LMU AI console (not an official OpenAI key)?
2. Is the **Base URL** `https://api.lmuai.ai/v1` (&#x2A;*must include `/v1`**)?
3. Is the **model ID** one LMU AI supports (see the [Model Gallery](/docs/guide/models))?
4. Does your current plan / billing group include the model you're calling?

### Does BYOK affect my Cursor subscription? [#does-byok-affect-my-cursor-subscription]

* BYOK usage **does not consume** Cursor's monthly fast-request quota
* Core features like Composer / Tab autocomplete **still consume** the Cursor subscription quota (because they don't use BYOK)
* To drop the Cursor subscription entirely, see the Codex / Claude Code extension approach above
