Downsizing logodownsizing
Documentation

Using Downsizing with LibreChat

Route LibreChat's model calls through Downsizing by adding a custom endpoint to librechat.yaml.


Prerequisites

A LibreChat deployment you can edit the configuration of (Docker Compose or source install) and a Downsizing account that can make requests (pay-per-use or a connected subscription both work). Grab your Inference ID and API key from the Inference API page.

LibreChat is a self-hosted server (typically run via Docker Compose alongside MongoDB and Meilisearch), not a local desktop app — so unlike CLI tools, the dsCLI can't reach into its config from your machine. Wiring it up is a one-time edit to a YAML file that lives with your LibreChat deployment.

Manual Setup

LibreChat lets you declare custom model endpoints in a librechat.yaml file at the root of your LibreChat project (create it if it doesn't exist — LibreChat ships a librechat.example.yaml you can copy). Add a custom endpoint with provider: 'anthropic' so LibreChat speaks the native Anthropic Messages API to Downsizing:

yaml
version: 1.2.8
cache: true
endpoints:
  custom:
    - name: 'Downsizing'
      provider: 'anthropic'
      apiKey: '${DOWNSIZING_API_KEY}'
      baseURL: 'http://localhost:3001/YOUR_INFERENCE_ID/anthropic'
      models:
        default: ['claude-opus-4-8']
        fetch: false
      titleConvo: true
      titleModel: 'claude-opus-4-8'
      modelDisplayLabel: 'Downsizing'

Replace YOUR_INFERENCE_ID with your workspace UUID from the dashboard. Then add the referenced API key to the .env file LibreChat loads (same directory as docker-compose.yml):

bash
DOWNSIZING_API_KEY=dws_your_api_key_here

If you're running via Docker Compose and librechat.yamlisn't already mounted into the container, add a bind mount in docker-compose.override.yml:

yaml
services:
  api:
    volumes:
      - type: bind
        source: ./librechat.yaml
        target: /app/librechat.yaml

Restart LibreChat (docker compose restart or docker compose up -d) — like most of its configuration, librechat.yaml is only read on startup.

Verify

Open LibreChat, select Downsizing from the endpoint/model picker, and send a test message. If you get a response, the endpoint is wired up correctly. Then check your savings dashboard to see the request appear in your usage metrics.


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