Downsizing logodownsizing
Documentation

Using Downsizing with Claude Code

Route Claude Code traffic through Downsizing in seconds using the CLI.


Prerequisites

Install the Downsizing CLI — see the CLI guide if you haven't already.

Link Claude Code (Recommended)

Link Claude Code to 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 on the Inference API page. 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, Downsizing is set up correctly. 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

Spot an error or something not working? Tell us on Discord or email docs@downsizing.dev.