RuntokenDocs

Cursor

Revision 1 · Updated 2026-11-12 · 3 min read

Connect Cursor chat to a Runtoken endpoint.

Prerequisites#

Before you start, prepare:

  • An installed Cursor editor and a small test project.
  • A Runtoken platform API key.
  • An OpenAI Chat-compatible model ID eligible for custom-key use in the client.

Set the endpoint and model#

Open Cursor Settings → Models, then expand API Keys. Use the OpenAI-compatible configuration controls below; this does not require an OpenAI-issued key.

SettingValue or actionPurpose
OpenAI API KeyYOUR_PLATFORM_KEYRuntoken credential.
Use OpenAI API KeyEnableUses the supplied key for eligible requests.
Override OpenAI Base URLEnableRoutes eligible requests to the custom endpoint.
Base URLhttps://api.runtoken.net/v1API prefix, without /chat/completions.
Custom model IDYOUR_MODEL_IDExact model identifier from the platform catalogue.

Replace YOUR_PLATFORM_KEY and YOUR_MODEL_ID with your platform credential and chosen model ID. Do not put the key into the model name or send it in chat. Control labels can vary by editor version; both the custom key and address must be active.

Save the settings, restart Cursor, open a new chat and explicitly select the custom model. Do not use automatic model selection to establish which endpoint is being called.

If the API-key section is missing or disabled, check your team's personal-key policy with its administrator. Creating another custom model does not override a team restriction.

Check chat and editing#

First ask for a short explanation of the test directory. Find the matching request in Runtoken and check the model and time. A successful key-verification button does not prove that the next chat uses the intended model.

Then ask for the following change using a chat mode that supports file edits.

Check a small file changetext
Create greeting.py with greet(name), returning "Hello, " plus name.
Show the proposed change. Do not install packages or use the network.

Review and apply the intended edit, then ask for an empty name to return "Hello, friend". Inspect the real file and corresponding requests. If editing is unavailable for this model or mode, do not treat a text answer as an applied change.

Feature and data boundaries#

A custom endpoint applies to eligible model requests, not every feature in the editor.

AreaBoundary
Chat modelsMust support custom API keys in Cursor and the protocol offered by Runtoken.
Tab completion and Cursor-specific modelsContinue to follow Cursor's own feature and model rules.
Model selectionBeing visible in the picker does not establish custom-key compatibility.
Request pathCustom-key requests still pass through Cursor's servers for final prompt construction.

A custom base URL is not a promise of direct device-to-gateway traffic. Review Cursor's data policies together with your gateway requirements before using private project content. A custom key also does not remove any applicable Cursor plan charges or replace platform inference billing.

Troubleshooting#

Check the selected chat model before changing the endpoint or key.

SymptomWhat to check
API-key controls are hiddenTeam policy and current editor settings.
Model does not support custom API keysChoose an eligible model; an arbitrary rename does not add protocol support.
401 or rejected modelWhether the key toggle is enabled, the ID is exact and the model is allowed.
404Effective base URL and actual request path; avoid adding /v1 twice.
Chat works but another editor feature failsWhether that feature supports the selected custom-key model.
Local curl works but Cursor cannot connectNetwork reachability from Cursor's request path, not only from your terminal.

Restore and next steps#

To return to the previous setup, restore the original key and base-URL controls and select your previous model. Remove only the custom entries you added.

See OpenAI Chat and Cursor's API-key guide.

Was this page helpful?