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

# NextChat

> Connect OpenPAI in NextChat (ChatGPT-Next-Web)

[NextChat](https://github.com/ChatGPTNextWeb/NextChat) is a lightweight open-source ChatGPT web UI with one-click Vercel deployment.

## Deployment

### One-click Vercel deploy

On the [NextChat repo](https://github.com/ChatGPTNextWeb/NextChat), click **Deploy with Vercel**,
then set these environment variables in Vercel:

| Variable            | Value                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------------- |
| `OPENAI_API_KEY`    | `sk-XXXXXXXXXXXXXXXX`                                                                    |
| `BASE_URL`          | `https://openp.ai`                                                                       |
| `CUSTOM_MODELS`     | `+gpt-5.5,+gpt-5.4-mini,+claude-opus-4-8,+gemini-3.1-pro-preview,+gemini-3.1-flash-lite` |
| `HIDE_USER_API_KEY` | `1` (optional, prevents frontend users from changing the key)                            |

After deployment, visit the domain Vercel provides.

### Docker

```bash theme={null}
docker run -d -p 3000:3000 \
  -e OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXX \
  -e BASE_URL=https://openp.ai \
  -e CUSTOM_MODELS="+gpt-5.5,+claude-opus-4-8,+gemini-3.1-pro-preview" \
  --name nextchat \
  yidadaa/chatgpt-next-web
```

## Configure in the web UI (no restart needed)

After opening NextChat:

1. Gear icon at the bottom-left → open settings.
2. **Endpoint / Base URL**: `https://openp.ai`
3. **API Key**: `sk-XXXXXXXXXXXXXXXX`
4. **Custom models**: `+gpt-5.5,+claude-opus-4-8,+gemini-3.1-pro-preview`
5. Click **Check availability** → save once it passes.

## Vision chat

NextChat has a built-in image upload button. When you choose a vision model like `gpt-5.5` / `claude-opus-4-8` / `gemini-3.1-pro-preview`,
you can drag an image directly into the input box, and OpenPAI passes it through as that model's vision input.

## Notes

* `BASE_URL` should **not** include `/v1` — NextChat completes the path automatically.
* In `CUSTOM_MODELS`, the `+` prefix adds a model and `-` hides one.
* For a shared multi-user deployment, set an access `CODE` / password to prevent key leakage.
