This page shows how to add a custom OpenAI endpoint to Open WebUI, so its chat screen talks to an open model you deployed on BitsRun instead of a hosted chatbot. At the end you will pick your own model in Open WebUI's model menu and chat with it. It takes about 5 minutes once you have an endpoint.
Checked against the Open WebUI docs on 2026-11-14 (latest release v0.13.3).
What you get
| Chat UI | Open WebUI, on your laptop or server |
| Model | Any chat model you deployed on BitsRun, for example qwen3:8b |
| Connection type | Open WebUI's OpenAI API connection (BitsRun is OpenAI-compatible) |
| Cost when idle | Nothing. The endpoint sleeps and wakes on the next message |
| Privacy | Prompts and replies are never logged or stored by BitsRun (Privacy) |
Before you start
- A BitsRun chat endpoint. If you do not have one yet, follow Deploy your first model or Deploy an Ollama model to the cloud.
- Its base URL, from the Copy button on the endpoint card. It looks like
https://<endpoint-id>.endpoint.bitsrun.com/v1, where<endpoint-id>is your endpoint's id. - An API key that starts with
brk_. See API keys. Below,brk_your_keystands for your key. - Open WebUI running, with an admin account. Install steps are on the Open WebUI quick start.
How to add a custom OpenAI endpoint in Open WebUI
Open Open WebUI in your browser and sign in as an admin.
Go to Settings > Connections (the admin section) and find the Manage OpenAI API Connections list.
Select Add Connection.
In URL, paste your base URL, ending in
/v1:https://<endpoint-id>.endpoint.bitsrun.com/v1In API Key, paste
brk_your_key.If the form offers a button to verify the connection, select it to check the URL and key.
Optional: if your model does not show up, type your model name (for example
qwen3:8b) under Model IDs and select +. Normally Open WebUI reads it from/v1/models, which lists the one model your endpoint serves.Select Save.
Your model now appears in the model menu at the top of a new chat.
Set it up with environment variables instead
If you start Open WebUI with Docker, you can pass the connection as environment variables. This is the command from the Open WebUI quick start, with the two OpenAI variables added:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
-e WEBUI_SECRET_KEY=your-secret-key \
-e OPENAI_API_BASE_URL=https://<endpoint-id>.endpoint.bitsrun.com/v1 \
-e OPENAI_API_KEY=brk_your_key \
--name open-webui --restart always ghcr.io/open-webui/open-webui:mainTest the connection
- Start a new chat and pick your model from the model menu.
- Send a short message, such as
Say hello in five words. - You should see a reply. If the endpoint was asleep, the reply waits while the model wakes (see below).
You can also test the endpoint itself from a terminal, outside Open WebUI:
curl https://<endpoint-id>.endpoint.bitsrun.com/v1/chat/completions \
-H "Authorization: Bearer brk_your_key" \
-H "Content-Type: application/json" \
-d '{"model": "qwen3:8b", "messages": [{"role": "user", "content": "Say hello in five words."}]}'What happens on the first message after the endpoint sleeps
A sleeping endpoint wakes on the next request. That wait is a cold start, and it is never billed.
| Model kind | Warm GPU (ran recently) | New GPU machine |
|---|---|---|
| GGUF models on llama.cpp | A few seconds to about 40 seconds | About 2 to 3 minutes |
| Safetensors chat models on vLLM | About 40 seconds | About 3 to 4 minutes |
BitsRun holds the request open for up to 8 minutes and sends keep-alive comments on the stream, so the chat simply shows the reply when the model is ready. If your setup sets Open WebUI's AIOHTTP_CLIENT_TIMEOUT, keep it at 600 seconds or more so it covers the full 8-minute wait. A reverse proxy in front of Open WebUI needs a read timeout of at least 10 minutes too. Details are on Cold starts.
Does tool calling work in Open WebUI?
Yes, if the model supports it. BitsRun passes tools, tool_choice and parallel_tool_calls to the model. Check your model with bitsrun size <model> --json and look for "tools": true. See Tool calling.
If something goes wrong
| Message or symptom | What to do |
|---|---|
The connection check or a chat fails with 401 | The key is missing, mistyped or revoked. Paste it again or create a new one. |
404 when verifying or chatting | Check the URL ends in /v1 and uses your endpoint id. A key limited to another endpoint also gets 404. |
402 payment_required | Your balance is $0. Add credit in the dashboard. |
429 rate_limited | Your account has too many requests open at once. Wait and try again. |
Reply shows an error with model_starting | The model took longer than 8 minutes to wake. Send the message again. |
400 context_too_long | The chat is longer than the model's memory. Start a new chat, or raise Memory length on the endpoint. |
Every code is listed on Error codes.
Frequently asked questions
Can I use a self-hosted model in Open WebUI without running a GPU myself?
Yes. Deploy the model on BitsRun, then add its base URL and brk_ key as an OpenAI API connection in Open WebUI. BitsRun runs the GPU only while the model answers and bills by the second.
Which model name should I pick in Open WebUI?
Pick the one model the endpoint lists. Each BitsRun endpoint serves exactly one model and always uses it, whatever name the request sends.
Can I add more than one BitsRun endpoint to Open WebUI?
Yes. Add one connection per endpoint, each with its own base URL and key.
Why is the first reply slow?
The endpoint was asleep and the model had to load. That takes a few seconds to about 40 seconds on a warm GPU and about 2 to 4 minutes on a new GPU machine, and the wait is not billed.
Next step
Want a different model for chat? See Host a GGUF model as an OpenAI-compatible API. For document search in Open WebUI, read Self-hosted embeddings API. Estimate your monthly bill with the cost calculator, then create your account.