Cursor / Cline Custom API: Base URL Setup Guide
How to point Cursor, Cline, Roo Code, Continue, Cherry Studio and ChatBox at a custom OpenAI-compatible endpoint, with model-switching tips.
AI coding tools push their own subscriptions, but nearly all of them keep a "custom OpenAI-compatible endpoint" escape hatch. Paste the right Base URL and you can run any model per-token instead of paying a flat monthly fee. Here's the per-tool setup.
Two addresses to remember
- Base URL (OpenAI-compatible):
https://api.zaimod.com/v1 - API Key: create one in the console, starts with
sk-
Tools using the Anthropic-native protocol take https://api.zaimod.com (no /v1).
Cursor
- Settings → Models → in the OpenAI API Key section enable Override OpenAI Base URL
- Base URL:
https://api.zaimod.com/v1, paste your key - Verify, then add model names manually (e.g.
claude-sonnet-5,gpt-5.6-terra) - Switch models in Chat/Composer as needed
Cursor's Tab completion runs on their own model and is unaffected.
Cline (VS Code)
- Open Cline → settings gear
- API Provider: OpenAI Compatible
- Base URL
https://api.zaimod.com/v1, your key, Model IDclaude-sonnet-5 - For native Anthropic: Provider Anthropic, Base URL
https://api.zaimod.com
Cline contexts get long — claude-sonnet-5 or gemini-3-pro-preview (1M context friendly) hold up best.
Roo Code
Same shape as Cline. Roo's trick: assign different models per mode — a cheap model (gpt-4o-mini) for Ask, a premium one for Code. That alone cuts costs by half or more.
Continue
Edit ~/.continue/config.json:
{
"models": [
{
"title": "Claude via zaimod",
"provider": "openai",
"model": "claude-sonnet-5",
"apiBase": "https://api.zaimod.com/v1",
"apiKey": "sk-your-zaimod-key"
}
]
}Cherry Studio
- Settings → Model Provider → Add provider
- API address:
https://api.zaimod.com/v1 - Paste the key, add models manually (e.g.
gemini-3.1-flash-lite-preview,deepseek-v4-flash) - Enable streaming for the typewriter effect
ChatBox
Settings → Model → provider OpenAI compatible, API Domain https://api.zaimod.com, paste key, type the model name.
Troubleshooting checklist
- Missing or extra
/v1: OpenAI-compatible paths need/v1; Anthropic-native doesn't - Model name typos: copy from the model list, don't type from memory
- Key limits: confirm the key isn't disabled or quota-capped in the console
- 401: wrong key, or a leading space
- 429: rate limit — back off and retry; persistent 429s go to support
What it costs
Heavy coding use (300 interactions/day, 3K input + 800 output tokens average):
- All
claude-sonnet-5: about $4.8/day - Q&A on
gpt-4o-mini($0.16/$0.62) + coding onclaude-sonnet-5: about $1.5/day
Per-token with per-mode model assignments usually beats a $20/month subscription — and there's no quota to race for.
No key yet? Sign up and be configured in two minutes →