Skip to main content
Cursor supports configuring a custom OpenAI-compatible API, letting you route its built-in AI traffic to OpenPAI.

Configuration steps

1

Open settings

Cmd/Ctrl + , → open Cursor Settings → the Models tab.
2

Enable Override OpenAI Base URL

In the OpenAI API Key section:
  • Check Override OpenAI Base URL.
  • Base URL: https://openp.ai/v1
  • API Key: paste the sk- key issued by OpenPAI
3

Enable the models you need

In the Models list, check the models you want (e.g. gpt-5.5, gpt-5.4-mini, o3-mini). To add a custom model ID, click + Add model and enter the ID shown in the OpenPAI console, e.g.:
  • claude-opus-4-8
  • gemini-3.1-pro-preview
  • deepseek-v3
4

Click Verify

Cursor makes a /v1/chat/completions call to verify the key works; once it passes you can use it in the editor.

Limitations

Some Cursor built-in features (Cursor Tab, and certain Agent / Composer capabilities) rely on officially trained private models, so after enabling Override Base URL these features may be unavailable (Cursor falls back to chat / inline generation).
Features that keep working after Override:
  • ✅ Chat (Cmd+L)
  • ✅ Inline Edit (Cmd+K)
  • ✅ Custom Tools (MCP)
  • ⚠️ Composer / Agent — partial fallback
  • ❌ Cursor Tab — unavailable
If you depend on Cursor Tab, we recommend combining an official Cursor subscription + OpenPAI’s advanced models.

Call OpenPAI from Composer / Agent

Even though the official Agent doesn’t support a custom base URL, you can let the Agent call OpenPAI via MCP tools:
{
  "mcpServers": {
    "openpai-search": {
      "command": "npx",
      "args": ["-y", "@openpai/mcp-server"],
      "env": { "OPENPAI_API_KEY": "sk-XXXXXXXXXXXXXXXX" }
    }
  }
}

Notes

  • The API key and Base URL are stored only locally; they are not uploaded to Cursor’s servers.
  • After changing the config, restart Cursor to ensure the new base URL takes full effect.