Migrating a project from the official API to a gateway
Moving to a compatible gateway is two lines of configuration and an hour of verification. Here is exactly what changes.
2 min · 11 September 2026 · migration · setup · development
A compatible gateway speaks the same protocol as the official API, so migration usually needs no code changes. What changes is configuration, not logic.
What changes
Exactly two things: the URL and the key.
- ANTHROPIC_BASE_URL=https://api.anthropic.com
- ANTHROPIC_API_KEY=sk-ant-...
+ ANTHROPIC_BASE_URL=https://api.zukko.pro
+ ANTHROPIC_AUTH_TOKEN=fetch_...For the OpenAI SDK it is the same, with a /v1 suffix on the URL:
- OPENAI_BASE_URL=https://api.openai.com/v1
+ OPENAI_BASE_URL=https://api.zukko.pro/v1
- OPENAI_API_KEY=sk-...
+ OPENAI_API_KEY=fetch_...What stays
The SDK itself stays, at the same version. Request structure, tool use, streaming, error handling — all unchanged. The code that calls the model needs no edits.
What you must check
Model names. This is the main source of surprises. A gateway's identifiers may differ from the official ones. Read the catalogue before you move:
curl -s https://api.zukko.pro/v1/modelsIf your code hardcodes a name that is not in the catalogue, the first call returns a 404.
The ANTHROPIC_API_KEY variable. Remove it entirely rather than blanking it. Otherwise Anthropic clients assume a direct connection and some will ask you to sign in.
The URL suffix. Anthropic-compatible clients want no /v1; OpenAI-compatible ones require it. Getting it wrong yields a 404 whose wording does not reveal the cause.
The migration order
Start with one non-critical environment — local or staging. Run a full, realistic task there rather than a single test request: a short prompt will not surface problems with long context, tools, or streaming.
Compare the result against what the official API produced for the same task. Not merely "an answer arrived", but quality and shape: if your code parses the response structurally, the structure has to match.
Check the usage history — events should appear. If none do while answers keep arriving, some traffic still bypasses the gateway and you are paying twice.
Only then switch production. Rolling back costs exactly what the migration cost: restoring two lines of configuration.
What to expect financially
Savings come from the rate difference, not from volume — you will spend the same number of tokens. Estimate against your real load: take a month of token usage from your history and multiply by the new rate. That is more reliable than any percentage promised in marketing.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.