Your privacy choices

Allow optional cookies for referral attribution, visit analytics, and Google Ads purchase measurement.

Cursor Setup Guide

Connect versions of Cursor that expose custom OpenAI Key and Base URL settings.

Read this first: Model settings vary across Cursor versions. Direct LLM API Gateway integration is only suitable when Cursor Settings includes options such as OpenAI API Key and Override OpenAI Base URL / Custom Base URL.

SettingValueNotes
API Keysk-xxxxxxxxEnter your own LLM API Gateway Key.
Base URLhttps://api.llm-token.cn/v1Enter it in the Override or Custom Base URL field.
Model IDFull model name from the model listThe model name must match exactly.

1. Open Cursor Model Settings

  1. Open Cursor.
  2. Go to Cursor Settings.
  3. Find Models or the API Keys settings.
  4. Find the OpenAI API Key and Base URL fields.

Cursor Models settings with a list of models, OpenAI API Key and Base URL fields, and a plus button for adding a model, showing where to enter a Key beginning with sk- and the Base URL https://api.llm-token.cn/v1.Cursor Models settings with a list of models, OpenAI API Key and Base UR…

2. Enter the LLM API Gateway Details

  1. Enable the OpenAI API Key or custom API Key option.
  2. Enter your Key beginning with sk- in the API Key field.
  3. Enter https://api.llm-token.cn/v1 in Base URL / Override OpenAI Base URL.
  4. If custom models are supported, enter a model ID such as claude-sonnet-4-6 or gpt-5.4.
  5. Click Verify / Save, then start a new session to test it.

Verification: After saving, start a new Chat, select the configured model, and send a short request asking it to respond in Chinese. A normal response confirms that setup succeeded.

3. Cursor Limitations

SituationRecommendation
No Override Base URL optionYour current version may not support a custom gateway directly. Use VS Code + Cline, Trae + Cline, OpenCode, or WorkBuddy instead.
Verify failsCheck the Key, Base URL, and model ID. Do not use a full API endpoint as the Base URL.
Some features still use Cursor's built-in modelsThis is a Cursor limitation. A custom Key usually applies to standard chat models, while some built-in features may continue using Cursor models.
Model list is missingTest with one explicit model ID first. If it still fails, switch to a Cline-based client.

4. Recommended Alternatives

If your version of Cursor does not support a custom Base URL, the most reliable alternatives are VS Code + Cline and Trae + Cline. Both guides are included in the main tutorial collection and expose the required settings clearly.