How to Set Up WindsurfAPI: A Step-by-Step Tutorial for 100+ AI Models
Step-by-step tutorial to deploy WindsurfAPI with Docker, connect Claude Code and Cursor, and access 100+ AI models through a single self-hosted gateway.
Introduction
In this tutorial, you'll learn how to deploy WindsurfAPI on your own infrastructure and connect it to popular AI tools like Claude Code, Cline, and Cursor. By the end, you'll have a private AI model gateway serving 100+ models through standard API endpoints.
π Want to deploy WindsurfAPI yourself?
Docker configs, system requirements, and installation guides β all on one page.
View WindsurfAPI Tool Page βPrerequisites
- A Linux server (or any system with Docker installed)
- Docker and Docker Compose
- Windsurf or Devin Desktop installed (to provide the AI models)
- Basic familiarity with terminal commands
Step 1: Start Windsurf/Devin Desktop
Launch Windsurf or Devin Desktop on your machine. These applications provide the actual AI models that WindsurfAPI will proxy. WindsurfAPI doesn't bundle models β it bridges existing model endpoints from your Windsurf/Devin installation.
Ensure the desktop application is running and connected. The default configuration assumes it's accessible on localhost at port 11434 (or the port configured in your Windsurf settings).
Step 2: Deploy with Docker
The simplest way to run WindsurfAPI is with Docker:
docker run -d \
--name windsurfapi \
-p 8080:8080 \
-v ./data/windsurfapi:/data \
--restart unless-stopped \
gaozuogg/windsurfapi:latest
Or with Docker Compose:
version: '3'
services:
windsurfapi:
image: gaozuogg/windsurfapi:latest
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./data/windsurfapi:/data
Save this as docker-compose.yml and run docker compose up -d.
Step 3: Configure Your API Endpoint
Once running, WindsurfAPI exposes three API formats from a single service:
| Format | Endpoint | Use With |
|---|---|---|
| OpenAI-compatible | http://localhost:8080/v1 |
OpenAI SDK, Cursor, most tools |
| Anthropic-compatible | http://localhost:8080/anthropic |
Claude Code, Anthropic SDK |
| Gemini-compatible | http://localhost:8080/gemini |
Gemini SDK, Google AI Studio |
Step 4: Connect Claude Code
To use WindsurfAPI with Claude Code, set the Anthropic-compatible base URL:
export ANTHROPIC_BASE_URL="http://localhost:8080/anthropic"
claude code
Claude Code will now route through your WindsurfAPI gateway, giving you access to models from Windsurf while maintaining Claude Code's workflow.
Step 5: Test Your Setup
Verify everything is working with a simple API call:
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-opus",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Troubleshooting
- Connection refused: Ensure Windsurf/Devin Desktop is running
- Model not found: Check the model name β WindsurfAPI uses the model names from your Windsurf installation
- Docker port conflict: Change the host port (
8080) in the Docker run command
π Ready to deploy WindsurfAPI?
Get the full configuration guide, system requirements, and Docker setup.
View WindsurfAPI Tool Page β