Skip to main content
In Cursor, open Settings → Models, enter your OpenAI-compatible API key, enable Override OpenAI Base URL, set the public endpoint to https://bettertoken.ai/v1, and add the exact model ID.
Independent BetterToken setup guide; not Cursor’s official documentation.

When this matters

  • You want Cursor to use a third-party OpenAI-compatible provider
  • You need to set Override OpenAI Base URL
  • You are adding a custom model
  • You see model not found or authentication failures
  • You want Cursor, Codex, and other tools to share one model routing layer

Field meanings

Manual setup

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

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.
2

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.
3

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.
4

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.Only select models that belong to the provider supported by the configured endpoint. When using a BetterToken API key, choose a model ID from the supported provider in the model plaza, then turn on the toggle for that model.
Cursor Models section showing the refresh button and model toggles.
5

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.
6

Select the model and start chatting

Choose the model from a supported provider you enabled, then start chatting.
Cursor chat input with an enabled model selected from the model picker.

Troubleshooting

401 Unauthorized

Confirm that the API key was copied from BetterToken without extra spaces and that Cursor is using https://bettertoken.ai/v1. Do not mix an API key from one provider with another provider’s Base URL. If the key was regenerated or revoked, replace it in Cursor and test again.

Model Not Found or 404

Use the exact API model ID shown in the BetterToken Model Plaza, not the display name shown in the interface. Confirm that the model is available through the OpenAI-compatible endpoint and that the Base URL ends with /v1.

Access to private networks is forbidden

Cursor may reject localhost, 127.0.0.1, private LAN addresses, or other non-public endpoints. When using BetterToken, keep the public HTTPS Base URL https://bettertoken.ai/v1. If you intentionally use a local proxy, configure it according to Cursor’s current local-network restrictions.

Common mistakes

  • 401 Unauthorized: Check that Cursor is using your active BetterToken API Key and that no extra spaces were copied.
  • 404 Not Found: Use https://bettertoken.ai/v1 as the Base URL, not a full request path such as /v1/chat/completions.
  • Model Not Found: Copy the exact Model ID from the model plaza instead of using a display name.
  • Using an API Key from one provider and Base URL from another.
  • Putting a Claude model name into OpenAI-compatible configuration.
  • Using a UI display name instead of an API model ID.
  • Thinking Cursor Rules affect API authentication.
  • Forgetting that a global override can affect other OpenAI models.

About BetterToken

Cursor and similar external tools usually use OpenAI-compatible setup. BetterToken Base URL is https://bettertoken.ai/v1, and model IDs come from the GPT provider in the model plaza. Do not put the Claude Code https://bettertoken.ai into Cursor OpenAI-compatible configuration. This is an independent BetterToken setup guide, not Cursor’s official documentation.

References