Claude Code on your own keys, in one command
relay starts Claude Code on Autonomous Relay Agents: browser sign-in, your own provider keys, your guardrails and budgets, every request tagged in Activity.
relay starts Claude Code pointed at Autonomous Relay Agents. Requests run on your own provider key, under your organisation’s guardrails, allowlists and budgets, and each one appears in Activity tagged with the agent that made it.
How it is used
relay claude # sign in on first use, then start Claude Code relay claude --model anthropic/claude-sonnet-5 -p "explain this repo" relay status # the stored key's label, limit and expiry relay logout # forget the stored key
What it does
Signs you in through your browser
The first run opens autonomousrelay.com/auth: there is no key to copy or paste. Approving issues an inference key with a $10 spend limit and a 7-day expiry, which you can revoke under API keys. relay keeps it in a file only you can read, ~/.config/autonomousrelay/credentials.json (%APPDATA% on Windows), and signs you in again once it expires.
Starts Claude Code with everything set
It sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, and sends X-Autonomous-Relay-Agent: claude-code with every request. If ANTHROPIC_API_KEY is set, it is removed for the launch, so your own Anthropic key is never sent to the gateway.
Passes everything else through
--model is relay’s own and picks any model in the catalogue; every other argument goes to Claude Code unchanged. RELAY_BASE_URL points relay at another gateway, such as a self-hosted one, and a key is only ever sent to the gateway that issued it.
Agents
Claude Code, as relay claude. More agents are added one at a time, each once it has been run end to end.
Not on npm yet
relay is built and tested, and is being prepared for npm. When it is published, the command that installs it will be here.
What you need
- Claude Code installed: npm install -g @anthropic-ai/claude-code.
- Your Anthropic key added under BYOK in the dashboard. Requests run on it, at Anthropic’s price.
- Node.js 20 or later.