The fastest path is one copied command from AI models & keys. This page is the manual setup, which Set up manually in the same card shows with your address, a new key and a Model filled in. If your company installed xpander-connect, your coding clients are already set up.
Gateway address
Your exact address is under Gateway address in AI models & keys. Examples below use
https://llm-gw.xpander.ai.
Claude Code
Your xpander key signs Claude Code in, with no/login. Add to ~/.claude/settings.json (%USERPROFILE%\.claude\settings.json on Windows):
/v1, and no model is set. CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY adds the Claude models the gateway offers you to /model. Claude Code lists only model IDs that contain claude or anthropic (Model discovery). To use a model from another vendor, start Claude Code with its ID: claude --model <model ID> (Which model ID to use). To try it in one terminal:
claude -p "reply with exactly: OK". In Claude Code, /status shows the gateway address.
Codex
Codex reads your key fromXPANDER_GATEWAY_KEY. Add to ~/.codex/config.toml (%USERPROFILE%\.codex\config.toml on Windows), with a model from AI models & keys:
codex. Switch models with /model.
Check it: codex exec --skip-git-repo-check "reply with exactly: OK" answers OK.
OpenCode
OpenCode reads your key fromXPANDER_GATEWAY_KEY. Add a provider to ~/.config/opencode/opencode.json (%USERPROFILE%\.config\opencode\opencode.json on Windows):
models and pick one as xpander/<name>. Keep XPANDER_GATEWAY_KEY as for Codex, then start opencode.
Check it: opencode run "reply with exactly: OK" answers OK.
Your own code (SDKs)
Both SDKs take your xpander key as their API key. The Anthropic base URL has no/v1. The OpenAI one has /v1.
A call in one format can be served by a provider that speaks another, so Codex can run an enabled Claude model.
Sending your key next to another sign-in
The gateway reads your key fromAuthorization: Bearer, x-api-key or x-xpander-api-key. When Authorization already carries another sign-in, such as your own Claude plan, use x-xpander-api-key:
Check the connection
401 means the key is unknown, revoked or expired. Your newest call shows at the top of Logs (admins) and in your Usage.
Next steps
Fix a refused call
Messages and fixes.
Create and manage your keys
AI models and keys.

