Setup guide
Connect Cursor
Cursor is an AI code editor. It can use CheapTokens for chat through its OpenAI key and base URL override settings.
Before you start
- A CheapTokens account with some balance. Create one if you haven't.
- Your API key from Dashboard → API key. It starts with
ct_live_. - Any text model from the models page. They all work over the OpenAI Chat Completions format.
The snippets below use claude-sonnet-5-5. Pick another model to update them.
Steps
-
Install Cursor from cursor.com/download and sign in to your Cursor account.
-
Open Cursor Settings → Models and expand API Keys.
-
Turn on OpenAI API Key and paste your CheapTokens key. Turn on Override OpenAI Base URL and enter the base URL.Cursor Settings → Models
OpenAI API Key: YOUR_API_KEY Override OpenAI Base URL: https://cheaptokens.pw/v1
-
Click + Add model, type
claude-sonnet-5-5and switch it on. Then click Verify. -
Pick
claude-sonnet-5-5in the model selector of the chat and send a message.
Check that it works
Send a short message in Cursor, then open Dashboard → Usage. The request appears there within a few seconds, with its model, tokens and cost.
Good to know
- You need a paid Cursor plan to use your own API key.
- Custom keys work for chat models only. Tab completion always uses Cursor's own models.
- The override is global: while it is on, Cursor's built-in GPT models are also sent to CheapTokens. Switch it off to use them again.
- Cursor sends requests through its own servers first, so it only works with the public CheapTokens address, not a local one.
- Cursor's settings screen changes often. If the names differ in your version, look for the OpenAI key and base URL fields under Models.
If something goes wrong
| What you see | What to do |
|---|---|
401 or invalid_api_key | The key is wrong, disabled or has extra spaces. Create a new key and paste it again. |
402 or insufficient_quota | Your balance is empty. Top up under Billing. |
404 or model_not_found | The model ID has a typo. Copy it from the models page. |
| 404 on every request | The base URL is wrong. Check whether this tool needs the /v1 ending (see the steps above). |
| 429 | Too many requests per minute. Wait a few seconds and retry. |
Prefer a guided version? Open the setup wizard →