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)

  1. Open Cursor → Settings (Ctrl+Shift+J or top menu → Cursor Settings)

  2. In the left sidebar, click Models

  3. Find Custom OpenAI-compatible API or the Add model entry

  4. Fill in:

    FieldValue
    API Base URLhttps://YOUR_GATEWAY_HOST/v1
    API KeyYour Virtual Key (starts with sk-)
  5. Click Verify — a green status means you're connected

  6. 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.

Related