Use Relixr with Claude Code
Swap ANTHROPIC_BASE_URL to run Claude Code through Relixr, with a spend cap on every agent session.
Claude Code runs unattended for long stretches โ exactly the workload where a subscription's soft rate limit turns into a stalled session, and an uncapped API key turns into a bill you didn't expect. Relixr gives Claude Code a spend cap instead of either.
1. Create a scoped key
Create an inference key named claude-code, with a daily cap. Because Claude Code can spend continuously during a long agentic session, set the cap to what you're willing to lose to a bug in your own prompt loop, not just your average day.
2. Set the base URL
Claude Code reads its endpoint from an environment variable:
Add both export lines to your shell profile if you want every terminal to default to Relixr. Unset ANTHROPIC_BASE_URL for a session to fall back to Anthropic directly.
3. Confirm requests are attributed
Every request from this key shows up in Usage tagged with the key name (claude-code), so if you run Claude Code across multiple projects, create one key per project instead of reusing this one โ attribution is per-key, not per-process.
If a session needs to spend more than the cap allows, Relixr returns a typed 402 rather than silently failing โ Claude Code will surface this as an API error, which is the intended stop, not a bug.