Cursor IDE
Cursor IDE has native support for a custom OpenAI-compatible endpoint. Point it at an LLM Registry entry through the gateway's Cursor-compatibility path, and Cursor can use any provider the entry serves — including Gemini and Bedrock, not just OpenAI-family models.
Setup
All configuration lives in Cursor's Settings under Models. You'll do this in the UI — there are no CLI commands to run.
1. Enable "Override OpenAI Base URL"
In Cursor Settings → Models → API Keys:
- Toggle Override OpenAI Base URL on
- Paste the gateway URL for the mode you want (see the tabs below), including the required
/api/v1/cursorsuffix
2. Set the OpenAI API Key
In the OpenAI API Key field, paste your Agent Access Key (or, in passthrough mode, whichever provider credential the entry requires — see per-provider notes below). Cursor sends this as Authorization: Bearer on every request.
3. Enable the models you want to use
Below API Keys, Cursor lists its default OpenAI models. Toggle those off if you want to use custom-provider models exclusively, then use the Add or search model input to add each model ID from the LLM Registry entry's Allowed Models list (for example, Gemini 3.6 Flash, gemini-2.0-flash, or a namespaced OpenRouter ID). Enable the toggle next to each.
URL to paste
- OpenAI
- OpenRouter
- Anthropic
- Gemini
- Bedrock
Base URL:
- Direct:
https://<gateway-host>/llm/<url-prefix>/api/v1/cursor - Via Agent Persona:
https://<gateway-host>/p/<persona-id>/llm/<registry-entry-id>/api/v1/cursor
OpenAI API Key:
- Gateway-managed key mode: your Agent Access Key
- Passthrough mode: your OpenAI API key
Some OpenAI models return errors from Cursor when routed through the compatibility path. If a model fails, try a different one from the Allowed Models list — the issue is model-specific, not endpoint-wide.
Base URL:
- Direct:
https://<gateway-host>/llm/<url-prefix>/api/v1/cursor - Via Agent Persona:
https://<gateway-host>/p/<persona-id>/llm/<registry-entry-id>/api/v1/cursor
OpenAI API Key:
- Gateway-managed key mode: your Agent Access Key
- Passthrough mode: your OpenRouter API key
Add OpenRouter model IDs in Cursor's custom model input using their vendor-scoped form (e.g., openai/gpt-5.1, anthropic/claude-sonnet-4.6, google/gemini-2.5-flash-lite, moonshotai/kimi-k2.5).
Base URL:
- Direct:
https://<gateway-host>/llm/<url-prefix>/api/v1/cursor - Via Agent Persona:
https://<gateway-host>/p/<persona-id>/llm/<registry-entry-id>/api/v1/cursor
OpenAI API Key:
- Gateway-managed key mode: your Agent Access Key
- Passthrough mode: your Anthropic API key
Some Claude model IDs return errors from Cursor when routed through the compatibility path. If a model fails, try a different one from the Allowed Models list.
Base URL:
- Direct:
https://<gateway-host>/llm/<url-prefix>/api/v1/cursor - Via Agent Persona:
https://<gateway-host>/p/<persona-id>/llm/<registry-entry-id>/api/v1/cursor
OpenAI API Key:
- Gateway-managed key mode: your Agent Access Key
- Passthrough mode: your Google API key
Add Gemini model IDs directly (e.g., gemini-3.6-flash, gemini-2.5-flash-lite, gemini-2.0-flash) using Cursor's Add or search model input.
Base URL:
- Direct:
https://<gateway-host>/llm/<url-prefix>/api/v1/cursor - Via Agent Persona:
https://<gateway-host>/p/<persona-id>/llm/<registry-entry-id>/api/v1/cursor
OpenAI API Key:
- Gateway-managed key mode: your Agent Access Key
- Passthrough mode: your Amazon Bedrock API key
Add Bedrock model IDs using their cross-region inference profile form (e.g., global.anthropic.claude-sonnet-4-6). A bare model ID like anthropic.claude-sonnet-5 returns "on-demand throughput isn't supported" from AWS.
Where to find each value
| Placeholder | Where to find it |
|---|---|
<gateway-host> | Host from the LLM Registry entry's Overview tab |
<url-prefix> | The URL prefix field on the entry's Overview tab |
<persona-id> | The persona's ID on the Agent Persona page |
<registry-entry-id> | The LLM Registry entry's ID on the entry's URL |
| Model IDs | The entry's Allowed Models list |
Tips
- The
/api/v1/cursorsuffix is required. It's what tells the gateway to apply the Cursor-compatibility translation. Without it, Cursor's requests reach the gateway but the response shape may not match what Cursor expects. - Only the Override OpenAI Base URL field is used. Even for Anthropic or Gemini entries, keep the toggle for Override Anthropic Base URL / Override Google API Base URL off — Cursor routes everything through its OpenAI adapter when the OpenAI override is on, and the gateway's Cursor path handles the translation on its side.
- Test a single model first. Add one model from the Allowed Models list, enable it, and try a chat before adding the rest. That way if the base URL or key is wrong, you catch it before spending time enabling ten models.
- Custom model IDs stay case-sensitive. Cursor stores the exact string you type, and the gateway forwards it verbatim. Match the entry's Allowed Models list exactly.
Cequence AI Gateway