The pattern is the same: the client needs an OpenAI-compatible endpoint — Base URL, key and model name. After that it works as if you were calling the official API, no VPN.
| Field | Value |
|---|---|
| Base URL | https://api.cheapai.io/v1 |
| API key | cai-... (from API keys) |
| Model | gpt-4o · claude-3-5-sonnet · gemini-1-5-pro · … (see the catalog) |
Sometimes the field is called "Base URL", elsewhere "API Host", "Endpoint" or OPENAI_API_BASE — what matters is that it ends with /v1. If the client appends /v1 on its own — set https://api.cheapai.io without it.
cai-... key and enable Override Base URL — enter https://api.cheapai.io/v1.gpt-4o, claude-3-5-sonnet, etc.) and click Verify.Chat and inline edits work via a custom key. Some "smart" Cursor features depend on its own backend and don't use a custom endpoint — that's a Cursor thing, not the gateway.
These VS Code extensions share the same setup. In the extension settings:
OpenAI Compatiblehttps://api.cheapai.io/v1cai-...claude-3-5-sonnet (or another model from the catalog)For agentic flows pick models with a large context — see the "context" column in the catalog.
In your Continue config (~/.continue/config.yaml or config.json) add a model with provider openai and our apiBase:
~/.continue/config.yaml
models:
- name: Sonnet via cheapai
provider: openai
model: claude-3-5-sonnet
apiBase: https://api.cheapai.io/v1
apiKey: cai-...Aider goes through litellm, so the model name has an openai/ prefix. Via flags:
terminal
aider --openai-api-base https://api.cheapai.io/v1 \
--openai-api-key cai-... \
--model openai/gpt-4oOr via env vars (then just aider --model openai/gpt-4o is enough):
terminal
export OPENAI_API_BASE="https://api.cheapai.io/v1"
export OPENAI_API_KEY="cai-..."Any library wrapping the OpenAI client accepts a custom base_url. LangChain (Python):
python
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://api.cheapai.io/v1",
api_key="cai-...",
model="gpt-4o",
)
print(llm.invoke("Hello!").content)Same for other wrappers: LlamaIndex — OpenAI(api_base="https://api.cheapai.io/v1", api_key="cai-..."); Vercel AI SDK — createOpenAI().
In the providers settings, add a provider of type OpenAI: API Host — https://api.cheapai.io, API Key — cai-..., then add the models you need by their names from the catalog. The same approach works in any client with a "custom OpenAI endpoint" option.
If a tool can talk to an OpenAI- or Anthropic-compatible API at a custom URL — it will work via cheapai.io. Use https://api.cheapai.io/v1 (or https://api.cheapai.io for Anthropic mode), a cai-... key and a model name from the catalog. Endpoint specifics are on the OpenAI-compatible API page.
Next: OpenAI-compatible API · Error codes · Developer FAQ.