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
- Open Cursor, press
Cmd/Ctrl + ,for Settings - Click Models in the left pane
- Paste your Tokensmart key (
pk_live_xxxxxxxxxxxxxxxx) into OpenAI API Key - Expand Override OpenAI Base URL and enter:
https://api.tokensmart.ai/v1
- Click Verify
- After verification, tick the models you want under Model Name (
gpt-5.4,gpt-5.5, …), or addclaude-sonnet-4-6manually
Using it
Cmd/Ctrl + L— chat sidebarCmd/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-8into 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.4and 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