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

# Open WebUI | AI Gateway

> Route every Open WebUI chat through the Orq.ai AI Gateway. Add one OpenAI connection to reach the full model catalog with unified tracing.

## Overview

[Open WebUI](https://openwebui.com/) is an open-source, self-hosted chat interface. It supports OpenAI-compatible endpoints directly in the UI, so adding the **AI Gateway** as a connection routes every chat through **Orq.ai** with the full model catalog, unified tracing, and cost tracking. This page covers model routing and tracing only.

## Prerequisites

* [Docker](https://docs.docker.com/get-started/get-docker/) installed
* Active **Orq.ai** account
* [Orq.ai API key](/docs/ai-studio/organization/api-keys)

## Setup

<Steps>
  <Step title="Start Open WebUI">
    Run the container, then open [http://localhost:3000](http://localhost:3000) and create the admin account (the first user to sign up becomes the admin):

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
    ```

    For other install methods, see the [Open WebUI quick start](https://docs.openwebui.com/getting-started/quick-start).
  </Step>

  <Step title="Add the AI Gateway as an OpenAI connection">
    Go to **Settings** → **Admin Settings** → **Connections**, then add a connection under **OpenAI API**:

    * **URL:** `https://api.orq.ai/v3/router` exactly, with no trailing path
    * **Auth:** `Bearer`
    * **API Key:** the **Orq.ai** [API key](/docs/ai-studio/organization/api-keys)

    Leave **Model IDs** empty to include every enabled model from the **AI Gateway**, then **Save**.

    <Frame caption="Adding the AI Gateway as an OpenAI connection in Open WebUI">
      <img src="https://mintcdn.com/orqai/sgkwRbLxAA5IEayI/images/openwebui-route.png?fit=max&auto=format&n=sgkwRbLxAA5IEayI&q=85&s=f7d03abba0ab29ffe64eb82219d54a3f" alt="Open WebUI Edit Connection panel with the URL set to the orq.ai v3 router endpoint and Auth set to Bearer with an API Key field" width="920" height="1046" data-path="images/openwebui-route.png" />
    </Frame>
  </Step>

  <Step title="Select a model">
    Enabled **Orq.ai** models appear in the selector at the top of a new chat. To curate the list, go to **Admin Settings → Models** and add provider-prefixed IDs (for example `openai/gpt-4o`, `anthropic/claude-sonnet-4-6`) from [Workspace Settings → Models](https://my.orq.ai/settings/models).
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="The model picker is empty">
    The connection URL has an extra or trailing path, or the model fetch did not run. Confirm the URL is exactly `https://api.orq.ai/v3/router`, or add models manually under **Admin Settings → Models**.
  </Accordion>

  <Accordion title="Requests do not appear in Orq.ai Traces">
    A different connection is handling the request. Make sure the **AI Gateway** connection is selected, and disable any direct OpenAI connection to route exclusively through **Orq.ai**.
  </Accordion>

  <Accordion title="Authentication errors">
    Confirm the **API Key** is a valid **Orq.ai** [API key](/docs/ai-studio/organization/api-keys), not an OpenAI key.
  </Accordion>
</AccordionGroup>

## Verification

Start a new chat, choose an **Orq.ai** model, and send a message. The response appears in the chat, and the request appears in [**Orq.ai** Traces](/docs/ai-studio/observability/traces) with the selected model identifier.
