LogoToRouter Docs
LogoToRouter Docs
HomepageWhat is ToRouter5-minute quickstartCore concepts
OpenAI Python SDKOpenAI Node / TypeScript SDKAnthropic SDK (Python & TypeScript)Google Gen AI SDK (Gemini)CursorCline (VS Code extension)Claude Code CLILangChain & LlamaIndexDify & n8n (no-code)
Integrations

Cursor

Point Cursor's chat and Composer at ToRouter to use Claude, GPT, Gemini and more from one key.

Cursor accepts any OpenAI-compatible endpoint as a custom model provider. Pointing it at ToRouter unlocks Claude, GPT, Gemini and the rest of the catalog in chat, Composer and inline edits — without needing a paid Cursor Pro tier for those models.

Configuration

FieldValue
Override OpenAI Base URLhttps://portal.torouter.ai/v1
OpenAI API Keysk-***
Modelsadd manually, e.g. claude-opus-4-7, claude-sonnet-4-5, gpt-5, gemini-2.5-pro

Walkthrough

Open model settings

Cmd , → Settings → Models. Scroll to the OpenAI API Key section.

Override the base URL

Toggle Override OpenAI Base URL on and paste https://portal.torouter.ai/v1.

Paste your ToRouter key

In the OpenAI API Key field paste sk-***. Click Verify — Cursor will issue a test request to your override URL.

Add the models you want

In the same panel click + Add model and type the model id exactly as it appears in the ToRouter catalog — e.g. claude-opus-4-7. Repeat for each model. Toggle them on.

Pick the model in chat

Open the chat sidebar (Cmd L) and pick your new model from the dropdown. It should respond instantly.

Gotchas

  • Verifying the key fails if you forget the /v1 suffix or add a trailing slash.
  • Once you override the base URL, all Cursor traffic on that "OpenAI" provider routes through ToRouter — built-in OpenAI models still listed in the UI now also go through your key.
  • Some Cursor features (Tab autocomplete, agent tools) are wired to specific upstream models. Pick a compatible model id; refer to Cursor's documentation for the current matrix.
  • The Anthropic / Google provider slots in Cursor settings are independent — you can leave them empty if you only use the OpenAI-compatible override.

Next steps

Create an API key

Base URL & auth reference

Model catalog

Troubleshoot errors

Google Gen AI SDK (Gemini)

Call Gemini 2.5 and the rest of Google's Gen AI catalog through ToRouter's native /v1beta endpoint.

Cline (VS Code extension)

Configure the Cline VS Code agent to use Claude, GPT and other models through ToRouter.

Table of Contents

ConfigurationWalkthroughOpen model settingsOverride the base URLPaste your ToRouter keyAdd the models you wantPick the model in chatNext steps