Every CLI needs the same three things
OpenAI-compatible CLIs
Most CLIs speak the OpenAI protocol. This includes opencode, aider, Codex and others./v1/chat/completions and receives OpenAI-format answers.
Anthropic-protocol CLIs (Claude Code)
Claude Code speaks the Anthropic protocol. Point it at the gateway the same way:/v1/messages. The model behind the gateway does not need to be made by Anthropic — the gateway translates.
Claude Code: subscription login vs gateway key
Claude Code can authenticate two ways, and the two are easy to confuse.
Both are legitimate. Which fits depends on your situation:
- If you already pay for a Claude subscription and only use Claude Code, connecting it to the gateway adds a metered hop for no benefit — use your subscription login directly.
- If you want all your AI tools behind one door, or you are giving someone access without sharing a subscription login, use a gateway key as shown above.
There is no single “right” answer baked into the gateway. The gateway supports both paths; the choice is about cost and convenience for you.
Model names
Give the full name of the model.Test your setup
Send one request to confirm the key and model work before debugging a tool’s config:Related
- Configure your agent — the full guide for any client, with Python examples
- Models, pools and fallbacks — what happens after your CLI sends the request