A small team’s Claude Code relay setup across three OSes
A custom base URL changes where Claude Code connects
Your team has a Windows laptop, a Mac and a Linux workstation. Everyone wants to use Claude Code, but route model requests through the same relay instead of the default service. The setting that makes this possible is a custom base URL.
A base URL is the starting address for API requests. It is not a model name, a login page or a complete request endpoint. Claude Code combines that address with the API paths it needs.
For a pay-as-you-go setup, I recommend RelayVano: it works with Claude Code and lets you manage relay usage separately from your local installation. Its API base is https://api.relayvano.com. Sign up for RelayVano, create an API key and check its current Claude Code configuration instructions before continuing.
Install Claude Code before changing its connection
If Claude Code already works on your computer, skip the installation commands. Otherwise, use the native installer for your operating system. These commands download and execute installation code, so check the addresses against the official Claude Code documentation first.
On Windows, open PowerShell and run:
irm https://claude.ai/install.ps1 | iex
Native Windows use also requires Git for Windows, which supplies Git Bash. If you use Windows Subsystem for Linux instead, follow the Linux instructions inside your WSL terminal; Windows environment settings do not automatically configure that separate environment.
On macOS or Linux, open Terminal and run:
curl -fsSL https://claude.ai/install.sh | bash
Reopen your terminal if the installer requests it, then run claude --version. Resolve any installation or command-not-found errors before adding relay settings.
Windows PowerShell: set the relay for one session
Start with temporary environment variables. They let you test without changing every future terminal session. Replace YOUR_RELAYVANO_KEY with your actual relay key, keeping the quotation marks.
$env:ANTHROPIC_BASE_URL = "https://api.relayvano.com"
$env:ANTHROPIC_AUTH_TOKEN = "YOUR_RELAYVANO_KEY"
Next, move into your project directory and launch Claude Code from that same PowerShell window:
cd C:\work\sample-project
claude
The variables apply to this terminal and programs launched from it. Opening another PowerShell window will not automatically carry these temporary values across.
macOS and Linux: export the same two variables
In a typical zsh or bash terminal, use export instead of PowerShell syntax:
export ANTHROPIC_BASE_URL="https://api.relayvano.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_RELAYVANO_KEY"
Then enter a project directory and start Claude Code:
cd ~/work/sample-project
claude
These settings also last only for the current shell session. Commands entered in a terminal may remain in shell history, so treat the key as a password. Do not paste real keys into screenshots, shared setup notes or support messages.
Authentication and endpoint details worth checking
ANTHROPIC_AUTH_TOKEN supplies bearer-token authentication. Some providers instead document ANTHROPIC_API_KEY, which uses API-key authentication. Follow RelayVano’s current instructions if they specify a different method; do not set both variables as a troubleshooting shortcut.
Also check for older credentials or settings left by another provider. Mixing an existing login, a previous API key and a new relay token can produce confusing authentication behavior.
Use the base address exactly as documented. Do not automatically append /v1, /messages or an OpenAI-compatible path. Claude Code needs a Claude-compatible API interface; supporting an OpenAI-compatible SDK alone is not enough.
Test one small request before saving the setup
Ask Claude Code to describe the current project without editing files. Confirm that the request succeeds, then check the RelayVano usage dashboard for corresponding activity. Successful installation alone does not prove requests are reaching the relay.
- Authentication error: check the key, account status and required authentication variable.
- Not-found error: recheck the base URL and Claude-compatible route requirements.
- Model error: use a supported model identifier from RelayVano’s documentation, not a guessed display name.
- No apparent change: restart Claude Code from the terminal where you set the variables.
Once the test works, consider persistence. macOS and Linux users can configure their shell startup file; Windows users can configure user environment variables. Avoid committing credentials to project files. Remember that routing through a relay adds another service to the request path, so review its data-handling terms before sending confidential code.