Windsurf + OpenCompress

Windsurf by Cognition supports custom OpenAI-compatible endpoints.One line change for automatic prompt compression — 40-60% cheaper.

1
Open Model Provider Settings

In Windsurf, go to Settings and find the Model Providers or AI configuration section. Add a new provider and select "OpenAI Compatible".

Note: Windsurf (by Cognition, formerly Codeium) supports custom OpenAI-compatible endpoints for all chat and Cascade interactions.

2
Configure OpenCompress Endpoint

Set the base URL and enter your API key. Any provider key works — OpenAI (sk-proj-...), Anthropic (sk-ant-...), Google (AIza...), or OpenRouter (sk-or-...).

https://www.opencompress.ai/api/v1

Note: Windsurf's Anthropic BYOK field does not support custom base URLs — use the OpenAI Compatible provider instead. We auto-translate Anthropic API formats.

3
Done — Start Coding

Select the model and start using Cascade or chat. All requests are compressed automatically. Same models, same experience, 40-60% lower token cost. Free tier: 5 req/min.

Note: Check response headers for X-OpenCompress-Tokens-Saved to see compression in action.

4
Verify (Optional)

Test from the terminal to confirm compression is working:

curl https://www.opencompress.ai/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
5
Upgrade for Dashboard + Higher Limits

Free tier has no stats and 5 req/min. Sign up for a usage dashboard, 120 req/min, and $10 free credit.

Go to Dashboard

FAQ

Common questions about Windsurf + OpenCompress.

Why not use the Anthropic API Key field?

Windsurf's built-in Anthropic BYOK does not support custom base URLs — it always sends requests to api.anthropic.com. Use the OpenAI Compatible provider instead. We auto-translate between OpenAI and Anthropic API formats.

Does this work with Cascade?

Yes. All Windsurf AI features (Cascade, chat, inline edits) use the configured model provider. Compression applies to all interactions.

Do you store my API key?

No. Your key is forwarded directly to the upstream provider in memory and never persisted.

Can I use multiple providers?

Windsurf allows one custom endpoint at a time. To access GPT, Claude, Gemini, and more from a single key, use an OpenRouter key (openrouter.ai) — it supports all major models through one API.

Start Saving

Every Windsurf request gets cheaper. One configuration change, zero code modifications.