WindsurfAPI is a free, open source api development & testing project written in JavaScript and released under MIT. It has 3,021 GitHub stars, 628 forks and 7 open issues, and was last pushed 18 hours ago. On this registry it ranks #69 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available. It gained 14 stars over the last 3 tracked days.

What is WindsurfAPI?

What it is

WindsurfAPI is a self-hosted reverse proxy written in JavaScript and licensed under MIT. It exposes OpenAI, Anthropic, and Gemini compatible HTTP endpoints for 100+ Windsurf and Devin Desktop AI models. It has zero npm runtime dependencies. The project sits in the Developer Tools / API Development & Testing category and uses the Node.js ecosystem.

The concrete problem is client compatibility. The service lets OpenAI SDK clients, curl users, Claude Code, Cline, Cursor, and Gemini SDK users reach Windsurf or Devin models through standard API shapes. It translates those requests into Windsurf internal gRPC calls through a local Language Server, or through an optional Devin Connect path, and returns compatible JSON or SSE responses.

Key capabilities

  • Exposes POST /v1/chat/completions, POST /v1/completions, POST /v1/responses, POST /v1/messages, and POST /v1beta/models/* endpoints.
  • Translates OpenAI, Anthropic, and Gemini request shapes into Windsurf internal gRPC calls through a local Language Server.
  • Maintains an account pool with polling, rate limit isolation, failover, and circuit breaker behavior.
  • Strips upstream Windsurf identity from responses before the client receives them.
  • Passes tool_use and tool_result blocks for Claude Code, Cline, and Cursor while leaving local file operations to the client.
  • Provides a dashboard at http://your-IP:3003/dashboard and a setup path using setup.sh and node src/index.js.
  • Supports Docker deployment with .env configuration and a default DEVIN_CONNECT=1 setting that avoids running the Language Server.

Who uses it and how

  • OpenAI SDK users, curl users, and frontend callers connect through /v1/chat/completions or /v1/responses.
  • Claude Code, Cline, and Cursor users connect through /v1/messages and receive Anthropic SSE responses.
  • Gemini SDK users connect through /v1beta/models/*.
  • Self-hosters run the service on port 3003 and access the dashboard.
  • Agent workflows send model requests, receive tool_use calls, execute local file edits in the client CLI, then send tool_result back through the proxy.

Getting started

The README shows a Node.js path: clone the repository, run bash setup.sh, then start node src/index.js. It also shows a Docker path: copy .env.example to .env, then use Docker Compose with the default DEVIN_CONNECT=1 setting.

When to use it — and when not to

Use it when a self-hosted bridge from Windsurf or Devin Desktop models to OpenAI, Anthropic, or Gemini client formats is needed, and when the operator can run Node.js or Docker, manage .env secrets, account pools, rate limits, failover, and a local Language Server or Devin Connect path. Avoid it for commercial resale, relay services, or hosted backend use unless the author's star and follow condition is met, because the README adds a personal restriction on top of the MIT code license. Avoid it when upstream Windsurf or Devin access, the internal gRPC path, or identity stripping is not acceptable.

project readme (upstream, from github) — read inline

WindsurfAPI · DevinAPI

把 Windsurf / Devin 的 100+ AI 模型(Claude、GPT、Gemini、DeepSeek、Kimi、GLM、SWE…)变成 OpenAI Chat / Responses / Anthropic / Gemini 四套标准 API。零 npm 运行时依赖。

历史账本 · 把 1387 次提交、196 个版本、82 个 PR、180 个 issue 摊开给你看:时间线主账 + 贡献者分析 + Git 树三形态(竖/横/环)+ 自伤与返工全记录 —— 打开可视化账本(纯原生渲染,零依赖)

Stars  License  Release  CI  Docs  Follow  ·  English

声明

没点 Star 和 Follow 的:严禁商业使用、转售、代部署、挂后台对外提供服务、包装成中转服务出售。 点了 Star 和 Follow 的:随便用,我睁一只眼闭一只眼。

代码本体按 MIT License 开源(见 LICENSE),上面这段是作者个人态度。


Windsurf(原 Codeium,现 Devin Desktop)的 AI 模型变成四套标准 API 同时兼容

  • POST /v1/chat/completionsOpenAI 兼容 任何 OpenAI SDK 直接用
  • POST /v1/completionsOpenAI 旧 Completions(非流式;prompt 包成一条 user turn,流式请走 chat)
  • POST /v1/responsesOpenAI Responses 兼容(另有 GET / DELETE /v1/responses/{id} 读取与删除已存响应,需带身份 header,见下)
  • POST /v1/messagesAnthropic 兼容 Claude Code / Cline / Cursor 直接连
  • POST /v1beta/models/*Gemini 兼容 直接对接 Gemini SDK

100+ 模型:Claude 4.5/4.6/Opus 4.7/5 · GPT-5/5.1/5.2/5.4/5.5/5.6-Luna 全系 · 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/1.7/2 · Arena 等。零 npm 依赖 纯 Node.js。

关键词:Windsurf 逆向 · Devin 代理 · Claude Code 中转 · Cursor 镜像 · AI 中转 API · OpenAI 兼容接口 · 免费 Claude/GPT/Gemini · 大模型反代 · Codeium 逆向

原理 · 5 分钟跑起来 · 客户端接入 · 环境开关 · 全部文档 · English

它到底在干嘛

flowchart LR
    subgraph clients["你的客户端"]
        A["OpenAI SDK<br/>curl / 前端"]
        B["Claude Code<br/>Cline · Cursor"]
        C["Gemini SDK"]
    end

    subgraph gw["WindsurfAPI(本服务 · 端口 3003)"]
        direction TB
        R["协议翻译层<br/>OpenAI ↔ Anthropic ↔ Gemini"]
        P["账号池<br/>轮询 · 限流隔离 · 故障转移 · 熔断"]
        N["身份中和<br/>剥掉上游 Windsurf 身份"]
        R --- P
        R --- N
    end

    LS["Language Server<br/>(Windsurf 二进制)"]
    UP["Windsurf 云端<br/>server.self-serve.windsurf.com"]
    DC["Devin 云端<br/>(DEVIN_CONNECT 路径)"]

    A -- "/v1/chat/completions" --> R
    B -- "/v1/messages" --> R
    C -- "/v1beta/models/*" --> R
    R -- "gRPC" --> LS
    LS -- "HTTPS" --> UP
    R -. "HTTPS(可选直连)" .-> DC

    classDef gwStyle fill:#1f6feb22,stroke:#1f6feb,stroke-width:2px
    classDef upStyle fill:#8957e522,stroke:#8957e5
    class gw gwStyle
    class UP,DC upStyle
纯文本版(不支持 mermaid 的环境)
     ┌─────────────┐   /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            │
     └─────────────┘                          └────────────┘      └──────────────┘       └─────────────────┘
                                                    ↑
                                                账号池轮询
                                                速率限制隔离
                                                故障转移

它做了什么

  1. 一个 HTTP 服务(端口 3003)同时暴露 OpenAI 和 Anthropic 两套 API
  2. 把请求翻译成 Windsurf 内部 gRPC 协议,通过本地 Language Server 发给 Windsurf 云
  3. 维护账号池,自动轮询 + 速率限制 + 故障转移
  4. 返回前把上游 Windsurf 身份剥掉,模型自称"我是 Claude Opus 4.6 由 Anthropic 开发"

Claude Code / Cline / Cursor 怎么用

模型本身不会操作文件 — 文件操作是 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

Docker 部署

cp .env.example .env
# 空 API_KEY / DASHBOARD_PASSWORD 是 fail-closed(compose 默认 0.0.0.0,起来也是 401)。
# compose 默认 DEVIN_CONNECT=1,不跑 Language Server,不会自动下载 LS。
# 只有关掉 DEVIN_CONNECT、走 Cascade 时才会在缺二进制时尝试安装 LS。

docker compose up -d --build
docker compose logs -f

默认挂载:

  • ./.docker-data/data:持久化 accounts.jsonproxy.jsonstats.jsonruntime-config.jsonmodel-access.jsonlogs/
  • ./.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///releases/latest/download bash install-ls.sh

## 默认

readme truncated — read the full docs on github

Frequently asked questions

Is WindsurfAPI free to use?

WindsurfAPI is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does WindsurfAPI do?

Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, Anthropic- & Gemini-compatible APIs. Zero-dependenc

What is WindsurfAPI written in?

WindsurfAPI is primarily written in JavaScript. Its source is publicly available at https://github.com/dwgx/WindsurfAPI, and it has 3,021 GitHub stars.