Docs / Clients / Cursor

Cursor

Cursor's BYOK is OpenAI-compatible only. It verifies the endpoint by calling the models list and expecting a 200 — which OpenGateway returns for any valid-looking key.

Set the base URL

Go to Settings → Models → API Keys → Override OpenAI Base URL:

cursor settings
Base URL: https://api.opengateway.one/oss/v1
API key:  YOUR_KEY
  1. Cursor calls GET /oss/v1/models to verify. OpenGateway returns the OpenAI list shape with 200, so verification passes.
  2. Add a model with + Add Custom Model, e.g. claude-sonnet-4-7 or a raw id like Qwen/Qwen3-Coder-480B-A35B-Instruct:fastest.
Cursor client-side caveats

The base-URL override is global and also reroutes Cursor's own models; Cursor periodically auto-disables the toggle, so re-enable it as needed.

Vision/multimodal requests hit a hardcoded api.openai.com validation in Cursor that ignores the override — text works, images may not. This is a Cursor-side limitation, not a gateway one.

Why the 200 matters

See Model discovery for why the 200 requirement exists and how the dual-shape endpoint satisfies both OpenAI and Anthropic clients from one path.