---
title: "Open WebUI OpenAI-compatible API setup with one key"
canonical: https://uplinkswitch.ai/guides/open-webui
generated: 2026-11-04T07:21:31.006Z
source: https://uplinkswitch.ai/guides/open-webui
base_url: https://api.uplinkswitch.com/v1
---

[›uplinkswitch](https://uplinkswitch.ai/)

[api.uplinkswitch.com/v1](https://uplinkswitch.ai/models)[Console](https://uplinkswitch.ai/console)

[›uplinkswitch](https://uplinkswitch.ai/)

# Open WebUI

Open WebUI on an OpenAI-compatible connection: the URL with /v1, a Bearer key, Verify Connection, and a Model IDs allowlist for the models you want.

Checked 2026-10-23

·[All guides](https://uplinkswitch.ai/guides)·[Models](https://uplinkswitch.ai/models)

At the end you have Open WebUI on an OpenAI-compatible API connection at `https://api.uplinkswitch.com/v1`, with one key from the console and every chat model on the [list](https://uplinkswitch.ai/models) in its model selector, or only the ones you allow. Each message bills per token to the balance behind that key, and the live table below is what a chat turn costs on each model today. Written against Open WebUI v0.12.3, released October 16, 2026; labels read from its docs and source on 2026-10-23.

## Before you start

You need Open WebUI running and signed in with its admin account (the first account created on a new install), an account on the [console](https://uplinkswitch.ai/console) with credit on it, and one key created there. Create the key for Open WebUI alone, so its requests sit apart from any other tool on the Usage page. Nothing is installed on the UplinkSwitch side: the URL and the key are the whole configuration.

## Where the connection setting is

Your avatar → **Settings** → **Admin** → **Connections**, then the list called **Manage OpenAI API Connections**. In current versions the admin settings open inside the Settings dialog; the **Admin Panel** item in the user menu leads to users, not connections.

The **OpenAI API** switch at the top of that page has to be on. A fresh install already has one row there for `https://api.openai.com/v1`; switch it off or delete it if you have no OpenAI key, so Open WebUI stops asking it for a model list.

## Add the OpenAI-compatible API connection

1.  Click **+** (**Add Connection**) next to **Manage OpenAI API Connections**.
2.  **Connection Type**: leave it on **External**.
3.  **URL**: `https://api.uplinkswitch.com/v1`  with `/v1` on the end. Open WebUI adds `/models` and `/chat/completions` to exactly what you type.
4.  **Auth**: **Bearer**, and paste your key into **API Key**.
5.  Click the **Verify Connection** icon beside the URL. It calls `/models` with your key and answers **Server connection verified**.
6.  Optional, under **Advanced**: add ids to **Model IDs** to list only those models. Left empty, the selector shows every model the URL lists.
7.  Optional, also under **Advanced**: paste `{"HTTP-Referer": "https://uplinkswitch.ai", "X-Title": "Open WebUI"}`  into **Headers**. Open WebUI sends them with every request, and the Usage page records the X-Title as the client app, so this connection's requests show as Open WebUI there.
8.  Click **Save**. The new models are in the selector of a new chat.

## Pick the models with the Model IDs allowlist

The catalog lists every chat model on one URL, which makes for a long selector. Open WebUI's own docs recommend an allowlist for gateways like this one. Under **Advanced** → **Model IDs**, type an id, click **+**, and repeat; the list then replaces the fetched one, and Open WebUI stops calling `/models` for that connection. After a successful verify the field suggests ids as you type. A starting set:

model ids

```
claude-sonnet-5-5
gpt-6.1-sol
gemini-3.1-pro-preview
deepseek-v4-pro-0813
glm-5.3
kimi-k3
qwen3.6-27b
```

Any other id from the [Models page](https://uplinkswitch.ai/models) works the same way, including the [uncensored builds](https://uplinkswitch.ai/uncensored).

## Set it from Docker instead

On a new install you can create the connection before the first start. This is Open WebUI's documented Docker command with the two documented variables added; replace `your-secret-key` with the output of `openssl rand -hex 32`.

shell

```
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://api.uplinkswitch.com/v1 \
  -e OPENAI_API_KEY=sk-uplink-live-... \
  --name open-webui --restart always \
  ghcr.io/open-webui/open-webui:main
```

Open WebUI reads `OPENAI_API_BASE_URL` and `OPENAI_API_KEY` only on the first start of a fresh data volume. On an install that already ran, add the connection in the Admin settings, or start it with `ENABLE_PERSISTENT_CONFIG=False` so the environment wins over saved settings. The pip route is `pip install open-webui` then `open-webui serve`, on Python 3.11 or 3.12; the same variables apply. Every variable is in the [environment reference](https://docs.openwebui.com/reference/env-configuration/).

## Several connections at once

Keep an existing provider and add this key beside it: each **+** adds a row, and each row has its own switch. From the environment, the plural variables take semicolon-separated lists paired by position:

.env

```
OPENAI_API_BASE_URLS="https://api.openai.com/v1;https://api.uplinkswitch.com/v1"
OPENAI_API_KEYS="sk-...;sk-uplink-live-..."
```

When two connections list the same id, set a **Prefix ID** under **Advanced** on one of them, such as `uplink`. The model then shows as `uplink.gpt-6.1-sol`, and Open WebUI strips the prefix before the request leaves.

## What a chat costs on each model

Open WebUI sends the conversation so far with every message, so a turn grows as the chat does. Take a turn of 3,000 input and 600 output tokens; the size is an assumption. The rates are the live catalog, and the last column is the model's latest [daily check](https://uplinkswitch.ai/proof).

| Model | Input / output per 1M | One turn | 100 turns | Daily check |
| --- | --- | --- | --- | --- |
| [Claude Sonnet 5.5](https://uplinkswitch.ai/models/claude-sonnet-5-5) | $1.20 / $3.00 | $0.0054 | $0.54 | Steady since Oct 12 |
| [GPT-6.1 Sol](https://uplinkswitch.ai/models/gpt-6.1-sol) | $0.60 / $3.00 | $0.0036 | $0.36 | Steady since Oct 31 |
| [Gemini 3.1 Pro Preview](https://uplinkswitch.ai/models/gemini-3.1-pro-preview) | $1.20 / $7.20 | $0.0079 | $0.792 | Steady since Nov 1 |
| [DeepSeek V4 Pro 0813](https://uplinkswitch.ai/models/deepseek-v4-pro-0813) | $0.792 / $1.188 | $0.0031 | $0.3089 | Steady since Nov 4 |
| [GLM 5.3](https://uplinkswitch.ai/models/glm-5.3) | $0.3178 / $0.9987 | $0.0016 | $0.1553 | Steady since Oct 12 |
| [Kimi K3](https://uplinkswitch.ai/models/kimi-k3) | $0.90 / $4.50 | $0.0054 | $0.54 | Steady since Oct 12 |
| [Qwen3.6 27B](https://uplinkswitch.ai/models/qwen3.6-27b) | $0.09 / $0.60 | $0.0006 | $0.063 | Steady since Oct 19 |

USD. Input tokens times the input rate plus output tokens times the output rate, per million; nothing counted at the cached rate.

A long chat costs more per turn than a short one for the same reason, so a new chat for a new topic keeps every turn small.

## Direct Connections

Open WebUI also lets each user add a personal connection that the browser calls itself, under **Settings** → **Connections**, once an admin turns on **Direct Connections** in the Admin Connections page (or sets `ENABLE_DIRECT_CONNECTIONS=true`). The browser then calls `https://api.uplinkswitch.com/v1` directly, which this API allows from any origin. Open WebUI marks the feature experimental and keeps the key in the browser's local storage; for a shared install the admin connection above is the one its docs recommend.

## If it does not work

-   **No models in the selector**: the URL is missing `/v1`, or the key is wrong. Run Verify Connection again, or check the key from a terminal with the request below.
-   **401**: the key is wrong, deleted, or from another account. Copy it again from the console.
-   **404 model\_not\_found**: an id in Model IDs has a typo. Copy ids from the Models page rather than typing them.
-   **402**: the balance or the key's monthly limit is spent. Top up or raise the limit in the console.
-   **The settings page hangs**: an unreachable URL is saved in another row. Remove or fix that row; Open WebUI waits up to 10 seconds per model list by default.

shell

```
curl https://api.uplinkswitch.com/v1/models \
  -H "Authorization: Bearer sk-uplink-live-..." \
  -H "HTTP-Referer: https://uplinkswitch.ai" \
  -H "X-Title: Open WebUI"
```

The steps above follow Open WebUI's [OpenAI-compatible provider guide](https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible/). Other tools on the same key are in the [integration guides](https://uplinkswitch.ai/guides), and the [SDK guide](https://uplinkswitch.ai/guides/sdks) covers your own code.

## Questions

### 

A self-hosted web interface for chatting with large language models. It has no models of its own: you connect it to a provider, and the models that provider lists appear in its model selector.

### 

The software is free to run yourself with pip or Docker. The models are not: every message bills per token to the provider behind the connection. With this key a 3,000-in, 600-out turn costs $0.0054 on Claude Sonnet 5.5 and $0.0006 on Qwen3.6 27B.

### 

Go to your avatar > Settings > Admin > Connections, click + next to Manage OpenAI API Connections, enter the provider's URL with /v1 on the end and its key, click Verify Connection, then Save. For this key the URL is https://api.uplinkswitch.com/v1.

### 

Any API that answers GET /v1/models and POST /v1/chat/completions in OpenAI's format. Every chat model in our catalog answers that format at https://api.uplinkswitch.com/v1, Claude, Gemini and DeepSeek included, so one connection lists them all.

### 

Yes, its own: GET /api/models and POST /api/chat/completions on your Open WebUI server, with an Open WebUI key. That API serves Open WebUI users. The provider connection in this guide is the other direction, the API Open WebUI itself calls.

### 

Usually the URL. Open WebUI adds /models to whatever you typed, so the URL must end in /v1: https://api.uplinkswitch.com/v1. Then check the key with Verify Connection. If the list is long and you only want a few models, add their ids under Advanced > Model IDs.

### 

Yes. Each connection is its own row with its own switch. If both list a model with the same id, give one a Prefix ID under Advanced; Open WebUI shows the model as prefix.id and strips the prefix before the request goes out.

### 

OPENAI\_API\_BASE\_URL and OPENAI\_API\_KEY are read on the first start of a fresh data volume. After that Open WebUI uses the settings it saved, so change the connection in the Admin settings, or set ENABLE\_PERSISTENT\_CONFIG=False to make the environment win.

## Related

-   [SDK setup](https://uplinkswitch.ai/guides/sdks)
-   [Model catalog](https://uplinkswitch.ai/models)
-   [SillyTavern setup](https://relayswitch.io/guides/sillytavern)
-   [Every uncensored LLM by API, priced live](https://uplinkswitch.ai/uncensored)
-   [LLM API price index](https://uplinkswitch.ai/pricing-index)
-   [Daily real-model check](https://uplinkswitch.ai/proof)
