Using Routic in Cursor
Point Cursor at Routic to use Claude, GPT-4o, Gemini and more — at a lower cost, with a single API key.
Why bother
- One key, all major models — no need to maintain separate Anthropic / OpenAI / Google accounts
- Low-latency endpoint — direct connection, no proxy required
- Unified billing — one dashboard for all usage and invoices
Prerequisites
- Cursor v0.40+ (custom OpenAI-compatible providers are supported from this version)
- A Routic Base URL and Virtual Key (available in your console under API Keys)
Setup
Option 1: Cursor Settings UI (recommended)
-
Open Cursor → Settings (
Ctrl+Shift+Jor top menu → Cursor Settings) -
In the left sidebar, click Models
-
Find Custom OpenAI-compatible API or the Add model entry
-
Fill in:
Field Value API Base URL https://YOUR_GATEWAY_HOST/v1API Key Your Virtual Key (starts with sk-) -
Click Verify — a green status means you're connected
-
Enable the model names you want (must match the names in Routic's model catalog)
Option 2: Config file
In your project root or ~/.cursor/:
{
"openai": {
"apiKey": "YOUR_ROUTIC_VIRTUAL_KEY",
"baseURL": "https://YOUR_GATEWAY_HOST/v1"
}
}
Field names may change as Cursor updates. Check Cursor's docs for the latest.
Verify
Send a message in Cursor Chat and confirm you get a response. If you see errors:
- Make sure the Base URL ends with
/v1 - Check the Virtual Key is active (view in console)
- Ensure the model name matches the Routic catalog exactly
Troubleshooting
Model not found
The model name must exactly match the catalog name (case-sensitive). Check routing and models.
401 / 403
Your Virtual Key is invalid or expired. Regenerate it from the console.
Timeout / slow responses
Open https://YOUR_GATEWAY_HOST/v1/models in a browser to verify the endpoint is reachable.
Routic