Tools

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.

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.

Video walkthrough

Why there is no Base URL field under Cursor's Anthropic setting — a ~6 min video on Bilibili (in Chinese) that walks through the entire setup on this page.

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):


Configuration steps

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.

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

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.

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.com/v1
  5. Click Verify to check the connection

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.

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

Model IDDescription
claude-opus-5Claude Opus 5 (flagship, recommended)
claude-sonnet-5Claude Sonnet 5 (balanced)
claude-haiku-4-5Claude Haiku 4.5 (high-speed)
gpt-5.6-solGPT-5.6 Sol
glm-5.2Zhipu GLM-5.2
qwen3.8-max-previewQwen 3.8 Max Preview
deepseek-v4-proDeepSeek V4 Pro
kimi-k3Kimi K3
claude-opus-4-8Claude Opus 4.8 (previous generation)
claude-sonnet-4-6Claude Sonnet 4.6 (previous generation)
gpt-5.5GPT-5.5 (previous generation)
glm-5.1Zhipu GLM-5.1 (previous generation)

For the full list, see the Model Gallery.


Common issues

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:

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

Does the Base URL need /v1?

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

Built-in Claude 3.5 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?

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.com/v1 (must include /v1)?
  3. Is the model ID one LMU AI supports (see the Model Gallery)?
  4. Does your current plan / billing group include the model you're calling?

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

Last updated:

On this page