# Open WebUI

[**Open WebUI**](https://docs.openwebui.com/) is an extensible, feature-rich, and user-friendly self-hosted AI platform. By combining **Open WebUI** with Cortecs, you can create a privacy-preserving AI Chatbot Platform. This guide will walk you through the setup process.

{% hint style="info" %}
*Before you begin: Make sure you have generated your Cortecs API key. If not, check out our* [*QuickStart*](/quickstart.md) *guide.*
{% endhint %}

## 1. Deploy Open WebUI

There are multiple ways to deploy Open WebUI.

To get started quickly, follow the official [Quick Start guide](https://docs.openwebui.com/getting-started/quick-start/) for Open WebUI.

Once installation is complete, you’ll need to configure the external provider.

## 2. Connect to cortecs

Cortecs provides **OpenAI-compatible API endpoints**, making it easy to integrate with [Open WebUI](https://docs.openwebui.com/getting-started/quick-start/starting-with-openai-compatible) and many other tools. To connect:

1. Open Open WebUI in your browser.
2. Go to ⚙️ **Settings -> Admin Settings** → **Connections**.
3. At **Manage OpenAI API Connections c**lick ➕ **Add Connection.**
   1. **Base URL:**  <code class="expression">space.vars.DEFAULT\_API\_BASE\_URL</code>
   2. **API Key:** Your API Key
4. Click Save.

<figure><img src="/files/fnAGaSNy7SazrDx0ygZA" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Cortecs Endpoints are **OpenAI compatibl**e to make easier its integration in a lot of products.
{% endhint %}

## 3. (Optional) Configure a Embedding Model

By default, Open WebUI uses **SentenceTransformers** for embedding generation. You can optionally switch to a Cortecs embedding model. To configure:

1. Open Open WebUI in your browser.
2. Go to ⚙️ **Settings** → **Admin Settings** → **Documents** → **Embedding**.
   1. **Embedding Model Engine:** OpenAI
   2. **Base URL:** `https://api.cortecs.ai/v1/`
   3. **API Key:** Your API Key
   4. **Embedding Model:** Choose one of the embedding models of the [models list](https://cortecs.ai/serverlessModels)
3. Click Save.

<figure><img src="/files/UNQysvfBL3qgFVTzGLgA" alt=""><figcaption></figcaption></figure>

## 4. Start Chatting!

You're all set!

* Open the chat interface.
* Select your connected server's model from the model menu.
* Start chatting with your AI assistant.

<figure><img src="/files/BKYT3bdZlt055Wr3CgVy" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cortecs.ai/integration-examples/chat/open-webui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
