Windsurf Proxy Integration Tutorial: Cascade Agent Custom Endpoint Configuration
Codeium Windsurf AI IDE integration tutorial: Configure custom model endpoints and API keys in settings to access Claude / GPT / Gemini multi-model capabilities.
I. What is Windsurf
Windsurf is an AI-first IDE with a built-in Cascade agent that supports custom model endpoints. By pointing it to our gateway, you can call Claude, GPT, or Gemini using a unified API key.
II. Preparation
- Log in to the API console, and create an
sk-xxxxxxAPI Key (this will only be displayed once, please save it). - Identify the model slug you wish to use (e.g.,
claude-sonnet-5,gpt-5.5,gemini-3.7-flash). - Verify the gateway address:
https://www.relay-api.com.
III. Configuring Windsurf
Go to Settings → Models / API Providers → Add Provider, select the provider type, and enter the following:
Base URL : https://www.relay-api.com # Claude / Anthropic
API Key : sk-your-key
Model : claude-sonnet-5
(For GPT models, change the Base URL to https://www.relay-api.com/v1)
(For Gemini models, change the Base URL to https://www.relay-api.com/v1beta)
Once saved, select the model in Cascade and use Ctrl+L (macOS Cmd+L) to start a conversation.
IV. API Endpoint Reference
| Model Group | Base URL | Protocol |
|---|---|---|
| Claude / Anthropic | https://www.relay-api.com | Anthropic Messages |
| GPT / OpenAI | https://www.relay-api.com/v1 | OpenAI Chat Completions |
| Gemini | https://www.relay-api.com/v1beta | Google generateContent |
Use the URLs listed in the table above for your Base URL.
V. Troubleshooting
| Issue | Resolution |
|---|---|
| 401 / 403 | Invalid key, key not enabled, or insufficient balance; verify the sk- key and add credit. |
| 404 / Model unavailable | Model name mismatch with platform slug or model disabled; check your model ID. |
Security Recommendation: Do not hardcode API keys into public repositories; create separate keys for different purposes to facilitate tracking and quota management.
Base URL Note: Our service accepts both /v1beta/models/... and /v1beta/v1beta/models/... (as well as /v1/... and /v1/v1/...), so whether your client automatically appends /v1 or /v1beta will not affect the request. You can use either the root domain or the full path with /v1beta in the Base URL. Please find and copy the correct Model ID from the "Model ID" section in the top right corner of the "Tokens" page in your console.
