Cursor
Cursor lets you override the OpenAI base URL and bring your own API key. Point that override at Merge Gateway and Cursor can use every model Gateway routes to (OpenAI, Anthropic, Google, Kimi, and more) under a single API key.
Cursor’s Agent mode does not currently support custom API keys. Only Ask and Plan modes work with a custom OpenAI base URL. Tab autocomplete uses Cursor’s proprietary model and isn’t routed through Gateway either.
Before you start
- Grab an API key from gateway.merge.dev/settings/api-keys.
- Decide which model you want to use. Gateway model names take the form
provider/model. For example,anthropic/claude-opus-4.6,openai/gpt-5.2, orgoogle/gemini-2.5-pro. List everything available viaGET /v1/models.
Configure Cursor
Open Cursor Settings → Models
In Cursor, open Settings → Cursor Settings → Models. Scroll down to the API Keys section.
Paste your Gateway API key
Enable OpenAI API Key and paste your Merge Gateway API key into the field.
Add a custom model
Click + Add Custom Model and enter a Gateway model name in provider/model form, for example:
Enable the toggle next to the model you just added. Repeat for any other models you want available in the picker.
Verify the key
Cursor will prompt you to verify the key. On success, your custom models become selectable.
Select the model and send a test message
Open the Cursor chat pane (Ask mode, Cmd+L / Ctrl+L), select your Gateway model from the dropdown, and send a test message. The request will show up in your Gateway dashboard within a few seconds.
Caveats
Agent mode isn't supported with custom API keys
Cursor’s Agent mode currently requires Cursor’s own API credentials. Use Ask or Plan mode when working through Gateway. This is a Cursor-side restriction; Gateway itself handles agentic workloads fine. See Tool calling.
Tab autocomplete isn't routed through Gateway
Tab autocomplete in Cursor uses a proprietary Cursor model and is not affected by the OpenAI base URL override. Only chat (Ask / Plan) traffic goes through Gateway.
Cursor may warn about limited agentic support
When you select a non-native model, Cursor can show a warning about limited agentic support. For Ask and Plan modes, you can safely ignore it. Tool calling works through Gateway for any model whose capabilities.supports_tool_calling is true on the chosen vendor route.
Which models can I use?
Any model Gateway supports. Use GET /v1/models to list them, or open the Gateway dashboard and copy the model identifier. If you set a routing policy, the exact model in the picker becomes a fallback and Gateway picks the vendor per request.