Set up Claude Code on your plan

The Claude Code option in AI models and keys, with Use my Claude Pro or Max plan first.
Available when your organization turns it on: an admin allows Bring your own subscription in the License model. Until then the gateway answers that your own Claude plan is not enabled.
/login in Claude Code and choose your Claude account.
To set it up by hand instead, follow these steps. Unlike a setup with only an xpander key, this option needs Claude Code signed in with your Claude plan first.
-
Sign in with your plan. Run
claude, type/login, and choose your Claude account (Pro or Max). -
Point Claude Code at the gateway, for every session. Add this to Claude Code’s settings file,
~/.claude/settings.jsonon macOS and Linux (inside WSL when you use it),%USERPROFILE%\.claude\settings.jsonon Windows. Replace<your key>with your xpander API key:Do not addANTHROPIC_AUTH_TOKENorANTHROPIC_API_KEY, and make sure your terminal does not set them: either one replaces your plan sign-in. The address is the same when your organization runs a Hybrid install. Your own plan is not available on an Air-Gapped install. To try it in one terminal only, set the same values there instead. The commands differ by system:With WSL, run the commands inside WSL, not in Windows. The bash formNAME=value claudedoes nothing in PowerShell or cmd, and Claude Code then goes straight to Anthropic. -
Use Claude model names. Calls on your plan go to Anthropic only. Keep Claude Code’s own model names, such as
claude-sonnet-4-6, rather than a model ID from another provider. -
Check that it works. Run
claude -p "reply with exactly: OK". In Claude Code,/statusmust show your Claude account andhttps://llm-gw.xpander.aias the base URL. If it shows an auth token or API key instead,ANTHROPIC_AUTH_TOKENorANTHROPIC_API_KEYis set somewhere and replaces your plan. An admin can also confirm it in Logs: your newest request shows the client Claude Code and the license model Bring your own subscription, with the cost covered by your plan and no credits used.
If something goes wrong
Any other message is explained on Errors and what to do.
When your plan hits its limit
Your plan’s own usage limits apply. When one is reached, AI models & keys shows until when, for example Your Claude plan’s usage limit is reached until Thu, Oct 8, 8:00 AM. Calls use company models until then. Until the plan resets:- By default your calls continue on company models until the plan resets: your organization’s key, or xpander’s on xpander cloud. Those calls count toward your budgets.
- To wait for your plan instead, set When my Claude plan hits its limit to Pause in AI models & keys. Calls are then refused with the reset time until the plan resets.
- When your organization pauses plan calls for everyone, the choice is locked: Your admin set calls to pause when a plan hits its limit.
Stop using your plan
RemoveANTHROPIC_CUSTOM_HEADERS from Claude Code’s settings and set it up with your xpander key instead (Connect your tools), or run /logout in Claude Code.
