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

# Open WebUI

> Use deAPI for image generation and editing, text-to-speech, speech-to-text and document embeddings in Open WebUI, through the OpenAI-compatible endpoint.

[Open WebUI](https://openwebui.com) is a self-hosted chat interface for local and hosted models. Its image, voice and document features can call any OpenAI-compatible API, so you can point them at deAPI and keep your chat model where it is: Ollama, OpenAI or any other connection.

> [!NOTE]
>
> deAPI does not serve `/v1/chat/completions`. Keep your existing chat connection and use deAPI for images, speech, transcription and embeddings.

Every step below was checked by sending deAPI the exact requests that Open WebUI v0.13 sends.

***

### Prerequisites

* An Open WebUI instance and an admin account
* A deAPI API key from the [deAPI Dashboard](https://app.deapi.ai/settings/api-keys). See [API Keys](https://docs.deapi.ai/api-keys.md).

Every setting below lives under **Admin Panel → Settings** and uses the same two values:

| Field | Value |
| - | - |
| **API Base URL** | `https://oai.deapi.ai/v1` |
| **API Key** | Your deAPI key, e.g. `sk-dp-1234-AbCdEf...` |

***

### Image generation

1. Open **Admin Panel → Settings → Images**.
2. Turn on **Image Generation**.
3. Set **Image Generation Engine** to **Default (Open AI)**.
4. Enter the **API Base URL** and **API Key**. Leave **API Version** empty.
5. Type a model name into **Model**. The dropdown only lists OpenAI's own models, so type the name instead.
6. Set **Image Size** to a size the model supports, then click **Save**.

| Model | Image Size |
| - | - |
| `ZImageTurbo_INT8` | `512x512`, `768x768`, `1024x1024` |
| `Flux1schnell` | `512x512`, `768x768`, `1024x1024`, `1024x1536`, `1536x1024` |
| `Flux_2_Klein_4B_BF16` | Any size from 256 to 1536 px per side, in steps of 16 |
| `ZAnimeDistill_8Step_INT8` | `512x512`, `768x768`, `1024x1024` |

Open WebUI's default size, `512x512`, works on all four. It asks for `b64_json`, and deAPI returns a PNG. In testing, a `512x512` image from `ZImageTurbo_INT8` came back in about 14 seconds.

***

### Image editing

1. On the same **Images** page, turn on **Image Edit**.
2. Set **Image Edit Engine** to **Default (Open AI)**.
3. Enter the same **API Base URL** and **API Key**.
4. Set **Model** to `Flux_2_Klein_4B_BF16` and click **Save**.

`Flux_2_Klein_4B_BF16` accepts the multipart `image[]` field that Open WebUI uses, combines up to 3 input images, and returned a `512x512` edit in about 8 seconds in testing. `QwenImageEdit_Plus_NF4` (one input image) works too, but is much slower: minutes rather than seconds in testing. See [Image editing](https://docs.deapi.ai/openai-compatibility.md#image-editing) for limits.

***

### Text-to-speech

1. Open **Admin Panel → Settings → Audio**.
2. Under **Text-to-Speech**, set **Text-to-Speech Engine** to **OpenAI**.
3. Enter the **API Base URL** and **API Key**.
4. Set **TTS Model** to `Kokoro` and **TTS Voice** to a Kokoro voice such as `af_nova`, then click **Save**.

**Read Aloud** under a reply now plays audio generated by deAPI. A short sentence took about 3 seconds in testing.

> [!TIP]
>
> Kokoro voices are tied to one language, set by the voice prefix, and the model does not detect the language from the text. Pick a voice that matches the language of your replies. The OpenAI names `alloy`, `echo`, `fable`, `onyx`, `nova` and `shimmer` also work on `Kokoro`, and all of them map to English voices. Voice lists for `Kokoro`, `Chatterbox` and `Qwen3_TTS_12Hz_1_7B_CustomVoice` are in [Text-to-speech](https://docs.deapi.ai/openai-compatibility.md#text-to-speech).

***

### Speech-to-text

1. On the same **Audio** page, set **Speech-to-Text Engine** to **OpenAI**.
2. Enter the **API Base URL** and **API Key**.
3. Set **STT Model** to `WhisperLargeV3Ct2` and click **Save**.

Voice input is now transcribed by deAPI. In testing, WebM (what Chrome records), M4A, MP3 and WAV files all transcribed correctly; a short clip took about 5 seconds. Audio files can be up to 20 MB.

***

### Document embeddings

1. Open **Admin Panel → Settings → Documents**.
2. Set **Embedding Model Engine** to **OpenAI**.
3. Enter the **API Base URL** and **API Key**.
4. Set **Embedding Model** to `Bge_M3_FP16` and click **Save**.

`Bge_M3_FP16` returns 1024-dimensional vectors and handles many languages.

> [!WARNING]
>
> Vectors from different embedding models are not compatible. After switching, run **Reindex Knowledge and Memory Vectors** on the same page so existing documents are embedded again with `Bge_M3_FP16`.

***

### Troubleshooting

| Symptom | Cause and fix |
| - | - |
| `400 size_not_supported` | The **Image Size** is not on the model's list. The error message lists the sizes the model accepts. |
| `404 model_not_found` | Model names are case-sensitive and there are no OpenAI aliases. Use `Flux1schnell`, not `dall-e-3`. |
| `401 missing_api_key` or `401 invalid_api_key` | The **API Key** field is empty or the key is wrong. Copy it again from the dashboard. |
| Requests stop after a fixed time | deAPI keeps the connection open until the job finishes, which can take minutes for heavy edits. Open WebUI sets no timeout by default; if you set `AIOHTTP_CLIENT_TIMEOUT`, keep it above 600 seconds. |

***

### Next steps

> [card] [OpenAI Compatibility](https://docs.deapi.ai/openai-compatibility.md)
>
> Every endpoint, model and field the OpenAI-compatible API supports, and where it differs from OpenAI


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.