Skip to content

Cursor & Windsurf Setup

Configure Cursor IDE and Windsurf to use TopRouter as the AI provider.

Cursor Setup

Method 1: Settings UI

  1. Open Cursor
  2. Go to SettingsModels
  3. Click Add Model or configure OpenAI API Key
  4. Set:
    • API Key: sk-your-toprouter-key
    • Base URL: https://toprouter.cc
  5. Select your preferred model

Method 2: Environment Variables

Set before launching Cursor:

bash
export OPENAI_API_KEY="sk-your-toprouter-key"
export OPENAI_BASE_URL="https://toprouter.cc"

Windsurf Setup

  1. Open Windsurf
  2. Go to SettingsAI Provider
  3. Select Custom OpenAI Compatible
  4. Enter:
    • Endpoint: https://toprouter.cc
    • API Key: sk-your-toprouter-key
    • Model: Your preferred model ID
  5. Save and test
ModelBest For
anthropic/claude-4.6-sonnetInline code editing, refactoring
anthropic/claude-4.8-opusComplex architectural tasks
openai/gpt-5.5General code assistance
google/gemini-3.5-flashFast completions, cost-effective

Tips

  • Tab Completion: Use a fast model like google/gemini-3.5-flash for autocomplete
  • Chat: Use a more capable model like anthropic/claude-4.6-sonnet for chat interactions
  • Agent Mode: Use anthropic/claude-4.8-opus for autonomous coding agents

INFO

Configuration options may vary by version. Check the official documentation for your specific Cursor or Windsurf version.

Unified AI API Gateway — Access 200+ models through one endpoint.