Back to guides

Cursor Integration

Override Cursor's OpenAI base URL with LLM Gateway, add your API key, and pick a supported chat model. Covers compatibility limits and billing scope.

To route Cursor's chat models through LLM Gateway, open Cursor Settings → Models → API Keys, enable Override OpenAI Base URL, set it to https://api.llmgateway.io/v1, and add a gateway API key. The steps below cover sign-in, model selection, verification, and what the override does not change.

Video walkthrough

Sign in and open model settings

Install Cursor from its official site, sign in to your Cursor account, and open Cursor Settings → Models → API Keys.

Cursor account access and your gateway API key are separate requirements.

Add the gateway connection

  1. Enter your workspace key under OpenAI API Key.
  2. Enable Override OpenAI Base URL and set https://api.llmgateway.io/v1.
  3. Save or verify the key using the controls in your Cursor version.
  4. Select a supported chat model. If your version offers custom model entry, use the exact ID from the live catalogue.

With a DevPass key, choose a canonical model included in your plan. Upstream provider prefixes pin routing and are not supported on coding plans.

Verify the request

Open a new chat, select the configured model explicitly, and send a short prompt. Check the request in the workspace that issued the gateway key before relying on the connection for agent tasks.

Compatibility depends on Cursor's model support and the mode you use. A custom endpoint does not guarantee that every catalogue model or agent feature works.

Scope and billing

Cursor documents custom keys for chat models; Tab completion continues using Cursor's built-in models. BYOK requests still pass through Cursor's backend for prompt building. Consult Cursor's API key documentation for current plan charges and data handling.

Troubleshooting

Sign-in blocks settings: complete Cursor account sign-in before configuring the provider.

Authentication fails: check the active gateway key and the exact base URL, including /v1.

A model is missing or rejected: confirm Cursor supports it, check its exact catalogue ID, and test a supported chat model first.

An agent tool fails: verify tool support and mode compatibility. Check the actual request and error instead of assuming every editor feature uses the override.

Tab completion uses Cursor's service: this is expected; custom chat keys do not replace its completion models.