# Bring your own key to Cursor through one endpoint

> Markdown mirror of https://router.one/integrations/cursor for AI assistants and crawlers. Router One is an OpenAI-compatible LLM API gateway.
> Last updated: 2026-08-07

Cursor is one of the most popular AI code editors, and its settings let you bring your own API key: override the OpenAI base URL, paste a key, and the chat and Composer models bill through that key. Pointing the override at Router One puts GPT, Claude, Gemini, and DeepSeek family models behind one key — pay-as-you-go, as low as 10% of official list prices on select models, with a per-request cost trace for every call. To be precise about scope: the override applies to Cursor's chat and Composer models; Cursor Tab autocomplete stays on Cursor's own models.

## Configure Cursor to use the Router One base URL

Open Cursor → Settings → Models → OpenAI API Key, enable "Override OpenAI Base URL", set it to the gateway URL, paste your Router One key, and click Verify. Pick a listed model, or add the exact ID from the /models page as a custom model:

`cursor-settings`

```bash
# Cursor → Settings → Models → OpenAI API Key
Override OpenAI Base URL:  https://api.router.one/v1
API Key:  sk-your-router-one-key
Model:    <copy the exact ID from /models>
```

## Which model ID should Cursor send?

Copy the exact model ID from the /models page — IDs are case-sensitive, and the page lists each model's context window, capabilities, and current per-token rates. Create a dedicated API key per tool with its own maxSpend cap, so one runaway tool can't affect other workloads.

## Verify the Cursor call in your request trace

After your first request, open Dashboard → Logs to see its full trace: model, tokens, cost, latency, and status code. From here every Cursor call has a ledger and a trail instead of being a black box.

## FAQ

### Does the override cover Cursor Tab autocomplete?

No. The base-URL override applies to the chat and Composer models you pick in Cursor; Tab autocomplete runs on Cursor's own models and is billed by your Cursor plan. Using Cursor from Mainland China? The China-specific setup with Alipay billing has its own guide — see the related links below.

### Which models can Cursor use through the gateway?

Any chat-capable model in the catalog — GPT, Claude, Gemini, Grok, DeepSeek, GLM, and Kimi families. The /models page is the source of truth for model IDs and per-token rates.

### Does this work from Mainland China?

Yes. The gateway is reachable from Mainland China without a VPN, and the configuration is identical to the global setup.

### How do I debug a 401/403/429?

Open Dashboard → Logs first to see whether requests reached the gateway and with what status, then walk the error-codes reference to check env vars, key status, and limits.

## See also

- All integration guides: https://router.one/integrations
- Debug 401/403/429 in Cursor: https://router.one/llm-api-error-codes
- OpenClaw setup: https://router.one/integrations/openclaw
- Zed setup: https://router.one/integrations/zed
- Cursor in China (no VPN + Alipay): https://router.one/cursor-china
- What the gateway layer does: https://router.one/llm-api-gateway
- OpenAI-compatible API: https://router.one/openai-compatible-api
- API docs: https://router.one/docs
- Canonical page: https://router.one/integrations/cursor
- Models and per-model token rates: https://router.one/models (markdown: https://router.one/models.md)
- Pricing: https://router.one/pricing
- API docs (markdown): https://router.one/docs.md
- Company facts: https://router.one/facts/company.md
