# Open WebUI (https://inference.net/docs/integrations/open-webui)

Connect Open WebUI to Inference.net by setting `OPENAI_API_BASE_URL` to `https://api.inference.net/v1` and `OPENAI_API_KEY` to your Inference.net API key, either through Docker environment variables or in the Open WebUI Admin Panel. Open WebUI reads `GET https://api.inference.net/v1/models` automatically and lists every available model in the chat selector.

## Quick Docker setup

Create an account at [/register](/register/) and generate a project key in [API keys](/dashboard/api-keys/). Then launch Open WebUI pointing directly at Inference.net:

<CodeTabs>

```bash
export INFERENCE_API_KEY="inf_sk_..."

docker run -d \
  -p 3000:8080 \
  -e OPENAI_API_BASE_URL="https://api.inference.net/v1" \
  -e OPENAI_API_KEY="$INFERENCE_API_KEY" \
  -v open-webui:/app/backend/data \
  --name open-webui \
  --restart always \
  ghcr.io/open-webui/open-webui:main
```

```yaml
services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - "3000:8080"
    environment:
      OPENAI_API_BASE_URL: https://api.inference.net/v1
      OPENAI_API_KEY: ${INFERENCE_API_KEY}
    volumes:
      - open-webui:/app/backend/data
    restart: always

volumes:
  open-webui:
```

</CodeTabs>

Open `http://localhost:3000`, create your local Open WebUI admin user, and select a model such as `deepseek-v4.1-flash-1017` or `glm-5.3` from the top model dropdown.

## Configure in the Admin Panel

If Open WebUI is already running, add Inference.net through the browser UI without restarting the container:

<Steps>
  <Step title="Open Connections settings">

Sign in as an Open WebUI administrator and navigate to **Admin Panel > Settings > Connections**.

  </Step>
  <Step title="Add an OpenAI API connection">

Under **OpenAI API**, click **+** to add a new connection (or edit an existing entry).

  </Step>
  <Step title="Enter URL and API key">

Set these fields:

| Field | Value |
| --- | --- |
| URL | `https://api.inference.net/v1` |
| Key | Your Inference.net API key (`inf_sk_...`) |
| Prefix ID (optional) | `inference` (helps distinguish models if you have multiple providers) |

  </Step>
  <Step title="Verify and save">

Click the **Verify Connection** icon to confirm Open WebUI can reach `GET https://api.inference.net/v1/models`, then click **Save**.

  </Step>
  <Step title="Start chatting">

Return to the main chat view, choose a model from the dropdown, and send a message. Confirm tokens and spend in [Usage](/dashboard/usage/).

  </Step>
</Steps>

## US-only routing in Open WebUI

To restrict traffic to US data centers, add a connection with `https://us.api.inference.net/v1` as the URL (for example, with Prefix ID `inference-us`). Only models displaying the `US` badge in the [model catalog](/models/) accept requests on the US-only base URL; other models return HTTP `400` with code `region_not_supported`.

## Recommended models for Open WebUI

Open WebUI loads the full catalog from `GET /v1/models`. You can pin or hide models under **Admin Panel > Settings > Models**. Popular choices:

| Model ID | Context window | Modalities | Best for |
| --- | --- | --- | --- |
| [`deepseek-v4.1-flash-1017`](/models/deepseek-v4-1-flash-1017/) | 1,040,000 | Text, image | Fast general chat, coding, and vision uploads |
| [`glm-5.3`](/models/glm-5-3/) | 1,048,576 | Text | Deep reasoning and long technical responses |
| [`glm-5.3-flash`](/models/glm-5-3-flash/) | 1,048,576 | Text, image, video | High-throughput multimodal chat |
| [`moonshotai/kimi-k3.1-pro`](/models/kimi-k3-1-pro/) | 1,048,576 | Text, image | Complex research and agentic tool use |
| [`inference-net/schematron-v2-turbo`](/models/schematron-v2-turbo/) | 128,000 | Text | Extracting structured JSON from raw HTML |

<Callout title="Privileged models in the model list" tone="info">

Privileged cybersecurity models such as [`deepseek-v4.1-flash-1017-cyber`](/models/deepseek-v4-1-flash-1017-cyber/) require approved team access. Calls without approval return HTTP `403` (`model_access_required`). Hide models you do not use in **Admin Panel > Settings > Models**, or request access under [Privileged model access](/docs/api/privileged-model-access/).

</Callout>

## Troubleshooting

- **Models do not appear in the dropdown:** Confirm the URL ends with `/v1` (`https://api.inference.net/v1`), click **Verify Connection**, and reload the browser tab.
- **Environment variables ignored after first boot:** Open WebUI persists connection settings in its SQLite database after initial startup. Update the connection in **Admin Panel > Settings > Connections**, or set `ENABLE_PERSISTENT_CONFIG=false` in Docker if you want environment variables to win on every restart.
- **`401 Unauthorized`:** Check that your key in [API keys](/dashboard/api-keys/) is active and has not been revoked.
- **Vision upload fails:** Choose a model whose `input_modalities` includes `"image"`, such as `deepseek-v4.1-flash-1017`, `glm-5.3-flash`, or `moonshotai/kimi-k3.1-pro`.

Explore all supported editors, gateways, and SDKs in the [Integrations hub](/docs/integrations/).