ANTHROPIC_BASE_URL to point at Tokios and setting your Tokios API key, Claude Code routes every request down your private tunnel to the model running on your hardware.
Prerequisites
- A running Tokios Connector paired with your local model — see Connector Install
- A registered model deployment name — see Register a Model
- A Tokios API key — see API Keys
- Claude Code installed
Set up the environment
- Windows CMD
- macOS & Linux
claude-code-windows.cmd
Persist the configuration
To avoid exporting the variables in every new terminal session, add them to your shell profile or a.env file.
~/.bashrc or ~/.zshrc
Open your shell profile and append:
.env files (for example, via direnv or a shell plugin), create a .env in your project root:
.env
Verify the connection
Run a quick one-shot prompt to confirm that Claude Code is reaching your local model through Tokios:Claude Code sends the request in Anthropic messages format. Tokios translates it to whatever your local backend expects and streams the response back.