Use Xantly with Cursor (chat-only BYOK)
Cursor's BYOK is chat-only, Agent, Edit, and Tab all bypass it. If you must stay in Cursor, here's the real-world config with the known base-URL override bug documented.
If you're committed to staying in Cursor and want to route its chat panel through Xantly, this is the real-world guide, including the known bugs and which features won't work. If you're willing to switch editors for full BYOK, see Migrate from Cursor instead.
The scope of Cursor's BYOK
Cursor's BYOK setting affects only the chat panel. It does not reach:
- Agent mode: uses Cursor's proprietary fine-tuned models, billed to Cursor.
- Cmd+K inline edit: same, proprietary models.
- Cursor Tab: proprietary custom autocomplete.
- Composer: proprietary.
- Bug Finder: proprietary.
Cursor's own error text on the setting reads: "Agent and Edit rely on custom models that cannot be billed to an API key."
So you're paying Cursor Pro (0/mo) for the features you actually use, and BYOK only helps you on the chat panel. Still useful if you chat a lot, but know the boundary.
Prerequisites
- Cursor installed
- A Xantly API key, create one
Setup
- Open Cursor → Settings → Models.
- Scroll to OpenAI API Key section.
- Toggle Custom API Key on.
- Fill:
| Field | Value |
|---|---|
| OpenAI API Key | xantly_sk_... |
| Base URL | https://api.xantly.com/v1 |
- Click Verify: Cursor pings
/v1/models. - Under Chat Model, select a Xantly-catalog model (e.g.
xantly/auto-quality).
⚠️ The base-URL override bug
There's a long-standing Cursor bug: after setting a custom base URL, Cursor's internal model router sometimes refuses to use any model until you toggle the Custom API Key off and on again.
Thread: forum.cursor.com, "Cannot use any models if OpenAI base URL overridden"
It's intermittent, no fix timeline from the Cursor team. Workarounds:
- Toggle Custom API Key off, then on, then Verify again.
- Restart Cursor after changing the base URL.
- Remove your OpenAI-provider API key from the non-BYOK field; sometimes Cursor tries both and gets confused.
If you hit this regularly, it's a strong signal to consider migrating to Cline, Cline has no equivalent bug.
Model choice (chat panel only)
| Model ID | When |
|---|---|
xantly/auto-quality | BaRP picks the best T1 chat model. Recommended. |
xantly/auto-value | Balanced cost. |
anthropic/claude-sonnet-4.6 | Pin to Claude. |
openai/gpt-5.4 | Pin to GPT. |
Verify
In the Cursor chat panel:
Reply with just the word "pong".
Check your Xantly dashboard, the call logs with routed-to model + cost.
What you get (chat only)
- Semantic cache on chat prompts: re-asked questions hit cache.
- Waterfall fallback inside the chat model, a 500 from one provider silently falls back.
- Cost visibility on chat calls.
- Memory via
X-Xantly-Memory-Mode, if Cursor supports custom headers on BYOK requests (experimental).
What you don't get
- Agent mode routing, still goes to Cursor's proprietary models.
- Cmd+K edits, still proprietary.
- Cursor Tab, still proprietary.
- Full Xantly benefits: these kick in when all requests flow through, which only Cline/Continue/OpenCode/etc. give you.
Cost math
Cursor Pro: 0/month flat, includes 500 fast requests/mo on proprietary agent.
With BYOK:
- You still pay 0/mo for Cursor Pro (agent/edit/tab require it).
- Chat calls go through Xantly at a few dollars per month, semantic cache saves ~30%.
- Net: You add -5/month to your existing 0/mo.
Compare with Cline + Xantly at $0 subscription, $4-8/mo in tokens total. If chat is where you spend most of your AI budget, the math is still with Cursor Pro + BYOK. If you use agent mode heavily, the math flips hard toward Cline.
Gotchas
Base URL bug (see above). Budget time for toggling on/off.
/v1 suffix required.
Model ID format. Cursor requires OpenAI-style model IDs (openai/..., anthropic/...) in its dropdown. The xantly/auto-* aliases work.
"Verify" button fails intermittently. Often a transient issue. Retry.
Chat panel context. Cursor sends aggressive file context with each chat. If you see truncation, set model to anthropic/claude-sonnet-4.6 (200k context).
Next steps
- Migrate from Cursor, if BYOK's chat-only limitation frustrates you, the 10-minute move to Cline + Xantly is here.
- Cline, full BYOK everywhere in VS Code.
- Continue.dev, per-role config, also in JetBrains.
- Cost-Optimized Routing, maximize savings on chat calls.