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

  1. Settings → Models → in the OpenAI API Key section enable Override OpenAI Base URL
  2. Base URL: https://api.zaimod.com/v1, paste your key
  3. Verify, then add model names manually (e.g. claude-sonnet-5, gpt-5.6-terra)
  4. Switch models in Chat/Composer as needed

Cursor's Tab completion runs on their own model and is unaffected.

Cline (VS Code)

  1. Open Cline → settings gear
  2. API Provider: OpenAI Compatible
  3. Base URL https://api.zaimod.com/v1, your key, Model ID claude-sonnet-5
  4. 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:

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

  1. Settings → Model Provider → Add provider
  2. API address: https://api.zaimod.com/v1
  3. Paste the key, add models manually (e.g. gemini-3.1-flash-lite-preview, deepseek-v4-flash)
  4. 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

  1. Missing or extra /v1: OpenAI-compatible paths need /v1; Anthropic-native doesn't
  2. Model name typos: copy from the model list, don't type from memory
  3. Key limits: confirm the key isn't disabled or quota-capped in the console
  4. 401: wrong key, or a leading space
  5. 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 on claude-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 →

Further reading

#cursor custom api#cline base url#cherry studio setup#continue openai compatible
Get a free API key

Related reading