Skip to content
Sign Up Free
Coding and development

Cursor setup: API key, Base URL, and models

Install Cursor, configure the BetterToken Base URL and API key, choose an available model, and troubleshoot common errors. Includes setup guidance.

To connect Cursor to BetterToken, prepare an API key, enter the Base URL shown below, and choose a current Model ID from the model plaza.

Key settings

FieldValue
API KeyBetterToken API key
Base URLhttps://bettertoken.ai/v1
ModelA current Model ID from the model plaza

Prerequisites

Sign up and get a BetterToken API Key

Already have an account? Sign in, top up, then create a key in the console.

Additional requirements

Install

Download and install the current version from the Cursor website. Sign in with a Cursor account that supports custom models, then continue below.

Cursor’s BYOK rules limit OpenAI BYOK to standard, non-reasoning chat models. Tab completion continues to use Cursor’s built-in models. Requests pass through Cursor’s backend for prompt building; the API Key is sent with each request and is not retained after it completes. BYOK data handling follows the selected provider’s policy, rather than Cursor’s Zero Data Retention policy.

On Teams and Enterprise plans, eligible BYOK requests still count toward Cursor usage through the Cursor Token Rate, while the model provider bills the model cost separately. Check your team’s credit, on-demand usage, and spend limits: requests can stop when the allowance is exhausted. Individual plans have different usage rules; see the plan details.

Manual setup

Complete this setup in the Cursor settings UI. You do not need to edit a configuration file.

Cursor fieldValue
Override OpenAI Base URLTurn on
Base URLhttps://bettertoken.ai/v1
OpenAI API KeyBetterToken API Key
Custom modelA complete model ID

Setup

Open the model settings page

In Cursor, click Settings in the lower-left corner, then go to Models. Scroll down to API Keys.

Cursor settings page showing Settings, Models, API Keys, OpenAI API Key, and Override OpenAI Base URL fields.

Enter the Base URL and API Key

In API Keys, configure the fields in this order:

  1. Enable Override OpenAI Base URL
  2. Enter https://bettertoken.ai/v1 in the Base URL field
  3. Paste your BetterToken API Key into OpenAI API Key
  4. After the URL and key are filled in, enable the OpenAI API Key toggle

Enter the key before turning on the toggle. This makes Cursor show the authentication confirmation dialog.

Enable the OpenAI API Key

In the confirmation dialog, click Enable OpenAI API Key.

Cursor confirmation dialog asking you to enable your own OpenAI API key.

Refresh the model list and enable models

Back in Models, click the refresh button on the right before selecting a model. Wait until the model list finishes refreshing.

Copy the exact Model ID from the model plaza.

Cursor Models section showing the refresh button and model toggles.

Return to chat and turn off Auto

After setup, return to the Cursor chat screen and open the model picker below the input box. If Auto is enabled, turn Auto off first.

Cursor chat model picker showing the Auto toggle that should be turned off.

Select the model and start chatting

Choose the model you enabled, then start chatting.

Cursor chat input with an enabled model selected from the model picker.

Verify the connection

Send a short test prompt. If the tool returns a response without an authentication or Model ID error, the connection works. Fully restart the tool after changing its configuration.

Cursor CLI boundary

The official Cursor CLI (cursor-agent) uses Cursor account authentication: CURSOR_API_KEY is a Cursor Key, not a BetterToken API Key. Its --endpoint option specifies the Cursor service address; the official authentication and parameter references do not document an OpenAI-compatible Base URL. This page’s desktop BYOK configuration does not apply to Cursor CLI.

Switch models

Open the model selector or change the Model field in the configuration. Use the exact Model ID from the model plaza, then restart the current session.

Common errors

Custom API and API Key errors

Before changing models or keys, compare your settings with the Cursor custom OpenAI API configuration.

Cursor does not show Custom API, API Key, or Base URL fields

Check your Cursor plan and client version. Custom models are available only in supported paid tiers. After updating Cursor, open Settings → Models again.

The API Key cannot be enabled or verified

Enter the Base URL https://bettertoken.ai/v1 and the API Key before turning on the OpenAI API Key toggle. Do not append /chat/completions to the Base URL, and do not use an invalid API Key.

The model is missing after refresh

Copy the exact Model ID from the model plaza.

Cursor built-in models stop working

Override OpenAI Base URL is global. When you are not using BetterToken, turn this toggle off so Cursor can use its own Base URL again.

Chat selects a different model

Open the model picker and turn Auto off. Then manually select the model you enabled.

Technical details

Protocol, endpoint, and internal provider fields

This setup uses https://bettertoken.ai/v1. The tool appends the OpenAI-compatible endpoint path. Do not add /chat/completions or /responses unless a specific field explicitly requires it.

Notes