Back to Home

Cursor

Cursor is an AI-first fork of VS Code. Both its chat and inline edit features can talk to any OpenAI-compatible endpoint.

⚠️ Cursor Pro subscription required: calling an external API (i.e. filling in a custom Base URL + API Key) is a paid feature — the "Override OpenAI Base URL" option is only available on Cursor Pro. The free tier is restricted to Cursor's built-in model pool and cannot connect to Tokensmart. Upgrade to Pro (14-day free trial) before continuing.

💡 One-click config: create a key on the API Keys page, then open the Config Guide → Cursor entry next to that key to see exactly what to paste into Cursor Settings.

Steps

  1. Open Cursor, press Cmd/Ctrl + , for Settings
  2. Click Models in the left pane
  3. Paste your Tokensmart key (pk_live_xxxxxxxxxxxxxxxx) into OpenAI API Key
  4. Expand Override OpenAI Base URL and enter:
https://api.tokensmart.ai/v1
  1. Click Verify
  2. After verification, tick the models you want under Model Name (gpt-5.4, gpt-5.5, …), or add claude-sonnet-4-6 manually

Using it

  • Cmd/Ctrl + L — chat sidebar
  • Cmd/Ctrl + K — inline rewrite
  • Switch models from the dropdown at the top of the chat panel

Tokensmart tips

  • Use Claude inside Cursor: Cursor's own backend does not offer the full Claude Opus 4.8 / 4.7 · Sonnet 4.6 · Haiku 4.5 lineup, but through Tokensmart you can drop claude-sonnet-4-6 / claude-opus-4-8 into Custom Models and use them exactly like GPT.
  • Leave Tab completion to Cursor's native model: Cursor's proprietary Tab model is fast and essentially free — do not burn Tokensmart credits routing Tab. Reserve Tokensmart for Chat and Cmd+K where you actually want a big model.
  • Lock down the model allowlist: restrict Allowed Models on the Cursor key to cheaper models like gpt-5.4-mini / gpt-5.4 and set a daily limit, so a Cursor auto-update cannot silently switch your default to a pricier flagship.
  • Per-tool accounting: create a key named e.g. cursor-dev — then filter API Logs by that key to see Cursor's spend in isolation.

Troubleshooting

  • Custom model not working — make sure "Use custom model" is toggled on, otherwise Cursor falls back to its own service
  • Tab completion not using Tokensmart — Tab completion uses Cursor's proprietary small model and does not route through third-party endpoints; this is expected
  • 401 — verify the key is still active on the API Keys page