Downsizing logodownsizing
Documentation

Using Downsizing with OpenClaw

Route OpenClaw traffic through Downsizing using the CLI or manual configuration.


CLI Setup (Recommended)

The easiest way to connect OpenClaw is with the Downsizing CLI. If you haven't installed it yet, grab it from the CLI guide.

Sign in, then link OpenClaw:

bash
ds link openclaw

The CLI writes the correct provider configuration to ~/.openclaw/openclaw.json and automatically sets Downsizing as the default model.

Manual Setup

If you prefer to configure manually, edit or create ~/.openclaw/openclaw.json and add the Downsizing provider:

json
{
  "models": {
    "providers": {
      "downsizing": {
        "baseUrl": "https://api.downsizing.dev/YOUR_INFERENCE_ID/anthropic",
        "api": "anthropic-messages",
        "auth": "api-key",
        "apiKey": "dws_YOUR_API_KEY",
        "models": [
          {
            "id": "downsizing",
            "name": "Downsizing",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 1000000,
            "maxTokens": 64000
          }
        ]
      }
    }
  }
}

Find your Workspace ID and API key in the Inference API page. Replace YOUR_WORKSPACE_ID with the workspace UUID and dws_YOUR_API_KEY with your Downsizing API key.

Then manually set Downsizing as the default model:

bash
openclaw models set downsizing/downsizing

How it works

OpenClaw sends all Claude API requests through Downsizing using your Downsizing API key for authentication. Downsizing validates the request, applies routing and reduction per your workspace settings, then forwards the call to Anthropic using your stored Claude API key. Responses stream back to OpenClaw unchanged.

Verify

Run a quick local agent test to confirm Downsizing is working:

bash
openclaw agent --local --agent main --session-id ds-test --message "Reply with one word: pong"

If OpenClaw 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 OpenClaw:

bash
ds unlink openclaw

This removes the Downsizing provider from ~/.openclaw/openclaw.jsonand clears the default model selection if it still points at Downsizing. Any other providers you've configured are left untouched.


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