Apps and SDKs
Open WebUI
In short: Open WebUI is a self-hosted chat interface that works with the gateway as an OpenAI-compatible connection and lists every model your key can use.
On this page
Open WebUI is a self-hosted chat interface, often run with Docker for a team or a home server. It talks to the gateway as an OpenAI-compatible connection and reads the model list from GET /v1/models, so you do not have to type model ids. Checked against Open WebUI’s connection guide and v0.12.3 (October 2026).
You need an API key from API keys and this base URL:
Base URLhttps://api.oneaiapikey.com/v1
How do I add the connection in Open WebUI?
Five steps add the gateway as an OpenAI-compatible connection in Open WebUI.
- Sign in to Open WebUI as an admin and open Admin Panel → Settings → Connections.
- In the OpenAI API section, click + (Add Connection).
- Set URL to the base URL above, including
/v1and without a trailing slash, and paste your key as the API key. - Save. Open WebUI calls
GET /v1/modelswith the key as a Bearer token; the models your key can use appear in the model picker of a new chat. - Start a chat, pick a model such as
z-ai-glm-5.3-flash:free, and send a message. The request shows up on your usage page.
Each connection has its own on/off switch, so you can pause the gateway connection without deleting it.
Can I set the connection at first start?
Yes. With Docker, you can pass the connection as environment variables:
docker run -d -p 3000:8080 \
-e OPENAI_API_BASE_URL=https://api.oneaiapikey.com/v1 \
-e OPENAI_API_KEY=$ONEAIAPIKEY_API_KEY \
-v open-webui:/app/backend/data \
--name open-webui ghcr.io/open-webui/open-webui:mainOPENAI_API_BASE_URL and OPENAI_API_KEY are persistent settings in Open WebUI: they are read the first time it starts and then stored in its database. After that, the values saved in the admin panel take over, and changing the variables has no effect. To change the URL or key later, use Admin Panel → Settings → Connections.
How do I choose which models appear?
Three settings control which models appear in the picker.
- The connection’s Model IDs (Filter) list limits the picker to the ids you add there. Leave it empty to show every model the key can use.
- Or create a key whose model list contains just those models (see per-key settings). The gateway then returns only those from
GET /v1/modelsand refuses the rest with 403, which also stops other apps using that key from calling them. - Admin Panel → Settings → Models lets you rename a model, set its visibility for users and groups, and switch capabilities such as vision on or off.
How do I keep costs down in Open WebUI?
Use a cheap task model, a separate key with a spend limit, and short chats.
- Open WebUI makes extra background requests to title chats, suggest tags and suggest follow-up questions. Under Admin Panel → Settings → Interface, set the task model to a cheap, fast model such as
z-ai-glm-5.3-flash:freeso those calls do not run on an expensive one, or switch off the ones you do not need. - Give Open WebUI its own key with a spend limit, separate from your other apps (see Cost control). Everyone on the instance spends from that one key.
- Long chats re-send their whole history with each message. For Claude models, long repeated prompts are cheaper through the Anthropic format; Open WebUI uses chat completions, where Claude prompt caching does not apply.
How do I fix common Open WebUI errors?
Most Open WebUI errors come from the URL, the key or the model list.
- No models in the picker: the URL must end in
/v1, and the key must be valid. Check the key with the request on Authentication. Paid models are listed before a top-up, but return402with codepaid_needs_deposituntil you add $1 or more. - The connection check fails with 401: the key was pasted with spaces, or it is disabled, expired or revoked. See Errors.
- A model fails with 403: the key’s model list does not include it, or your balance is empty. See Errors.
- Environment variables are ignored: see the persistent settings note above.