On May 28, 2026, VS Code 1.122 made custom endpoints available without GitHub sign-in. To use your own key in Cursor, open Settings, then Models; for a gateway, enable Override OpenAI Base URL. In Cline, select Requesty or OpenAI Compatible. In VS Code, add a Custom Endpoint for Chat.
BYOK at a glance
Bring your own key (BYOK) means entering a model provider or gateway credential into your coding tool. A custom endpoint also changes where the tool sends the request. We run Requesty, the gateway used in these examples. You can also use a direct provider key.
As of October 2026, the settings and boundaries are:
| Tool | Key and endpoint | Work on this path | Separate feature | Plan and admin control |
|---|---|---|---|---|
| Cursor IDE | Provider key; OpenAI base URL override for compatible gateways | Compatible chat and agent requests | Tab uses Cursor models | X Plus excludes BYOK; Free and Plus exclude third-party models. Free key behavior and legacy eligibility depend on the plan. Enterprise controls personal API keys. |
| Cline | Native Requesty provider or OpenAI Compatible URL and key | Agent requests with a compatible model | Model and endpoint need agent tool support | Enterprise can enforce a provider and URL |
| VS Code Chat | Built-in provider or Custom Endpoint with key | Local harness chat and tools; configurable utility tasks | Copilot inline suggestions use a separate path | Local BYOK chat needs no Copilot plan; Business and Enterprise can control VS Code BYOK |
Cursor's X Subscription overview says new customers start on X Subscription; legacy plans continue unless changed or canceled.

