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

# OpenWebUI

> Complete integration guide for using Requesty with OpenWebUI

**Everything you need in one integration**: Integrate Requesty with OpenWebUI to access **400+ AI models** through a single, unified interface. Get chat completions, embeddings, speech-to-text, and image generation - all with the flexibility to choose between regions and create your own routing policies.

## How It Works

```mermaid theme={"dark"}
sequenceDiagram
    participant User as OpenWebUI
    participant Router as Requesty Router
    participant AI as Model Providers

    User->>Router: GET /v1/models
    Router-->>User: Return Approved Models

    User->>Router: POST Request (Chat/Embed/Audio)
    rect rgb(30, 30, 46)
    Note right of Router: 🛡️ Security Layer
    Router->>Router: Verify API Key & Permissions
    Note right of Router: 🧠 Routing Engine
    Router->>Router: Check Cache → Select Provider → Apply Fallback
    Note right of Router: 🔄 Adaptor Layer
    Router->>Router: Transform to Provider Format
    end
    Router->>AI: Execute Request
    AI-->>Router: Raw Output
    rect rgb(30, 30, 46)
    Note right of Router: 📊 Analytics Engine: Store Usage
    end
    Router-->>User: Normalized Response
```

**Why use Requesty instead of managing providers yourself?**

<CardGroup cols={2}>
  <Card title="Simplified Integration" icon="plug">
    One URL (`https://router.requesty.ai/v1`) replaces dozens of provider-specific endpoints
  </Card>

  <Card title="Centralized Billing" icon="credit-card">
    Single invoice for all model providers, no need to manage multiple subscriptions
  </Card>

  <Card title="Advanced Analytics" icon="chart-bar">
    Track usage by user email, model, cost, and time with built-in dashboards
  </Card>

  <Card title="Smart Caching" icon="bolt">
    Intelligent response caching and optimization reduces costs and improves speed
  </Card>
</CardGroup>

**What Requesty handles automatically:**

* ✅ Model availability discovery via `/v1/models`
* ✅ Request transformation for different providers
* ✅ Response caching and optimization
* ✅ User tracking and analytics collection
* ✅ Regional routing and failover
* ✅ Rate limiting and quota management

## Important: Enable User Tracking

<Warning>
  **Required for Analytics**: Add this to your OpenWebUI YAML configuration to enable user tracking in analytics:

  ```yaml theme={"dark"}
  ENABLE_FORWARD_USER_INFO_HEADERS=true
  ```

  Without this setting, you won't be able to track usage by user email in your analytics.
</Warning>

## Connection Setup

Navigate to: `/admin/settings/connections`

### Add or Edit OpenAI Connection

1. Click to edit the existing OpenAI API connection or add a new one
2. Set the **URL** to one of:
   * Global: `https://router.requesty.ai/v1`
   * EU only: `https://router.eu.requesty.ai/v1`
