Every one of these accepts a custom endpoint. Almost none document it properly, and most have one quirk that makes a correct-looking config fail with no error at all. Those are called out below.
/v1. The Anthropic SDK appends /v1/messages itself,
so adding /v1 gives you /v1/v1/messages and a 404. Every OpenAI-compatible client is the other
way round and requires it. Configure several tools in one sitting and this is the one that will bite you.Environment variables, or .claude/settings.json for a single project.
# note: no /v1 on the base URL export ANTHROPIC_BASE_URL="https://cheapai.io" export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
Pin model aliases with ANTHROPIC_DEFAULT_OPUS_MODEL and friends so
a newly released version does not resolve to something the gateway has not added yet.
Full guide →
~/.codex/config.toml — user level only, project-local files are ignored.
model = "gpt-5.6-sol" model_provider = "cheapai" [model_providers.cheapai] name = "CheapAI" base_url = "https://cheapai.io/v1" env_key = "CHEAPAI_API_KEY" wire_api = "responses" requires_openai_auth = true
{
"auth_mode": "apikey",
"OPENAI_API_KEY": "YOUR_API_KEY"
}
wire_api must be "responses"; the chat
mode was removed in early 2026. The provider id cannot be openai, ollama or lmstudio — reserved.
Full guide →
On Pro, the Anthropic override is the most reliable path — it travels the native format and avoids the flat tool-definition problem that some endpoints reject on GPT models.
Settings → Models → Anthropic API Key Override Anthropic Base URL: https://cheapai.io/v1 API key: YOUR_API_KEY
Note the /v1 here — Cursor's Anthropic field wants it, unlike Claude Code.
Full guide →
settings.json — but the key does not go there.
{
"language_models": {
"openai_compatible": {
"cheapai": {
"api_url": "https://cheapai.io/v1",
"available_models": [
{ "name": "claude-opus-4-8", "max_tokens": 200000 }
]
}
}
}
}
settings.json. The environment variable name is derived from the provider id you chose —
cheapai becomes CHEAPAI_API_KEY. Rename the provider and the variable changes with it.config.yaml — and it moved from JSON, so most guides you will find are stale.
models:
- name: Opus 4.8
provider: openai # always "openai" — there is no "custom"
model: claude-opus-4-8
apiBase: https://cheapai.io/v1
apiKey: YOUR_API_KEY
roles: [chat, edit, apply]
- name: Haiku 4.5
provider: openai
model: claude-haiku-4-5-20251001
apiBase: https://cheapai.io/v1
apiKey: YOUR_API_KEY
roles: [autocomplete]
Autocomplete fires on nearly every keystroke — running it on a flagship model is the easiest way to burn credit without noticing. Full guide →
Same OpenAI-compatible provider, different settings panels.
Provider "OpenAI Compatible", base URL with /v1, model id typed by hand. Attached images are not
forwarded to custom providers — the model answers from your text and never says so.
A Cline fork, configured identically, and it inherits the same image limitation.
opencode.json with "npm": "@ai-sdk/openai-compatible". Without that line the provider
block is accepted but never initialises.
provider: custom here — the naming across these tools is not consistent, so check each one.
All nine guides with the full trap list: ai-coding-tools-setup · documentation on the site
Pay in rubles, USDT or by card. No VPN, no subscription, from $5.
Get an API key