Using Downsizing with Claude Code
Route Claude Code traffic through Downsizing in seconds using the CLI.
Prerequisites
Before linking Claude Code, either attach a credit card or connect your Anthropic subscription so Downsizing. We also recommend to use CLI, check the CLI guide to install.
Link Claude Code (Recommended)
With your Anthropic subscription connected, link Claude Code to route traffic through Downsizing:
ds link claudeThe CLI prompts you to choose a scope — global (all projects) or local (current folder only). You can skip the prompt by passing the scope directly:
ds link claude globalds link claude localThe CLI writes the correct ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN to the appropriate settings file.
Manual Setup
If you prefer to configure manually, edit ~/.claude/settings.json (global) or .claude/settings.local.json in your project directory (local) and add:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.downsizing.dev/YOUR_INFERENCE_ID/anthropic",
"ANTHROPIC_AUTH_TOKEN": "dws_YOUR_API_KEY"
}
}Find your Inference ID and API key in the Downsizing dashboard. The local file takes precedence over the global one — Claude Code picks up settings.local.json from the working directory.
Verify
Run a quick one-shot query to confirm traffic is routing through Downsizing:
claude -p "hello"If Claude Code responds, the proxy is correctly configured. You can also check your savings dashboard to see the request appear in your usage metrics.
Unlinking
To remove Downsizing from Claude Code and restore your original settings:
ds unlink claude