Cursor

Cursor + Leanroute

Cursor's "Override OpenAI base URL" setting lets you point chat + composer at any OpenAI-compatible gateway. Cursor still uses its own backend for autocomplete and Cursor-specific features (Tab, Apply, Bug Finder); that part stays on Cursor's billing.

1. Get a gateway key

From /dashboard/keys create a key labeled "cursor". Copy the value — we only show it once.

2. Cursor Settings → Models

Open the Cursor command palette (Cmd/Ctrl + Shift + J), type Cursor Settings, and choose the Models tab.

  • In the OpenAI API Key section, paste your gw_live_* key.
  • Expand OpenAI Base URL and set: https://api.leanroute.dev/v1.
  • Scroll to Model Names and add the canonical model strings you want to use, one per line. For example:
    anthropic/claude-sonnet-4-6
    openai/gpt-4o
    google/gemini-2.5-pro
    deepseek/deepseek-v3
  • Click Verify. Cursor sends one probe request to our gateway; a green checkmark means routing + auth + the model list all work.

3. Pick a Leanroute model in chat

Open the chat sidebar (Cmd/Ctrl + L), click the model dropdown above the input box, and pick one of the names you added. Conversations from that point on route through Leanroute; the per-message indicator at the bottom shows the model that answered.

What stays on Cursor's backend

Cursor's autocomplete (Tab), Apply, Bug Finder, and Indexing all run on Cursor's own infrastructure regardless of this setting. Pointing at Leanroute affects chat + Composer requests only. Cursor's subscription still applies for the rest; Leanroute bills only the chat traffic we actually see.

Troubleshooting

  • Verify fails: double-check the base URL has /v1 on the end. Cursor doesn't add it for you.
  • Model dropdown still shows Cursor's defaults: the custom-model rows are below the built-ins. Scroll the dropdown.
  • Streaming feels slow: Cursor buffers a few tokens before flushing to the UI. That's a client-side decision — the wire is fine. Our response headers show first-byte under 100ms from Singapore.
  • 402 insufficient_credit: top up at /dashboard/billing.