Skip to main content
You need an LLM Gateway key.

Setup

Add the gateway to ~/.claude/settings.json:
~/.claude/settings.json
Leave /v1 off the base URL. Claude Code adds it.
Keep the key in ~/.claude/settings.json, not in a project’s .claude/settings.json. Project settings are often committed to git.

Choose models

Set any of these in the same env block, to a model or alias: To also list the gateway’s Claude models in /model, add "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1". Claude Code lists only names that contain claude or anthropic, so set aliases with the variables above.

Check it works

Start claude and send a prompt. In LLM Gateway → Keys, the key’s Last Used updates.