by dwgx
Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, Anthropic- & Gemini-compatible APIs. Zero-dependency self-hosted reverse proxy for Claude Code, Cline & Cursor. 把 Windsurf/Devin 云端 100+ 模型变成三套兼容 API。
# Add to your Claude Code skills
git clone https://github.com/dwgx/WindsurfAPIGuides for using cli tools skills like WindsurfAPI.
Last scanned: 6/14/2026
{
"issues": [
{
"file": "README.md",
"line": 188,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-06-14T08:15:54.200Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}WindsurfAPI is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by dwgx. Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, Anthropic- & Gemini-compatible APIs. Zero-dependency self-hosted reverse proxy for Claude Code, Cline & Cursor. 把 Windsurf/Devin 云端 100+ 模型变成三套兼容 API。. It has 2,890 GitHub stars.
Yes. WindsurfAPI passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/dwgx/WindsurfAPI" and add it to your Claude Code skills directory (see the Installation section above).
WindsurfAPI is primarily written in JavaScript. It is open-source under dwgx on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh WindsurfAPI against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
把 Windsurf / Devin 的 100+ AI 模型(Claude、GPT、Gemini、DeepSeek、Kimi、GLM、SWE…)变成 OpenAI / Anthropic / Gemini 三套标准 API。零 npm 运行时依赖。
没点 Star 和 Follow 的:严禁商业使用、转售、代部署、挂后台对外提供服务、包装成中转服务出售。 点了 Star 和 Follow 的:随便用,我睁一只眼闭一只眼。
代码本体按 MIT License 开源(见 LICENSE),上面这段是作者个人态度。
把 Windsurf(原 Codeium,现 Devin Desktop)的 AI 模型变成三套标准 API 同时兼容:
POST /v1/chat/completions — OpenAI 兼容 任何 OpenAI SDK 直接用POST /v1/responses — OpenAI Responses 兼容POST /v1/messages — Anthropic 兼容 Claude Code / Cline / Cursor 直接连POST /v1beta/models/* — Gemini 兼容 直接对接 Gemini SDK100+ 模型:Claude 4.5/4.6/Opus 4.7 · GPT-5/5.1/5.2/5.4 全系 · Gemini 2.5/3.0/3.1 · Grok · Qwen · Kimi K2.x · GLM 4.7/5/5.1/5.2 · MiniMax · SWE 1.5/1.6 · Arena 等。零 npm 依赖 纯 Node.js。
关键词:Windsurf 逆向 · Devin 代理 · Claude Code 中转 · Cursor 镜像 · AI 中转 API · OpenAI 兼容接口 · 免费 Claude/GPT/Gemini · 大模型反代 · Codeium 逆向
┌─────────────┐ /v1/chat/completions ┌────────────┐
│ OpenAI SDK │ ──────────────────────→ │ │
│ curl / 前端 │ ←────────────────────── │ │
└─────────────┘ OpenAI JSON + SSE │ WindsurfAPI│
│ Node.js │ ┌──────────────┐ ┌─────────────────┐
┌─────────────┐ /v1/messages │ (本服务) │ gRPC │ Language │ HTTPS │ Windsurf 云端 │
│ Claude Code │ ──────────────────────→ │ │ ───→ │ Server (LS) │ ────→ │ server.self- │
│ Cline │ ←────────────────────── │ │ ←─── │ (Windsurf │ ←─── │ serve.windsurf │
│ Cursor │ Anthropic SSE │ │ │ binary) │ │ .com │
└─────────────┘ └────────────┘ └──────────────┘ └─────────────────┘
↑
账号池轮询
速率限制隔离
故障转移
它做了什么:
模型本身不会操作文件 — 文件操作是 IDE Agent 客户端(Claude Code / Cline 等)在本地执行的:
你 "帮我改 bug" Claude Code WindsurfAPI Windsurf Cloud
│ │ │ │
│────────────────────────────→ │ │ │
│ │ POST /v1/messages │ │
│ │ messages + tools + system │ │
│ │ ─────────────────────────────→│ 打包成 Cascade 请求 │
│ │ │ ──────────────────────→ │
│ │ │ │
│ │ │ 模型思考 → 返回
│ │ │ tool_use(edit_file)
│ │ │ ←────────────────────── │
│ │ ←── Anthropic SSE ────────────│ │
│ │ content_block=tool_use │ │
│ │ │ │
│ │ 本地执行 edit_file() │ │
│ │ (读写本地文件) │ │
│ │ │ │
│ │ 带 tool_result 再发一轮 │ │
│ │ ─────────────────────────────→│ ──────────────────────→ │
│ │ ... (循环) ...
│ │ │ │
│ ← 最终答案 │ │ │
重点:WindsurfAPI 只负责传递 tool_use / tool_result,真正改文件的是客户端 CLI。
git clone https://github.com/dwgx/WindsurfAPI.git
cd WindsurfAPI
bash setup.sh # 建目录 · 配权限 · 生成 .env
node src/index.js
Dashboard:http://你的IP:3003/dashboard
cp .env.example .env
# 可选:提前把 language_server_linux_x64 放到 .docker-data/opt/windsurf/ 下
# 不放也行,容器首次启动时会自动下载到 /opt/windsurf/
docker compose up -d --build
docker compose logs -f
默认挂载:
./.docker-data/data:持久化 accounts.json、proxy.json、stats.json、runtime-config.json、model-access.json、logs/./.docker-data/opt/windsurf:Language Server 二进制与数据目录./.docker-data/tmp/windsurf-workspace:临时工作区如果想改持久化目录,可在 .env 里设置 DATA_DIR。Docker 默认已设为 /data。
部署过之后要拉最新修复,一条命令搞定:
cd ~/WindsurfAPI && bash update.sh
update.sh 做了:git pull → 通过 install-ls.sh 更新 LS binary → 停 PM2 → kill 3003 端口残留 → 重启 → 健康检查。
如果你用的是我们的公网实例(skiapi.dev 之类),不用管,我们已经推过了。
git clone https://github.com/dwgx/WindsurfAPI.git
cd WindsurfAPI
# Language Server 二进制 —— 自动检测 Linux/macOS,一键下载 + chmod
bash install-ls.sh
# 下载链:WindsurfAPI release → 公开 LS mirror
# https://github.com/dwgx/windsurf-ls-release/releases/latest/download
# → Exafunction/codeium fallback。需要私有镜像或回滚时可设置:
# WINDSURFAPI_LS_RELEASE=https://github.com/<owner>/<repo>/releases/latest/download bash install-ls.sh
# 默认安装路径:
# Linux x64: /opt/windsurf/language_server_linux_x64
# Linux arm64: /opt/windsurf/language_server_linux_arm
# macOS Apple Silicon: $HOME/.windsurf/language_server_macos_arm
# macOS Intel: $HOME/.windsurf/language_server_macos_x64
# 如果想用本地已下好的 binary:
# bash install-ls.sh /path/to/language_server_linux_x64
# 或者指定 URL:
# bash install-ls.sh --url https://example.com/language_server_linux_x64
# ⚠️ 看不到 opus-4.7 / 其他新模型?
# 默认下载链已接入 dwgx/windsurf-ls-release 公开 mirror。
# 如果 mirror 暂未覆盖你的平台,仍可把 Windsurf 桌面端本体里的 LS binary 拷过来:
#
# macOS: "$HOME/Library/Application Support/Windsurf/resources/app/extensions/windsurf/bin/language_server_macos_arm"
# Linux: "$HOME/.windsurf/bin/language_server_linux_x64"
# 或 /opt/Windsurf/resources/app/extensions/windsurf/bin/language_server_linux_x64
# Windows: %APPDATA%\Windsurf\bin\language_server_windows_x64.exe
#
# # 从本地桌面端装:
# bash install-ls.sh /path/to/language_server_linux_x64
#
# LS binary 一换,/v1/models 立刻就能看到最新模型目录了(云端自动发现)。
cat > .env << 'EOF'
PORT=3003
API_KEY=
DEFAULT_MODEL=claude-4.5-sonnet-thinking
MAX_TOKENS=8192
LOG_LEVEL=info
LS_BINARY_PATH=/opt/windsurf/language_server_linux_x64
LS_DATA_DIR=/opt/windsurf/data
LS_PORT=42100
DASHBOARD_PASSWORD=
EOF
# macOS 本地部署时,使用 install-ls.sh 打印的 LS_BINARY_PATH,
# 并把 LS_DATA_DIR 设到用户可写目录,例如 /Users/you/.windsurf/data。
node src/index.js
服务跑起来之后要先加 Windsurf 账号才能用,三种方式:
方式 1 Dashboard 一键登录(推荐)
打开 http://你的IP:3003/dashboard → 登录取号 → 点 Google 登录 或 GitHub 登录(OAuth 弹窗)或直接填邮箱密码。所有方式都会自动入池。
方式 2 Token(任何登录方式都能用)
去 windsurf.com/show-auth-token 复制 Token:
curl -X POST http://localhost:3003/auth/login \
-H "Content-Type: application/json" \
-d '{"token": "你的token"}'
方式 3 批量
curl -X POST http://localhost:3003/auth/login \
-H "Content-Type: application/json" \
-d '{"accounts": [{"token": "t1"}, {"token": "t2"}]}'
from openai import OpenAI
client = OpenAI(base_url="http://你的IP:3003/v1", api_key="你设的API_KEY")
r = client.chat.completions.create(
model="claude-sonnet-4.6",
messages=[{"role": "user", "content": "你好"}]
)
print(r.choices[0].message.content)
export ANTHROPIC_BASE_URL=http://你的IP:3003
export ANTHROPIC_API_KEY=你设的API_KEY
claude # 正常用 Claude Code 即可
# 裸 curl 测试
curl http://localhost:3003/v1/messages \
-H "Authorization: Bearer 你的key" \
-H "anthropic-version: 2023-06-01" \
-d '{"model":"claude-opus-4.6","max_tokens":100,"messages":[{"role":"user","content":"你好"}]}'
在客户端配置里 Custom OpenAI Compatible:
http://你的IP:3003/v1Cursor 用户注意:Cursor 客户端白名单会拦截含
claude的模型名(请求根本不到后端)。用以下别名绕过:
在 Cursor 填 实际模型 opus-4.6claude-opus-4.6 opus-4.6-thinkingclaude-opus-4.6-thinking opus-4.7claude-opus-4-7-medium sonnet-4.6claude-sonnet-4.6 sonnet-4.5claude-4.5-sonnet haiku-4.5claude-4.5-haiku ws-opusclaude-opus-4.6 ws-sonnetclaude-sonnet-4.6 GPT / Gemini / DeepSeek 等不受 Cursor 白名单限制,直接填原名。
| 变量 | 默认值 | 干嘛的 |
|---|---|---|
PORT |
3003 |
服务端口 |
API_KEY |
空 | 调 API 要带的密钥 留空就不验证 |
DATA_DIR |
项目根目录 | 持久化 JSON 状态和 logs/ 的目录,Docker 推荐设成 /data |
DEFAULT_MODEL |
claude-4.5-sonnet-thinking |
不传 model 用哪个 |
MAX_TOKENS |