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:

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

Setup

  1. Open Cursor → SettingsModels.
  2. Scroll to OpenAI API Key section.
  3. Toggle Custom API Key on.
  4. Fill:
FieldValue
OpenAI API Keyxantly_sk_...
Base URLhttps://api.xantly.com/v1
  1. Click Verify: Cursor pings /v1/models.
  2. 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:

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 IDWhen
xantly/auto-qualityBaRP picks the best T1 chat model. Recommended.
xantly/auto-valueBalanced cost.
anthropic/claude-sonnet-4.6Pin to Claude.
openai/gpt-5.4Pin 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)

What you don't get

Cost math

Cursor Pro: 0/month flat, includes 500 fast requests/mo on proprietary agent.

With BYOK:

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