Cursor & Windsurf Setup
Configure Cursor IDE and Windsurf to use TopRouter as the AI provider.
Cursor Setup
Method 1: Settings UI
- Open Cursor
- Go to Settings → Models
- Click Add Model or configure OpenAI API Key
- Set:
- API Key:
sk-your-toprouter-key - Base URL:
https://toprouter.cc
- API Key:
- 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
- Open Windsurf
- Go to Settings → AI Provider
- Select Custom OpenAI Compatible
- Enter:
- Endpoint:
https://toprouter.cc - API Key:
sk-your-toprouter-key - Model: Your preferred model ID
- Endpoint:
- Save and test
Recommended Models
| Model | Best For |
|---|---|
anthropic/claude-4.6-sonnet | Inline code editing, refactoring |
anthropic/claude-4.8-opus | Complex architectural tasks |
openai/gpt-5.5 | General code assistance |
google/gemini-3.5-flash | Fast completions, cost-effective |
Tips
- Tab Completion: Use a fast model like
google/gemini-3.5-flashfor autocomplete - Chat: Use a more capable model like
anthropic/claude-4.6-sonnetfor chat interactions - Agent Mode: Use
anthropic/claude-4.8-opusfor autonomous coding agents
INFO
Configuration options may vary by version. Check the official documentation for your specific Cursor or Windsurf version.
