# NextChat Integration Guide

NextChat (ChatGPT-Next-Web) is an open-source cross-platform chat application that supports both web deployment and desktop clients. This guide explains how to configure it to call models through the UModelverse platform.

## **System Requirements**

-   A network connection.
    
-   For self-hosting: [Docker](https://www.docker.com/) or [Node.js](https://nodejs.org/) (either one).
    

## **1. Obtain an API Key**

Visit the [UModelverse Console](https://console.ucloud.cn/modelverse/api) to obtain your API key. For available models, see the [supported models](https://api-us-ca.umodelverse.ai/v1/models) on the UModelverse platform.

## **2. Deploy and Configure**

NextChat integrates with OpenAI-compatible services via environment variables. Replace `YOUR_API_KEY` with your UModelverse API key.

### Option 1: Docker Deployment

```
docker run -d -p 3000:3000 \
  -e OPENAI_API_KEY=YOUR_API_KEY \
  -e BASE_URL=https://api-us-ca.umodelverse.ai \
  -e CUSTOM_MODELS="+claude-sonnet-4-6,+gpt-5.2" \
  yidadaa/chatgpt-next-web
```

Once deployed, open `http://localhost:3000` in your browser to start using it.

### Option 2: Run Locally

Create a `.env.local` file in the project root directory, add the following content, and then run `yarn dev`:

```
OPENAI_API_KEY=YOUR_API_KEY
BASE_URL=https://api-us-ca.umodelverse.ai
CUSTOM_MODELS=+claude-sonnet-4-6,+gpt-5.2
```

> Note: Set `BASE_URL` to the platform's root address (NextChat will automatically append `/v1`). `CUSTOM_MODELS` is used to add the [supported models](https://api-us-ca.umodelverse.ai/v1/models) from the UModelverse platform to the dropdown list. Prefix each model name with `+`, and separate multiple entries with commas.

## **3. Use a Model**

After opening the page, use the model selector above the chat input box to switch to an added UModelverse model and start chatting.

## **Frequently Asked Questions**

### Authentication failure or unable to connect?

Please verify each of the following:

1.  `OPENAI_API_KEY` is from the UModelverse platform, copied in full with no extra spaces.
    
2.  `BASE_URL` is set to `https://api-us-ca.umodelverse.ai`.
    
3.  The model listed in `CUSTOM_MODELS` is one of the [supported models](https://api-us-ca.umodelverse.ai/v1/models) on the UModelverse platform and has been selected in the model selector.
