Windsurf Proxy Integration Tutorial: Cascade Agent Custom Endpoint Configuration

  • 发布时间
  • 语言en

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

  1. Log in to the API console, and create an sk-xxxxxx API Key (this will only be displayed once, please save it).
  2. Identify the model slug you wish to use (e.g., claude-sonnet-5, gpt-5.5, gemini-3.7-flash).
  3. 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 GroupBase URLProtocol
Claude / Anthropichttps://www.relay-api.comAnthropic Messages
GPT / OpenAIhttps://www.relay-api.com/v1OpenAI Chat Completions
Geminihttps://www.relay-api.com/v1betaGoogle generateContent

Use the URLs listed in the table above for your Base URL.

V. Troubleshooting

IssueResolution
401 / 403Invalid key, key not enabled, or insufficient balance; verify the sk- key and add credit.
404 / Model unavailableModel 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.