3. Add your **API Key** from the [API Keys Page](https://app.requesty.ai/api-keys)
4. Click **Save**

<Frame>
  <img src="https://mintcdn.com/requesty/xdtZz54ubnsOskGu/images/model_connection.png?fit=max&auto=format&n=xdtZz54ubnsOskGu&q=85&s=20894296ed9685c3b6dbbc804a2b91a9" alt="OpenWebUI Connection Setup" width="906" height="978" data-path="images/model_connection.png" />
</Frame>

### Available Models

Models will be automatically fetched from Requesty. **Only approved models for your organization will be visible.**

Manage your approved models at: [https://app.requesty.ai/admin-panel?tab=models](https://app.requesty.ai/admin-panel?tab=models)

View them in OpenWebUI at: `/admin/settings/models`

## Embeddings Setup

Navigate to: `/admin/settings/documents`

1. Under **Embedding Model Engine**, select **OpenAI**
2. **Overwrite base\_url** with: `https://router.requesty.ai/v1`
3. Add your Requesty API key
4. Save your settings

<Frame>
  <img src="https://mintcdn.com/requesty/xdtZz54ubnsOskGu/images/embeddings_connection.png?fit=max&auto=format&n=xdtZz54ubnsOskGu&q=85&s=0ecf99462b190d3041f9008f39d2163c" alt="Embeddings Configuration" width="2084" height="222" data-path="images/embeddings_connection.png" />
</Frame>

## Speech-to-Text Setup

Navigate to: `/admin/settings/audio`

<Info>
  Requesty currently supports **Speech-to-Text only** (not Text-to-Speech).
</Info>

1. Set the **base URL** to: `https://router.requesty.ai/v1`
2. Select **OpenAI** as the provider
3. Use model: `openai/whisper-1` (or any other supported Whisper model)
4. Add your Requesty API key
5. Save your settings

<Frame>
  <img src="https://mintcdn.com/requesty/xdtZz54ubnsOskGu/images/Speechtotext_connection.png?fit=max&auto=format&n=xdtZz54ubnsOskGu&q=85&s=0036a46c8f268a816760232df9546862" alt="Speech-to-Text Configuration" width="2120" height="506" data-path="images/Speechtotext_connection.png" />
</Frame>

## Image Generation Setup

Navigate to: `/admin/settings/images`

1. Set the **base URL** to: `https://router.requesty.ai/v1`
2. Select **OpenAI** as the default provider
3. Use a model like: `vertex/google/gemini-3-pro-image-preview`
4. Customize the image prompt if desired
5. Add your Requesty API key
6. Save your settings

<Frame>
  <img src="https://mintcdn.com/requesty/xdtZz54ubnsOskGu/images/image_connection.png?fit=max&auto=format&n=xdtZz54ubnsOskGu&q=85&s=dc94435764d78cfc12d13aa2702ac9f6" alt="Image Generation Configuration" width="2092" height="680" data-path="images/image_connection.png" />
</Frame>

## Analytics & Usage Tracking

With `ENABLE_FORWARD_USER_INFO_HEADERS=true` enabled, you can track detailed usage analytics by user email, model, and more.

### Visual Analytics Dashboard

View a complete breakdown of spending per customer in the Requesty analytics dashboard:

[**View Spend by User Email →**](https://app.requesty.ai/analytics/advanced?groupBy=extra.X-Openwebui-User-Email\&metric=cost\&aggMethod=sum\&timeRange=7d\&timeGroup=day\&regularChart=bar\&breakdownChart=bar\&hidden=vertex%2Fgemini-2.5-flash%2Copenai%2Fgpt-5-mini%3Apriority%2Cbedrock%2Fclaude-sonnet-4-5%2Cbedrock%2Fclaude-sonnet-4-5%40us-west-2%2Cbedrock%2Fclaude-opus-4-5%2Cbedrock%2Fclaude-sonnet-4-5%40us-east-1%2Copenai%2Fgpt-5%3Apriority%2Cbedrock%2Fclaude-sonnet-4%40us-east-1%2Cbedrock%2Fclaude-opus-4%40us-east-2%2Cbedrock%2Fclaude-haiku-4-5%40eu-west-1%2Canthropic%2Fclaude-sonnet-4%2Cbedrock%2Fclaude-sonnet-4%40eu-west-1%2Cbedrock%2Fclaude-opus-4%2Cbedrock%2Fclaude-opus-4%40us-east-1%2Cbedrock%2Fclaude-3-7-sonnet%2Cbedrock%2Fclaude-sonnet-4-5%40eu-west-1%2Cbedrock%2Fclaude-sonnet-4%2Cbedrock%2Fclaude-3-7-sonnet%40eu-west-1%2Cbedrock%2Fclaude-haiku-4-5%40us-east-1%2Cbedrock%2Fclaude-3-7-sonnet%40us-east-1%2Cbedrock%2Fclaude-3-7-sonnet%40eu-west-3%2Cbedrock%2Fclaude-opus-4%40us-west-2%2Cbedrock%2Fclaude-3-7-sonnet%40eu-north-1%2Cbedrock%2Fclaude-sonnet-4%40eu-west-3%2Cbedrock%2Fclaude-sonnet-4-5%40eu-north-1%2Cbedrock%2Fclaude-sonnet-4%40eu-north-1%2Cbedrock%2Fclaude-sonnet-4%40eu-central-1%2Cbedrock%2Fclaude-3-7-sonnet%40eu-central-1%2Cbedrock%2Fclaude-sonnet-4%40us-west-2%2Cbedrock%2Fclaude-3-7-sonnet%40us-west-2%2Cbedrock%2Fclaude-haiku-4-5%2Cbedrock%2Fclaude-sonnet-4%40us-east-2%2Cbedrock%2Fclaude-sonnet-4-5%40eu-central-1%2Cbedrock%2Fclaude-3-7-sonnet%40us-east-2%2Cbedrock%2Fclaude-haiku-4-5%40eu-west-3%2Cbedrock%2Fclaude-haiku-4-5%40eu-north-1%2Cbedrock%2Fclaude-haiku-4-5%40us-east-2%2Cbedrock%2Fclaude-haiku-4-5%40eu-central-1%2Cbedrock%2Fclaude-sonnet-4-5%40us-east-2%2Cbedrock%2Fclaude-haiku-4-5%40us-west-2%2Cbedrock%2Fclaude-opus-4%40eu-west-1%2Copenai%2Fgpt-5.1-chat%2Cbedrock%2Fclaude-haiku-4-5%40eu-west-12%2Cxai%2Fgrok-4-1-fast%2Copenai-responses%2Fgpt-5.1-codex%2Cxai%2Fgrok-4-1-fast-non-reasoning%2Cvertex%2Fgemini-3-pro-image-preview\&origin_title=Open+WebUI)

<Frame>
  <img src="https://mintcdn.com/requesty/xdtZz54ubnsOskGu/images/analytics_preview.png?fit=max&auto=format&n=xdtZz54ubnsOskGu&q=85&s=aed1e1c31c4fab8f4697994322a990d1" alt="Analytics Dashboard - Cost by User Email" width="2500" height="1150" data-path="images/analytics_preview.png" />
</Frame>

This dashboard provides real-time insights into:

* Cost per user (grouped by email)
* Usage patterns over time
* Model-specific spending breakdowns
* Interactive time-series visualizations

## Programmatic Analytics

You can also retrieve usage statistics programmatically using the Requesty Management API. This is useful for building custom dashboards or billing integrations.

### Get Usage by User Email

Use the `extra.X-Openwebui-User-Email` field to group usage by OpenWebUI user:

```bash theme={"dark"}
curl -X GET "https://api-v2.requesty.ai/v1/manage/apikey/{id}/usage" \
  -H "Authorization: Bearer REQUESTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "start": "2025-11-01T00:00:00Z",
    "end": "2025-11-30T23:59:59Z",
    "group_by": ["extra.X-Openwebui-User-Email"],
    "resolution": "day"
  }'
```

**Example Response:**

```json theme={"dark"}
{
  "usage": {
    "2025-11-29": {
      "spend": "0.13484955",
      "total_tokens": 36398,
      "grouped_data": [{
        "group_by_values": {
          "extra.X-Openwebui-User-Email": "thibault@requesty.ai"
        },
        "spend": "0.13484955",
        "total_tokens": 36398
      }]
    }
  }
}
```

## Resources

* [OpenWebUI Documentation](https://docs.openwebui.com/)
* [Requesty API Keys](https://app.requesty.ai/api-keys)
* [Requesty Platform](https://app.requesty.ai)
