OpenWebUI · Self-hosted chat UI

OpenWebUI + Leanroute

OpenWebUI was built around OpenAI's wire format from day one. Adding Leanroute is the same pattern as adding any other OpenAI-compatible endpoint — one URL + one key in the Connections panel, then every model we publish shows up in the model picker.

1. Get a gateway key

From /dashboard/keys create a key labeled "openwebui". If multiple people share the OpenWebUI install, consider one key per person so request logs map back to who ran what.

2. Add a connection

Open your OpenWebUI instance as an admin. Click your avatar → Admin Panel Settings Connections. In the OpenAI API block, click the + button to add a new endpoint:

  • API Base URL: https://api.leanroute.dev/v1
  • API Key: the gw_live_* value from step 1.
  • Click the small refresh icon to the right of the row. OpenWebUI fetches /v1/models from us and populates the available list.
  • Click Save.

3. Pick a model in chat

Go back to the main chat view. The model dropdown above the input now lists every model we published — OpenAI's, Anthropic's, Google's, DeepSeek, plus the APAC providers (Qwen, GLM, Doubao, Kimi) and the India providers (Sarvam, Krutrim). Pick one and start chatting.

Cost controls

OpenWebUI has no built-in cost UI — that's where /dashboard/billing comes in. The request log shows every chat that touched the gateway with model, tokens, and cost. If you're sharing the OpenWebUI install with a team, configure a daily spend cap per API key at /dashboard/keys so no single user can run away with the bill overnight.

Troubleshooting

  • No models appear in the dropdown: the model list fetch failed. Click the refresh icon in Connections again; check the OpenWebUI server logs for the actual HTTP response. A 401 means the key is wrong; a 5xx means the gateway is sick (check status.leanroute.dev).
  • Streaming is choppy: OpenWebUI sometimes buffers a beat. Make sure the connection is HTTP/2 capable (any modern reverse proxy in front of OpenWebUI handles this); plain HTTP/1.1 tends to chunk-buffer.
  • 402 insufficient_credit: top up at /dashboard/billing.