Using Downsizing with Open WebUI
Route Open WebUI's model calls through Downsizing by adding it as an OpenAI API connection, either from the Admin Settings UI or via environment variables at container startup.
Prerequisites
A running Open WebUI instance (self-hosted via Docker/Docker Compose, typically alongside Ollama) 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.
Open WebUI is a self-hosted server — like LibreChat, it usually runs in its own container, separate from wherever you use the dsCLI. There's no local file on your machine for dsto write to, so wiring it up is a one-time connection you add either in the Admin Settings UI (stored in Open WebUI's own database) or via environment variables on the container.
Option A: Admin Settings UI
This stores the connection in Open WebUI's own database, so it survives container restarts without touching your deployment's environment.
- Sign in to Open WebUI as an admin and go to ⚙️ Admin Settings → Connections.
- Under OpenAI, click ➕ Add Connection.
- Set the URL field to your Downsizing OpenAI-compatible endpoint, and the Key field to your Downsizing API key (starts with
dws_):
http://localhost:3001/YOUR_INFERENCE_ID/openaiReplace YOUR_INFERENCE_IDwith your workspace UUID from the dashboard. If Downsizing doesn't auto-populate the model list via /models, add the model IDs you want to the Model IDs allowlist field, then click Save.
Option B: Environment variables
If you'd rather configure this at deploy time (so it's reproducible across restarts and redeploys), set Open WebUI's OPENAI_API_BASE_URL and OPENAI_API_KEY environment variables when starting the container:
OPENAI_API_BASE_URL=http://localhost:3001/YOUR_INFERENCE_ID/openai
OPENAI_API_KEY=dws_your_api_key_hereOr, in docker-compose.yml:
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
environment:
- OPENAI_API_BASE_URL=http://localhost:3001/YOUR_INFERENCE_ID/openai
- OPENAI_API_KEY=dws_your_api_key_here
- ENABLE_OLLAMA_API=falseRestart the container (docker compose up -d) for the variables to take effect. Note that environment-variable connections and Admin Settings connections are independent — if you configure both, you'll see two OpenAI connections in the UI.
Verify
Start a new chat in Open WebUI, pick one of the Downsizing-routed models from the model picker, and send a test message. If you get a response, the connection 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.