The endpoint, key and model ID belong together. A Requesty key authenticates to Requesty; an OpenAI key authenticates to OpenAI. To follow the Requesty examples, create an account first. The Model Library lists IDs in provider/model form. The Mistral and Claude models used below are paid: prepaid accounts need credits, while post-paid organizations follow their billing agreement.
Add a custom API key in Cursor
- 1Open model settings
Open Cursor Settings, then Models. Find the provider for your credential, such as OpenAI or Anthropic.
- 2Save the key
For OpenAI, disable Override OpenAI Base URL so the key is not sent to the gateway. Paste the OpenAI key into the OpenAI field and select Save. For another provider, use its matching key field. Choose an available model in chat.
Cursor's provider guide lists supported providers. For OpenAI, it specifies standard, non-reasoning chat models.
- 1Create a key
Create a key on the Requesty API Keys page and set a monthly spend limit.
- 2Add credits
For a prepaid account, ask an admin to top up in Billing settings if the balance does not cover the paid model.
- 3Set the key and base URL
In Cursor Settings, open Models, then API Keys. Enable OpenAI API Key and paste your Requesty key. Enable Override OpenAI Base URL and enter
https://router.requesty.ai/v1. - 4Add and select a model
In Models, select + Add model and enter
mistral/mistral-small-2603. Select it in a new chat. The Requesty Cursor integration documents the override; do not add/chat/completionsto the base URL.
Mistral Small 4 was released in March 2026 and supports Chat Completions and function calling. Mistral's guide describes client-defined tool calls, and the Requesty deployment page lists tool calling through its OpenAI-compatible API. Cursor limits its own OpenAI BYOK description to standard, non-reasoning chat models. Test the gateway model using the checklist below.
Protocol matters for other models too. OpenAI says GPT-6.1 Terra tool calling requires Responses. Requesty's Responses reference documents openai-responses/ for native upstream Responses; its standard openai/ prefix routes upstream through Chat Completions. For Terra tool calls, use a Responses-capable client and check the exact gateway model ID.
What the override changes
Cursor says custom API keys work with chat models; Tab uses Cursor's built-in models. Compatible custom models can also be selected in the agent panel. On October 2, Cursor staff said that IDE subagents in current versions inherit the custom OpenAI key and base URL. This setup covers the IDE; see Cursor CLI configuration and Cloud Agents for those surfaces.
The override is not per model. Cursor staff explains that built-in picker models on the affected OpenAI request path can also be sent to the override. To return to Cursor subscription models, disable Override OpenAI Base URL and turn off the custom OpenAI API Key. Re-enable both for Requesty. Cursor staff also describes disabling the custom key when returning to subscription models.
For Enterprise, an admin controls Personal API Keys (BYOK) under Team Settings, then Models. Cursor's enterprise guide describes model access separately.
Check the bill and the backend hop
The provider or gateway bills the model request. On Teams and Enterprise, Cursor's Token Rate page also lists a $0.25 charge per million input, output and cached tokens for eligible third-party requests, including BYOK. Listed exempt models remain exempt with BYOK; individual plans do not pay this rate. Cursor's general BYOK page describes the charge more broadly, so check your bill or ask Cursor how it classifies a custom gateway model ID.
Cursor says requests pass through its backend for final prompt building, with the key sent to that backend for each request. Cursor's Zero Data Retention policy does not apply to BYOK. Gateway and provider data policies also apply. A localhost endpoint on your laptop is therefore not sufficient: the Cursor backend must reach the endpoint over the network. Review authentication and TLS before exposing a private service.
Set a custom endpoint in Cline
- 1Create a key
Create a key on the Requesty API Keys page.
- 2Add credits
For a prepaid account, ask an admin to add credits in Billing settings if the balance does not cover the paid model.
- 3Choose Requesty and the model
Open the Cline panel, select the settings gear and choose Requesty from API Provider. Paste your Requesty key and
mistral/mistral-small-2603from the Model Library. Save the settings and select the model.
The Requesty Cline integration documents this path. The native provider does not require a base URL.
- 1Create a key
Create a key on the Requesty API Keys page.
- 2Add credits
For a prepaid account, ask an admin to add credits in Billing settings if the balance does not cover the paid model.
- 3Enter the endpoint details
In Cline panel settings, select OpenAI Compatible under API Provider. Set Base URL to
https://router.requesty.ai/v1, API Key to your Requesty key, and Model tomistral/mistral-small-2603. Save and select the model. For another gateway, replace all three values with that provider's details.
Cline's OpenAI Compatible guide covers context window, output limit and image settings. Match them to the selected model.
If you use different models for Plan and Act, configure and check the provider and model in each mode. Cline also documents local models, including Ollama. Its Ollama provider uses http://localhost:11434 when Ollama runs on the same machine.
With Cline Enterprise remote configuration, an admin can set OpenAI Compatible, a base URL and optional headers. Signed-in members of the VS Code and JetBrains extensions cannot select another provider once enforced; they supply endpoint credentials where required. Our 2025 Cline tutorial has a longer walkthrough; use the current settings and model IDs above.
Use GitHub Copilot BYOK in VS Code
Update VS Code and install the GitHub Copilot Chat extension. VS Code 1.122 brought Custom Endpoint to Stable and made signed-out BYOK available for chat and tools. VS Code 1.128 introduced the model options in this example. The harness controls below describe the current VS Code interface.
VS Code documents Local harness BYOK without GitHub sign-in or a Copilot plan. A hosted model still requires provider access and payment.
- 1Create a key
Create a key on the Requesty API Keys page.
- 2Add credits
For a prepaid account, ask an admin to add credits in Billing settings if the balance does not cover the paid model.
- 3Add a custom endpoint
Run
Chat: Manage Language Modelsfrom the Command Palette, or open the Chat model picker and select its gear. Choose Add Models, then Custom Endpoint. UseRequestyas the group name, enter your Requesty key and choose Messages as the API type. - 4Edit the model entry
VS Code stores the key in secret storage and opens
chatLanguageModels.json. Merge the Requesty entry below into the file's existing array instead of replacing the file. Copy the model ID, URL,toolCallingflag and token limits as shown, but keep the generatedapiKeyreference from your installation (the one below is an example). Save the file.JSON[ { "name": "Requesty", "vendor": "customendpoint", "apiKey": "${input:chat.lm.secret.xxxxxxxx}", "apiType": "messages", "models": [ { "id": "anthropic/claude-sonnet-5-5", "name": "Claude Sonnet 5.5", "url": "https://router.requesty.ai", "toolCalling": true, "maxInputTokens": 128000, "maxOutputTokens": 16000, "modelOptions": { "temperature": null, "top_p": null } } ] } ] - 5Open a Local session
In the editor Chat view, select New Chat, open Session Target and choose Local. Select the Requesty model, then select Agent in the agent picker.
If Local is missing or Copilot keeps being selected on an unmanaged editor, run
Preferences: Open User Settings (JSON)and add these settings to the existing object. Microsoft's harness FAQ describes this experimental fallback:JSON{ "chat.editor.localAgent.enabled": true, "chat.defaultToCopilotHarness": false, "chat.editor.preferCopilotHarness": false }Organization policy can override these settings or move a Local session to Copilot to enforce managed permissions. On a managed device, ask your administrator. Local sessions are available in the editor Chat view, not the Agents window.
The Requesty Copilot guide documents the Messages endpoint setup. toolCalling declares support to VS Code; the model and endpoint must support tool calls too. Do not put a literal API key into the JSON file.
Anthropic's Sonnet 5.5 migration guide specifies native Messages requirements: omit temperature, top_p and top_k, use automatic instead of forced tool choice, and return thinking blocks unchanged in tool loops. Thinking runs by default when a request omits thinking; the configuration above does not turn it off.
VS Code documents null options for omitting temperature and top_p. Explicit per-request options take precedence according to the VS Code implementation, so inspect outgoing parameters if you receive a sampling error. A VS Code issue reports thinking-signature errors in long custom-endpoint agent loops. If a signature error interrupts a session, start a new chat. If it recurs, change the ID to anthropic/claude-opus-4-7 and the display name to Claude Opus 4.7, then run the verification checklist. Opus 4.7 is active legacy with different pricing; its native API defaults to thinking off when thinking is omitted. Keep the null sampling options.
For Copilot Business or Enterprise, ask an admin to enable the Bring Your Own Language Model Key in VS Code policy before using the personal endpoint setup.
GitHub also has an enterprise-managed custom models preview. Enterprise owners manage credentials in GitHub and can allow organization owners to do so. That path serves eligible licensed users through GitHub's Copilot API. The local VS Code JSON above does not configure it.

