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

Cline (VS Code extension)

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

Cline is an agentic coding extension for VS Code. It supports an OpenAI Compatible provider mode, which routes cleanly through ToRouter to Claude, GPT, Gemini and the rest of the catalog.

Configuration

FieldValue
API ProviderOpenAI Compatible
Base URLhttps://portal.torouter.ai/v1
API Keysk-***
Model IDe.g. claude-opus-4-7, gpt-5, gemini-2.5-pro

Walkthrough

Install Cline

Open VS Code → Extensions → search Cline → install.

Open Cline settings

Click the Cline icon in the activity bar → gear icon (Settings) at the top of the Cline panel.

Pick OpenAI Compatible

Under API Provider choose OpenAI Compatible.

Fill in ToRouter

  • Base URL: https://portal.torouter.ai/v1
  • API Key: sk-***
  • Model ID: paste a model id from the catalog, e.g. claude-opus-4-7

Click Done.

Send a test message

In the Cline chat, ask say hello to confirm the round-trip works. Token usage is reported in the panel.

Gotchas

  • Cline's Model ID must match a model id from the ToRouter catalog exactly. Typos return a model_not_found error.
  • For agentic / tool-use flows, prefer Claude (claude-opus-4-7, claude-sonnet-4-5) or GPT-5 — Cline relies heavily on tool calling and these have the best track record.
  • Set per-model context window in Cline settings if the default is too low for big repos; the gateway forwards full context unmodified.
  • The Anthropic provider slot also works — use base URL https://portal.torouter.ai and the same key.

Next steps

Create an API key

Base URL & auth reference

Model catalog

Troubleshoot errors

Cursor

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

Claude Code CLI

Run Anthropic's official Claude Code CLI against ToRouter — full agentic coding without an Anthropic-only key.

Table of Contents

ConfigurationWalkthroughInstall ClineOpen Cline settingsPick OpenAI CompatibleFill in ToRouterSend a test messageNext steps