---
title: "Open WebUI custom OpenAI-compatible endpoint setup | BroadRouter"
description: "Add BroadNet Inference to Open WebUI as an OpenAI-compatible connection, add model IDs to the allowlist, and fix verify, empty-reply and rate-limit issues."
url: https://broadrouter.com/guides/open-webui-openai-api/
lang: en
updated: 2026-11-16
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Connect Open WebUI to BroadNet Inference

Updated 2026-11-16

In Open WebUI, go to Settings > Connections in the admin section, click Add Connection under Manage OpenAI API Connections, set URL to https://inference.broadnet.ai/v1 and API Key to your BroadNet key, then add model IDs such as broadnet/glm-5.3 to the Model IDs allowlist and save.

Open WebUI is a self-hosted chat interface. It connects to any provider that implements the OpenAI chat-completions protocol, and BroadNet Inference does. The steps follow [Open WebUI’s guide for OpenAI-compatible providers](https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible).

## Setup

1.  **Get a BroadNet key.** For a chat UI that several people use, a pay-as-you-go key is the right fit. See [API keys and IP allow-lists](https://broadrouter.com/guides/api-keys-ip-allow-lists/).
    
2.  **Open the connections page.** Go to **Settings > Connections** in the admin section and find **Manage OpenAI API Connections**.
    
3.  **Click Add Connection** and fill in:
    
    | Field | Value |
    | --- | --- |
    | URL | `https://inference.broadnet.ai/v1` (no trailing slash) |
    | API Key | your BroadNet key |
    | Model IDs | add each ID below, one at a time, with the **+** icon |
    
4.  **Add the model IDs by hand.** Type `broadnet/glm-5.3`, click **+**, then repeat for the others you want. BroadNet’s docs describe `GET /v1/models` as public catalog metadata for monitors, so don’t rely on it to fill the model picker.
    
5.  **Click Save.** Open WebUI’s docs note that saving doesn’t test the connection.
    
6.  **Start a chat** and pick the model from the model selector.
    

### With environment variables

If you run Open WebUI in Docker, you can set the connection at startup:

```bash
OPENAI_API_BASE_URL=https://inference.broadnet.ai/v1
OPENAI_API_KEY=your-broadnet-key
```

To add BroadNet next to an existing OpenAI connection, use the plural forms, separated by semicolons: `OPENAI_API_BASE_URLS` and `OPENAI_API_KEYS`. `OPENAI_API_CONFIGS` sets per-connection options such as `model_ids`, keyed by the connection’s index in that list:

```bash
OPENAI_API_CONFIGS='{"0": {"enable": true, "model_ids": ["broadnet/glm-5.3", "broadnet/qwen3.8-27b"]}}'
```

Open WebUI’s [environment variable reference](https://docs.openwebui.com/reference/env-configuration) marks these as ConfigVar settings. They are read on the first launch and saved in the database. After that, the admin panel wins. Edit the connection in **Settings > Connections** in the admin section, or set `ENABLE_PERSISTENT_CONFIG=False` if you want the environment to apply on every start.

## Which model to pick

| Use | Model | Context |
| --- | --- | --- |
| General chat, tools, JSON | `broadnet/glm-5.3` | 1,048,576 |
| Image questions, Arabic | `broadnet/qwen3.8-27b` | 262,144 |
| Long documents, images | `broadnet/deepseek-v4.1-flash` | 1,048,576 |
| Low cost, free credit | `broadnet/gemma-4-26b-a4b` | 32,768 |

BroadNet tested Qwen3.8 27B in Arabic, including Gulf and Egyptian dialects; see [choosing an LLM for Arabic](https://broadrouter.com/blog/choosing-an-llm-for-arabic/). Gemma 4 VL 26B is the only chat model that works on the $5 starting credit; the credit also covers the two Transcribe models. Prices for each are on the [pricing page](https://broadrouter.com/pricing/).

Open WebUI passes standard parameters such as `temperature` and `max_tokens`, and supports tool use when the model and server support `tools`. BroadNet lists tools for GLM 5.3 and Qwen3.8 27B.

## Troubleshooting

-   **Verify Connection fails with 400, 401 or 403.** Open WebUI’s verify button calls `/models`. Its docs say chat completions can still work. Add the IDs to the allowlist and test a chat. If chat also returns 401, the key is wrong, expired, or out of pay-as-you-go allowance.
-   **The model is listed but the first message fails.** Check that the ID matches BroadNet’s exactly, with the `broadnet/` prefix. GLM 5.3, Qwen3.8 27B and DeepSeek V4.1 Flash need a top-up.
-   **Empty replies.** Reasoning models (DeepSeek V4.1 Flash, GLM 5.3, Qwen3.8 27B) spend output tokens on reasoning first. If you set **max\_tokens** in the model’s **Advanced Params**, raise it or clear it. [Why answers come back empty](https://broadrouter.com/guides/reasoning-tokens-empty-response/).
-   **429 when several people chat.** A pay-as-you-go key allows 30 requests a minute and 4 at once. Open WebUI also makes background calls, such as chat titles, on the same key. See [errors and retries](https://broadrouter.com/guides/errors-and-retries/).
-   **Changed env vars do nothing.** The first launch saved the old values. Edit the connection in the admin panel, or see the environment variable section above.
-   **Using a plan key.** An [unlimited plan session](https://broadrouter.com/guides/unlimited-llm-api-sessions/) runs one request at a time, and keys can’t be shared. It suits one person’s own instance; extra users’ requests queue.

## Terms in this guide

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[API key](https://broadrouter.com/glossary/api-key/)

An API key is a secret string that identifies and authorizes a client calling an API. LLM APIs usually expect it in an Authorization: Bearer header, and anyone who holds the key can make requests that are billed to the account that owns it.

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[Chat Completions API](https://broadrouter.com/glossary/chat-completions-api/)

The Chat Completions API is OpenAI's HTTP endpoint, POST /v1/chat/completions, that takes a model name and a list of role-tagged messages and returns the model's next message. Its request and response shape became the common format that OpenAI-compatible providers and SDKs reuse.

[Concurrency](https://broadrouter.com/glossary/concurrency/)

Concurrency is the number of requests a client has in flight at the same time. LLM APIs often cap it per key or plan, separately from requests per minute, because each open request holds GPU capacity until its response has finished.

[Input and output tokens](https://broadrouter.com/glossary/input-and-output-tokens/)

Input tokens are the tokens a language model reads in a request, including the system prompt, conversation history, tool definitions and images. Output tokens are the tokens it generates in reply, including any reasoning. LLM APIs usually price them separately, and output usually costs more.

[max\_tokens](https://broadrouter.com/glossary/max-tokens/)

max\_tokens is an LLM API parameter that sets the most tokens a model may generate in one response. When generation reaches the limit, it stops and the response is marked as cut off, for example with finish\_reason set to "length".

## Questions

### Why does Verify Connection fail but chat works?

Open WebUI's verify button calls the provider's /models endpoint. Its docs say a failed check doesn't mean chat is broken. Add the BroadNet model IDs to the Model IDs allowlist by hand.

### Can I set the connection with environment variables?

Yes. Set OPENAI\_API\_BASE\_URL to https://inference.broadnet.ai/v1 and OPENAI\_API\_KEY to your BroadNet key. Open WebUI stores these on first launch, so later changes to the variables are ignored unless ENABLE\_PERSISTENT\_CONFIG is False.

### Why did my new OPENAI\_API\_BASE\_URL value not take effect?

Open WebUI treats it as a ConfigVar. After the first launch it uses the value saved in its database. Change the URL in Settings > Connections in the admin section, or set ENABLE\_PERSISTENT\_CONFIG=False to read the environment on every start.

### Can my whole team share one unlimited plan key in Open WebUI?

No. BroadNet's plans don't allow sharing a key, and one plan session runs one request at a time. Use a pay-as-you-go key for a shared Open WebUI.

## Related guides

-   [Add BroadNet Inference to LibreChat as a custom endpoint](https://broadrouter.com/guides/librechat-custom-endpoint/)
-   [Why a reasoning model returns an empty answer](https://broadrouter.com/guides/reasoning-tokens-empty-response/)
-   [How the unlimited LLM API plans work for agents](https://broadrouter.com/guides/unlimited-llm-api-sessions/)
-   [BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)
-   [All tools that work with BroadNet Inference](https://broadrouter.com/integrations/): SDKs, coding agents, chat UIs and automation tools, with exact settings for each

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-open-webui-openai-api&utm_content=page-cta) ·

**Sources**

-   [Open WebUI docs, OpenAI-compatible providers (checked 2026-11-16)](https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible)
-   [Open WebUI docs, environment variable configuration (checked 2026-11-14)](https://docs.openwebui.com/reference/env-configuration)
-   [BroadNet Inference API reference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-open-webui-openai-api&utm_content=sources)
