Downsizing logodownsizing
Downsizing logodownsizing
Documentation

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:

bash
ds link claude

The 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:

bash
ds link claude global
bash
ds link claude local

The 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:

json
{
  "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:

bash
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:

bash
ds unlink claude