> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opper.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Open WebUI

> Add Opper as an OpenAI-compatible connection in Open WebUI

[Open WebUI](https://openwebui.com) is a self-hosted AI workspace — chat, RAG over your documents, and tools, for a whole team. It is built around standard protocols and connects to any server that implements the OpenAI Chat Completions API.

## Setup

<Steps>
  <Step title="Open the connections settings">
    In Open WebUI, go to **Admin Settings → Connections → OpenAI**, then click **Add Connection**.
  </Step>

  <Step title="Fill in the connection">
    | Field       | Value                            |
    | ----------- | -------------------------------- |
    | **URL**     | `https://api.opper.ai/v3/compat` |
    | **API Key** | Your Opper API key               |
  </Step>

  <Step title="Filter the model list">
    Opper's catalog is large. Under **Model IDs (Filter)**, add the IDs you want your users to see — type each one and click **+**. Save.
  </Step>
</Steps>

Or set it at startup with environment variables:

```bash theme={null}
OPENAI_API_BASE_URL=https://api.opper.ai/v3/compat
OPENAI_API_KEY=your-opper-api-key
```

<Tip>
  Running Open WebUI in Docker? The gateway is a public endpoint, so no `host.docker.internal` rewriting is needed — that caveat only applies to model servers on your host machine.
</Tip>

## Choosing a model

Open WebUI verifies a connection by calling `/models`, which Opper implements, so auto-detection works and the picker fills itself. Because the catalog runs to hundreds of entries, the **Model IDs (Filter)** allowlist is strongly recommended — the same advice Open WebUI gives for any large gateway.

## Multi-user usage

Open WebUI is multi-user by design. Forward per-user tags with the `X-Opper-Tags` header to break usage down in Opper analytics — see [Tags and usage attribution](/build/gateway/usage-attribution).

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection verification fails but chat works">
    Verification calls `/models` with a bearer token. If it errors while chat completions succeed, add your model IDs to the **Model IDs (Filter)** allowlist manually and carry on.
  </Accordion>

  <Accordion title="Hundreds of models in the picker">
    Expected without a filter. Add an allowlist under **Model IDs (Filter)**, or narrow the key's project with [model access rules](/control-plane/rules/model-access) so the filter happens server-side.
  </Accordion>

  <Accordion title="401 Unauthorized">
    Check the key is an Opper key (they start with `op-`) and that it's on the OpenAI connection, not Ollama.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Model access rules" icon="shield" href="/control-plane/rules/model-access">
    Filter the catalog server-side, per project.
  </Card>

  <Card title="LibreChat" icon="https://mintcdn.com/opper/H-iiE_tAhHpUz1kK/images/tools/librechat.svg?fit=max&auto=format&n=H-iiE_tAhHpUz1kK&q=85&s=9d748d941d00e2a6d1ffdf02d2fc4285" href="/integrations/chat/librechat" width="512" height="512" data-path="images/tools/librechat.svg">
    The other self-hosted chat platform.
  </Card>
</CardGroup>