Local describes where the agent runs, not where the model runs. Requesty's endpoint is hosted. For BYOK in a Copilot harness session, enable the experimental chat.agentHost.byokModels.enabled setting and restart the agent host process, as described in the VS Code 1.128 release notes. Copilot CLI and cloud sessions have separate configuration; see GitHub's CLI model setup.
VS Code uses separate utility models for chat titles and commit messages. When a Copilot token is available, these default to Copilot models even if the main chat model uses BYOK. Set chat.utilityModel and chat.utilitySmallModel to an available BYOK model, or set chat.byokUtilityModelDefault to Main Agent Model. The VS Code utility settings explain precedence and signed-out behavior.
Verify the route, then test an agent
Custom endpoint verification
0 of 4 done
For Cursor, compare the result with its Spending dashboard.
To isolate Requesty from the editor, set REQUESTY_API_KEY in your shell and keep it out of tickets and repositories. First, list the models allowed for that key:
curl -sS https://router.requesty.ai/v1/models \
-H "Authorization: Bearer $REQUESTY_API_KEY" \
-w '\nHTTP %{http_code}\n'For Cursor or Cline, test a Chat Completions request:
curl -sS https://router.requesty.ai/v1/chat/completions \
-H "Authorization: Bearer $REQUESTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"mistral/mistral-small-2603","messages":[{"role":"user","content":"Reply with pong."}]}' \
-w '\nHTTP %{http_code}\n'For the VS Code Messages path, test the Messages operation:
curl -sS https://router.requesty.ai/v1/messages \
-H "x-api-key: $REQUESTY_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"anthropic/claude-sonnet-5-5","max_tokens":4096,"messages":[{"role":"user","content":"Reply with pong."}]}' \
-w '\nHTTP %{http_code}\n'Check for a text response and stop_reason. If the response stops at max_tokens, raise the limit and retry. Anthropic explains that thinking and visible text share the output limit. These commands test basic protocol requests, not streaming or the editor's tool calls. The Requesty error reference explains origin, which distinguishes router errors from upstream provider errors.
| Symptom | Check next |
|---|---|
| Requesty balance exhausted (402) | Check the response message and origin. If the Requesty balance is exhausted, an admin should top up. |
| Key rejected or access denied | Match the key to the endpoint. Check expiration, spend limit and model permissions. Requesty's models API documents a 403 for invalid or revoked keys; other 403 responses can have different causes. |
| Model missing or not found | Copy the exact provider/model ID. Check the key's allowed models, editor plan and organization policy. VS Code agent models need tool support. For a 404, check the protocol and base path. |
| Cannot type in Cursor API fields | Cursor staff says the 3.15.x focus bug was fixed in 3.15.20. Update Cursor, or use Tab to focus the field. |
| Cursor verifies but no request reaches the gateway | Check the selected model, override, backend reachability and TLS. Cursor staff documented a case where verification passed but backend TLS failed. |
| Chat works but agent fails | Inspect tool support, streaming and client version. An earlier Cline issue illustrates a version-specific tool definition problem. Where payload logging is enabled, open Requesty Logs, select the request and download the raw payload. Treat it as sensitive. |
| Wrong destination or unexpected bill | Inspect gateway logs and the selected model. In Cursor, check the override; in VS Code, check utility model settings. |
Give each developer a key
Requesty gives the team one gateway for these configured requests without distributing provider credentials to every editor. Create a separate Requesty key per developer, or per developer and tool, and set a monthly cap on each key. Requesty analytics groups usage by key, user, provider and model. You can revoke one credential without replacing the others.
Requesty logs can include message content and tool results. Turn off payload logging per key, or enable organization-wide zero data retention on Enterprise. On pay as you go, members can see organization-wide logs and analytics; Enterprise scopes visibility by role. With payload logging off, new requests retain operational metadata for the route check but have no stored content in the Messages tab. Previously captured payloads remain accessible. These controls govern Requesty's storage; provider and Cursor policies are separate.
The editor uses a Requesty key to reach the gateway. If your organization has provider contracts, it can use Requesty's provider-key settings and choose those credentials in a routing policy. Those provider keys are separate from the key entered in the editor.
For failover, create a fallback policy, choose its ordered models and use policy/your-policy-name as the model ID where the client accepts it. Each target needs to support the workflow's context, streaming and tools. Requesty attempts the next configured target on supported failures. For Claude thinking sessions, a change of model or provider account can cause earlier thinking blocks to be dropped. Check Anthropic's preserved thinking rules when designing the chain.
Requesty provides access to 600+ models. Pay as you go uses prepaid credits, with a 5% fee on top of credit top-ups and no seat fees or minimums. For example, a $100 credit top-up incurs a $5 fee: $100 + $5 = $105 charged, with $100 credited to the balance. See billing and pricing.
Which should you pick?
Pick Cline for its native Requesty provider, generic OpenAI Compatible endpoint and documented local-model path. Pick VS Code if you want BYOK chat without a Copilot plan. Pick Cursor if it is already your editor and you are comfortable keeping Tab on Cursor's model path.
Create a Requesty account and configure one editor. For VS Code, keep our GitHub Copilot guide at hand.
Frequently asked questions
- How do I use a custom API key in Cursor?
- In Cursor Settings, open Models, select your provider, paste its API key and save. For a compatible gateway, use the OpenAI API Key field and Override OpenAI Base URL, then add and select a supported model. Cursor Tab continues to use Cursor's built-in models.
- Does Cursor require a paid plan to use my own API key?
- Cursor's X Subscription Plus plan explicitly excludes your own API keys, and its plan table lists third-party models as unavailable on Free and Plus. Eligibility differs between new X Subscription and legacy Cursor plans, so check your plan and organization policy.
- Why is Cursor's OpenAI base URL override not working?
- Check your Cursor plan, organization policy, gateway key, base URL and exact model ID. Cursor sends requests through its backend, so the endpoint must also be reachable from Cursor's servers with working TLS.
- How do I set a custom endpoint in Cline?
- In Cline settings, select OpenAI Compatible as the API Provider, then enter the provider's Base URL, API Key and Model ID. For Requesty, you can instead select the built-in Requesty provider and enter a Requesty key and model ID.
- Can I use GitHub Copilot BYOK without a subscription?
- In VS Code, a Local harness session can use a BYOK model for chat without GitHub sign-in or a Copilot plan. Stable Custom Endpoint and signed-out BYOK arrived in VS Code 1.122. The model provider's charges still apply, and inline suggestions use a separate Copilot path.
- Do Cursor Tab and Copilot inline suggestions use my custom endpoint?
- Cursor Tab uses Cursor's built-in models and does not use the custom API key. VS Code BYOK covers supported chat and utility tasks, while Copilot inline suggestions require the Copilot service.
- MAR '25
Supercharging Cline with Requesty: Models, Fallbacks, and Optimizations
- SEP '26
OpenAI-Compatible APIs: Meaning, Providers and Examples
An OpenAI compatible API lets you reuse your SDK, but features vary. Compare provider endpoints, tools, streaming, JSON, vision and Responses support.
- SEP '26
Cursor vs Claude Code (2026): Cost, Models and Team Controls
Cursor vs Claude Code: compare September 2026 plans, agent workflows, models, team controls and transparent monthly cost scenarios for developers.
