VNAI Pro
Client tools

Cursor

Use a gateway key with Override OpenAI Base URL in Cursor

Conditional integration: use OpenAI API key + Override OpenAI Base URL in a Cursor version exposing that setting. Cursor documents BYOK for chat; Tab completion still uses Cursor's models. Do not assume every reasoning model or Agent mode supports a custom endpoint.

1. Prepare

  1. Install/update Cursor.
  2. Create a key for a group with a model supporting OpenAI Chat Completions.
  3. Copy its ID from Check models. The gateway must be publicly reachable over HTTPS because requests pass through Cursor's backend.

2. Enter the key and endpoint

Open Cursor Settings → Models (called Models & API Keys in some versions):

  1. Paste your gateway API key in the OpenAI section.
  2. Enable Override OpenAI Base URL.
  3. Set the base URL to https://api.vnaipro.app/v1.
  4. Click Save or Verify, depending on the version, and enable the API-key toggle if shown.

Do not enter a gateway key in the Anthropic provider while leaving the vendor's default endpoint. If your Cursor version does not expose Override OpenAI Base URL, this setup is unavailable; use Cline or OpenCode.

3. Add the model

Choose Add Custom Model, enter the exact model ID, and enable it. Start a new chat, choose this model instead of Auto, and send “Reply only OK”.

4. Confirm routing

Check usage history on your gateway website. A reply without a gateway request does not establish that the key is in use; check the selected model, API-key toggle, and base URL.

If Verify fails, inspect the error and check whether the key can access the model used for verification. For Responses-only models or models outside Cursor's BYOK support, choose a client with the appropriate adapter. Do not rename a model to bypass verification.

BYOK scope

Cursor states that BYOK requests pass through its backend for prompt construction. Your key does not replace every Cursor feature or subscription; availability also depends on your version and account.

Source: Bring your own API key.

On this page