> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openp.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Use OpenPAI as a model provider in Cursor

[Cursor](https://cursor.com/) supports configuring a custom OpenAI-compatible API, letting you route its built-in AI traffic to OpenPAI.

## Configuration steps

<Steps>
  <Step title="Open settings">
    `Cmd/Ctrl + ,` → open **Cursor Settings** → the **Models** tab.
  </Step>

  <Step title="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
  </Step>

  <Step title="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`
  </Step>

  <Step title="Click Verify">
    Cursor makes a `/v1/chat/completions` call to verify the key works; once it passes you can use it in the editor.
  </Step>
</Steps>

## Limitations

<Warning>
  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).
</Warning>

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

```json theme={null}
{
  "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.
