Bring your own key to Cursor through one endpoint
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 models you pick in Cursor's chat and Agent panel bill through that key. Pointing the override at Router One puts GPT, Claude, Gemini, and Grok 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: per Cursor's API-keys help page (checked 2026-09-29), custom API keys only work with chat models, Tab completion keeps using Cursor's built-in models, and requests made with your key are routed through Cursor's servers for final prompt building; Cursor staff have added on its forum that the own-key setup covers Chat and Agent only, so Auto and Cursor's Composer models stay on Cursor's side. The key replaces the model bill for the models you pick, not your Cursor plan. OpenAI's proposed November 12, 2026 shutoff of its model supply to Cursor is covered below.
Configure Cursor to use the Router One base URL
Open Cursor Settings → Models. Paste your Router One key into the OpenAI API Key field and save it, turn on "Override OpenAI Base URL" and set it to the gateway URL, then add the exact ID from the /models page as a custom model and pick it in the chat or Agent model selector. Cursor's help page (checked 2026-09-29) documents the key field and its Save step but not the override itself; Cursor staff described this override-plus-custom-model setup on the Cursor forum in August 2026, and OpenAI's help article on using OpenAI models in Cursor (checked 2026-11-13) describes the same custom-base-URL route for OpenAI-compatible gateways:
- Override OpenAI Base URL
- https://api.router.one/v1
# Cursor → Settings → Models → OpenAI API Key Override OpenAI Base URL: https://api.router.one/v1 API Key: sk-your-router-one-key Custom model: <copy the exact ID from /models>
OpenAI's proposed November 12, 2026 Cursor shutoff: where it stands and your own key
On August 28, 2026, OpenAI announced that it intends to wind down its contract providing OpenAI models to Cursor, with a proposed shutoff date of November 12, 2026, and that it will not provide future models to Cursor. That date passed without a confirmed end date: OpenAI's help article on using OpenAI models in Cursor still calls November 12 a proposed transition period and says OpenAI will share the official termination date once both companies confirm it, and Cursor's models page still lists GPT-5.6 Luna, Sol and Terra (both checked 2026-11-13). Check both pages before planning around a date. The contract covers the OpenAI models Cursor serves on its own plans; the setup on this page is a separate path, in which Cursor sends the custom models you add to the base URL you set and Router One bills them: plan quota for plan-covered models, otherwise your wallet. The same OpenAI article lists an OpenAI-compatible gateway set as Cursor's custom base URL among the ways to keep using OpenAI models in Cursor, and notes that gateway credentials cover only local Chat and Agent requests (not Tab, Auto, Cloud or Background Agents, Automations, the Cursor CLI or Cursor's API and SDK) and that some model-specific controls may not be forwarded through a custom base URL. What Cursor's help page (checked 2026-09-29) says about that path: your provider bills own-key requests directly, own keys only work with chat models (for OpenAI keys, standard non-reasoning chat models), and on Teams and Enterprise plans the Cursor Token Rate still applies. Two points are not verified: how Cursor treats the override once the contract ends, and whether it accepts newer reasoning IDs such as openai/gpt-6-sol or openai/gpt-6-astra as custom models with their full behavior, reasoning effort included. Before relying on a model, send one request with it and confirm the model and status in Dashboard → Logs.
Which model ID should Cursor send?
Copy the exact model ID from /models, preserving case, hyphens, and version suffixes; do not substitute a display name. Open its detail page and match the supported API endpoints, context window, and capabilities such as tool calling to the provider and features selected in Cursor. A catalog listing does not mean the client can use every feature of that model. Give each client or application a dedicated API key with a maxSpend cap. A key's spend cap (maxSpend) limits what that key can charge to your wallet: once its cumulative wallet charges reach the cap, its wallet-billed requests return HTTP 402. Requests covered by your plan's quota draw from the account's shared plan quota and do not count toward any key's cap.
Which API protocol is Cursor using?
OpenAI-compatible describes an interface format; it does not make Chat Completions (/v1/chat/completions), Responses (/v1/responses), and Anthropic Messages (/v1/messages) interchangeable. Check the installed client version, provider configuration, and actual request path against the model detail page and API compatibility fact sheet. A successful plain-text chat does not establish support for hosted tools, conversation state, or file-editing features.
Verify the Cursor call in your request trace
Send a simple text request from Cursor, then match its trace in Dashboard → Logs by time, model, and request_id: tokens, the wallet charge or plan quota it used, latency, and status. Next, test streaming, tool calls, and multi-turn history separately. For failures, retain the actual request path, full error message, and request_id. If there is no matching log, either the request never reached the gateway (client configuration or connectivity) or the gateway refused it before calling a model — a 401 for the key, a 402 for funds, a 429 from your key's or account's limits, or a 400 or 404 for the model ID or endpoint; a streamed request that failed before any output may have no log either. The status and error message the client received tell which, so check them before attributing the error to the gateway or upstream.
FAQ
Does the override cover Cursor Tab autocomplete?
No. Cursor's help page says custom API keys only work with chat models and that Tab completion continues using Cursor's built-in models, and Cursor staff have said on its forum that the own-key and custom-endpoint setup applies to Chat and Agent only. Auto and Cursor's own Composer models also stay on Cursor's side and are billed by your Cursor plan. Using Cursor from Mainland China? The China-specific setup with Alipay billing has its own guide, Cursor in China, at /cursor-china.
Does Agent mode run on my key?
Yes, for the custom model you pick: Cursor staff have said on its forum (August 2026) that the own-key and custom-endpoint setup applies to Chat and Agent, and requests the gateway sends to a model land in Dashboard → Logs with their model, tokens, cost, and status. Cursor builds the final prompt on its own servers (per its help page), so which tools and edit formats an Agent turn sends is Cursor's choice; file-edit flows are worth trying rather than guaranteed, and if an edit fails, read the error Cursor shows, then open Logs: a request the gateway refused (such as a 401 or 402) has no row there, and a streamed request that failed before any output may have none either.
Why does Claude Opus 5 or Opus 5.5 hit a context limit in Cursor?
Router One serves claude-opus-5 and claude-opus-5-5 with a million-token context window — the /models page shows the live figure, 1.05M today for both. Cursor sends its own per-model Context setting, and that value is not automatically the maximum: open the model picker in the chat pane, edit the model's parameters, set Context to 1M (older Cursor builds expose this as the MAX toggle), then start a new chat and try again.
Will GPT models still work in Cursor after November 12, 2026?
No end date has been confirmed yet. On August 28, 2026, OpenAI announced that it intends to wind down its contract providing OpenAI models to Cursor, with a proposed shutoff date of November 12, 2026, and that it will not provide future models to Cursor. The date passed without a confirmed termination date: as of 2026-11-13, OpenAI's help article still calls November 12 a proposed transition period and says the official date will be shared once both companies confirm it, and Cursor's models page still lists GPT-5.6 Luna, Sol and Terra. The announcement covers the models Cursor serves itself. Requests you send with your own key through the base-URL override are billed by Router One, and the models on your key are the ones listed on /models. Cursor has not documented how the override behaves once the contract ends — as of 2026-11-13 its help page does not describe the override at all — and whether it accepts newer reasoning IDs such as openai/gpt-6-sol as custom models is not verified, so send one test request after each Cursor update and check it in Dashboard → Logs.
Which models can Cursor use through the gateway?
Choose a current catalog model that supports both the endpoint and the features Cursor uses. Check /models and the model detail page for the exact ID, current rates, and capabilities; a family name such as GPT or Claude is not a compatibility guarantee. A client that lists a model has only read the ID, from its own configuration or from GET /v1/models; verify an actual request too.
Models are listed, but requests fail with 400 or 404. What should I check?
Record the actual request path and error message, then check the exact model ID. A 400 can indicate invalid parameters, unsupported tools, or a model/endpoint mismatch; a 404 can indicate an incorrect path or missing resource, so it does not by itself establish that a model was retired. If the error says must be called via, use the named endpoint or select a model supported on the current endpoint. Do not add or remove /v1 or /chat/completions across all clients indiscriminately.
Does this work from Mainland China?
Router One's endpoint is reachable from Mainland China without a VPN, but with Cursor that is not the connection your editor makes: per Cursor's help page, requests made with your own key are routed through Cursor's servers for final prompt building, so the editor still needs its usual connection to Cursor's backend, which Router One does not change. For card or Alipay billing and the China-specific setup, see Cursor in China at /cursor-china.
How do I debug a 401/402/403/429?
Start from what your client received: the status, the error body and the X-Request-ID header. A 401 (missing, unknown, revoked or expired key), a 402 (wallet balance, or the key's maxSpend cap) and a 429 from your key's or account's rate limits are refused before any model is called, so they never appear in Dashboard → Logs — nor does a 400 or 404 for a wrong model ID or endpoint. For 401, check that the full key is sent and still active in Dashboard → API Keys; for 402, top up or raise the key's maxSpend; for a 403, keep the full error body. For 429, back off and retry later; a 429 that does show up in Logs came back from upstream after the gateway's retries. Keep the request_id and follow the error-codes reference.