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

# LobeChat / NextChat

> Point the OpenAI endpoint of open-source web chat apps such as LobeChat and NextChat to DreamTo.

[LobeChat](https://lobehub.com/docs) and [NextChat](https://github.com/ChatGPTNextWeb/NextChat) (formerly ChatGPT-Next-Web) are popular open-source web chat apps, and both support a custom OpenAI endpoint. DreamTo connects using the OpenAI Chat Completions format.

> [tab] LobeChat
>
> ### Configure in the UI
>
> 1. Open **Settings → AI Service Provider → OpenAI** (called "Language Model" in older versions).
> 2. Set **API Key** to your DreamTo API key (`sk-xxxx`).
> 3. Set **API Proxy Address** to `https://api.dreamto.ai/v1`.
> 4. In the model list, click **Fetch models** or add a model ID manually (e.g. `deepseek-v4.1-flash-1017`), then click **Check** to test connectivity.
>
> ### Environment variables for self-hosting
>
> ```bash theme={null}
> OPENAI_API_KEY=sk-xxxx
> OPENAI_PROXY_URL=https://api.dreamto.ai/v1
> ```
>
> `OPENAI_PROXY_URL` must include `/v1`.

> [tab] NextChat
>
> ### Configure in the UI
>
> 1. Open **Settings** and enable **Custom Endpoint**.
> 2. Set **Endpoint** to `https://api.dreamto.ai` (NextChat appends `/v1/chat/completions` automatically).
> 3. Set **API Key** to your DreamTo API key (`sk-xxxx`).
> 4. Enter model IDs in **Custom Models**, separated by commas, then select one from the model dropdown.
>
> ### Environment variables for self-hosting
>
> ```bash theme={null}
> OPENAI_API_KEY=sk-xxxx
> BASE_URL=https://api.dreamto.ai
> CUSTOM_MODELS=+deepseek-v4.1-flash-1017,+gpt-6.2-sol
> ```
>
> `BASE_URL` is the domain only; do not include `/v1`.

> [!WARNING]
>
> If you put a server-side API key into a publicly deployed chat app, anyone who can reach the page will spend your credits. Set an access password for the site (such as NextChat's `CODE` or LobeChat's access control), or have users enter their own key in the UI.

## FAQ

> [accordion] 401
>
> Make sure the key is correct. When self-hosting, check that the container's environment variables have taken effect (restart after changing them).

> [accordion] 404 / duplicated path
>
> LobeChat's proxy address includes `/v1`; NextChat's endpoint does not. Don't mix them up.


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