Use Relixr with Claude Code
Subscription or rate limit stalled Claude Code mid-task? Point ANTHROPIC_BASE_URL at Relixr, top up any amount, and keep a hard spend cap.
Claude Code runs unattended for long stretches — exactly when a soft subscription limit stalls the session, or an uncapped API key becomes a surprise bill. Relixr is the OpenAI/Anthropic-compatible endpoint with a hard spend cap.
Use official env vars only (ANTHROPIC_BASE_URL / ANTHROPIC_API_KEY). Keep Claude Code for the agent loop; Relixr handles models, prepaid cost, and the kill switch.
Fastest path: Connect setup pack
- Open Connect → Claude Code and mint a key.
- Download
relixr-claude-code.env(or copy the exports from the pack). - Source the file / add exports to your shell profile.
- Run
claude, then confirm the turn under Logs.
Or:
$ npx relixr login npx relixr connect claude-code claude
Manual exports (fallback)
- Top up any amount under Credits.
- Create a key named
claude-codefrom Connect with a daily cap sized for a worst-case runaway loop. - Export:
$ export ANTHROPIC_BASE_URL="https://api.relixr.com" export ANTHROPIC_API_KEY="$RELIXR_API_KEY" claude
- Confirm the turn appears under Logs with cost attribution on that key.
Hitting the cap returns a typed 402 — Claude Code surfaces an API error. That stop is intentional.
Add both exports to your shell profile for every terminal. Unset ANTHROPIC_BASE_URL for a session to talk to Anthropic directly again. Short aliases like sonnet resolve to Relixr model ids on the gateway.
Still stuck? Help center · Doctor