by guanxiaol
Multi-account pool proxy for Windsurf — 113+ models (Claude/GPT/Gemini/Grok/Kimi) via OpenAI & Anthropic APIs, image upload, Cursor & Claude Code native / 企业级 Windsurf 多账号池化 API 代理
# Add to your Claude Code skills
git clone https://github.com/guanxiaol/WindsurfPoolAPIThis project is for personal learning, research, and self-hosting only. Commercial use, resale, paid deployment, or repackaging as a service without written authorization is strictly prohibited.
本项目仅供个人学习、研究、自用。未经作者书面授权,禁止任何商业用途、付费代部署、中转转售或包装成服务对外销售。
| Feature | Description |
| :--- | :--- |
| Dual Protocol | /v1/chat/completions (OpenAI) + /v1/messages (Anthropic native) |
| 113+ Models | Claude Opus 4.7 · GPT-5.4 · Gemini 3.1 · DeepSeek R1 · Grok 3 · Qwen 3 · Kimi K2.5 · GLM-5.1 and more |
| Multi-Account Pool | Capacity-based load balancing, automatic failover, per-model rate-limit isolation |
| Token & Credit Analytics | Per-API × per-model aggregation down to individual request level |
| Admin Dashboard | Full-featured SPA: account management, proxy config, real-time logs, usage charts |
| Batch Operations | Select multiple accounts, enable/disable in one click |
| OAuth Login | Google / GitHub Firebase OAuth + manual token refresh |
| Dynamic Stall Detection | Input-length-aware timeout (30s–90s) prevents false positives on large contexts |
| Persistent State | All settings, account status, tokens survive restarts |
| Image Upload | Multimodal support — send images via image_url blocks (base64 or URL) |
| Tool Calling | <tool_call> protocol compatible — works with Cursor, Aider, and other AI coding tools |
| Cursor Compatible | 80+ model name aliases including Cursor-friendly names without "claude" keyword |
| Streaming SSE | OpenAI format with stream_options.include_usage support |
| Zero Dependencies | Pure Node.js built-in modules, nothing to install |
language_server_linux_x64 or language_server_darwin_arm64)git clone https://github.com/guanxiaol/WindsurfPoolAPI.git
cd WindsurfPoolAPI
# Place Language Server binary / 放置 Language Server 二进制
sudo mkdir -p /opt/windsurf
sudo cp /path/to/language_server_linux_x64 /opt/windsurf/
sudo chmod +x /opt/windsurf/language_server_linux_x64
# Optional: configure / 可选配置
cp .env.example .env # Edit API_KEY, DASHBOARD_PASSWORD, etc.
# Start / 启动
node src/index.js
macOS — Run
bash scripts/install-macos.shfor auto-start on login.Windows — Run
scripts\install-windows.batfor guided installation.
Dashboard: http://localhost:3003/dashboard
docker compose up -d --build
Mount the LS binary at /opt/windsurf/ on the host before starting.
⚠️ Always use Token login! / 必须使用 Token 方式登录!
Windsurf has a known bug where email/password login may route requests to the wrong account.
Windsurf 官方存在 bug:邮箱/密码登录可能导致请求路由到错误账号。
Get your token / 获取 Token:https://windsurf.com/editor/show-auth-token?workflow=
# ✅ Add account via Token (recommended / 推荐)
curl -X POST http://localhost:3003/auth/login \
-H "Content-Type: application/json" \
-d '{"token": "your-windsurf-token"}'
# Batch add / 批量添加
curl -X POST http://localhost:3003/auth/login \
-H "Content-Type: application/json" \
-d '{"accounts": [{"token": "t1"}, {"token": "t2"}]}'
# List accounts / 列出账号
curl http://localhost:3003/auth/accounts
# Remove / 删除
curl -X DELETE http://localhost:3003/auth/accounts/{id}
curl http://localhost:3003/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'
curl http://localhost:3003/v1/messages \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-H "x-api-key: sk-your-api-key" \
-d '{
"model": "claude-sonnet-4.6",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello!"}]
}'
| Variable | Default | Description |
| :--- | :--- | :--- |
| PORT | 3003 | HTTP server port |
| API_KEY | (empty) | Auth key for /v1/* endpoints. Empty = open access |
| DASHBOARD_PASSWORD | (empty) | Dashboard admin password |
| DEFAULT_MODEL | claude-4.5-sonnet-thinking | Default model when none specified |
| MAX_TOKENS | 8192 | Default max output tokens |
| LOG_LEVEL | info | debug / info / warn / error |
| LS_BINARY_PATH | /opt/windsurf/language_server_linux_x64 | Language Server path |
| LS_PORT | 42100 | Language Server gRPC port |
All endpoints require X-Dashboard-Password header.
| Method | Path | Description |
| :--- | :--- | :--- |
| GET | /dashboard/api/overview | System overview |
| GET | /dashboard/api/accounts | List all accounts |
| POST | /dashboard/api/accounts/batch-status | Batch enable/disable accounts |
| POST | /dashboard/api/oauth-login | OAuth login (Google/GitHub) |
| POST | /dashboard/api/accounts/:id/refresh-token | Refresh Firebase token |
| POST | /dashboard/api/accounts/:id/rate-limit | Check account capacity |
| GET | /dashboard/api/usage | Full usage statistics |
| GET | /dashboard/api/usage/export | Export stats as JSON |
| POST | /dashboard/api/usage/import | Import stats (auto-dedup) |
| GET | /dashboard/api/logs/stream | Real-time SSE log stream |
Access at http://localhost:3003/dashboard
| Panel | Description | | :--- | :--- | | Overview | Runtime stats, account pool health, success rate | | Login | Windsurf token/email login, OAuth | | Accounts | Add/remove, batch enable/disable, per-account proxy, quota display | | Models | Global allow/blocklist, per-account model restrictions | | Proxy | Global + per-account HTTP/SOCKS5 proxy | | Logs | Real-time SSE log stream with level filtering | | Analytics | Token/Credit charts, 14-day trends, 24h distribution, request details | | Detection | Error pattern monitoring, account health | | Experimental | Cascade session reuse, model identity masking, preflight rate-limit |
claude-3.5-sonnet · claude-3.7-sonnet[-thinking] · claude-4-sonnet[-thinking] · claude-4-opus[-thinking] ·
claude-4.1-opus[-thinking] · claude-4.5-sonnet[-thinking] · claude-4.5-haiku · claude-4.5-opus[-thinking] ·
claude-sonnet-4.6[-thinking][-1m] · claude-opus-4.6[-thinking] · claude-opus-4.7-{low,medium,high,xhigh,max}
gpt-4o · gpt-4o-mini · gpt-4.1[-mini/nano] · gpt-5[-mini] · gpt-5.2[-low/medium/high] ·
gpt-5.4[-low/medium/high/xhigh] · gpt-5.3-codex · o3[-mini/high/pro] · o4-mini
gemini-2.5-pro · gemini-2.5-flash · gemini-3.0-pro · gemini-3.0-flash · gemini-3.1-pro[-low/high]
deepseek-v3 · deepseek-r1 · grok-3[-mini] · grok-code-fast-1 · qwen-3 · qwen-3-coder ·
kimi-k2 · kimi-k2.5 · swe-1.5[-thinking] · swe-1.6-fast · arena-fast · arena-smart
Model catalog is auto-synced from Windsurf cloud on startup. Free accounts:
gpt-4o-miniandgemini-2.5-flashonly.启动时自动从 Windsurf 云端拉取最新模型列表。免费账号仅可用 `gpt
No comments yet. Be the first to share your thoughts!