---
url: 'https://docs.byesu.com/en/clients/nextchat.md'
description: >-
  Set up byesu API in NextChat via Custom Endpoint UI or Docker/Vercel env vars:
  call Claude 5.5, GPT-6.2, Gemini 4, and DeepSeek V4 with one API key.
---

# Connect NextChat (ChatGPT-Next-Web) to byesu API

Connect **NextChat** (desktop client, web app, Vercel, or Docker deployment) to **byesu** to access Claude, GPT, Gemini, DeepSeek, and Grok models with one pay-as-you-go API key.

::: tip Quick configuration

* **UI Custom Endpoint (OpenAI)**: `https://byesu.com/v1` *(or `https://byesu.com` if the input placeholder omits `/v1`)*
* **UI Custom Endpoint (Anthropic)**: `https://byesu.com`
* **Docker / Vercel `BASE_URL`**: `https://byesu.com` *(backend proxy appends `/v1` automatically)*
* **API Key**: your byesu token (`sk-...`, created in the default `auto` group)
* **Custom Models**: `claude-opus-5-5,claude-sonnet-5-5,gpt-6.2-sol,deepseek-v4-pro`
  :::

## Method 1: NextChat Desktop / Web UI Setup

1. Create an `sk-...` token in the [byesu Console](https://byesu.com) under the default **`auto`** group (see [Choosing a Group](/en/guide/groups)).
2. Open NextChat → click **Settings** (bottom-left gear icon) → enable **Custom Endpoint**.
3. Choose your preferred protocol:
   * **OpenAI (all models)**: set **Endpoint Address** to `https://byesu.com/v1` and **API Key** to your `sk-...` token. *(Note: inspect the grey placeholder in your NextChat version — if the placeholder reads `https://api.openai.com` without `/v1`, enter `https://byesu.com` so NextChat does not double `/v1/v1`.)*
   * **Anthropic (native Claude + `0.1x` Prompt Caching)**: set **Anthropic Endpoint** to `https://byesu.com` and **Anthropic API Key** to your `sk-...` token ([Prompt Caching](/en/guide/prompt-caching)).
4. In **Custom Models**, enter a comma-separated list of active model IDs:
   ```text
   claude-opus-5-5,claude-sonnet-5-5,gpt-6.2-sol,deepseek-v4-pro
   ```

## Method 2: Docker & Vercel Environment Variables

When deploying NextChat via Docker or Vercel, set `BASE_URL=https://byesu.com` **without `/v1`** — NextChat's server-side proxy appends `/v1` automatically:

```bash
docker run -d --name nextchat -p 3000:3000 \
  -e BASE_URL="https://byesu.com" \
  -e OPENAI_API_KEY="sk-YOUR_BYESU_TOKEN" \
  -e CODE="your-access-password" \
  -e CUSTOM_MODELS="-all,+claude-opus-5-5,+claude-sonnet-5-5,+gpt-6.2-sol,+gemini-4-argon,+deepseek-v4-pro" \
  yidadaa/chatgpt-next-web
```

* Using `-all,+...` in `CUSTOM_MODELS` hides NextChat's built-in legacy model list and displays only the models you specify.
* On Vercel, add the exact same `BASE_URL`, `OPENAI_API_KEY`, `CODE`, and `CUSTOM_MODELS` variables under **Project Settings → Environment Variables** and redeploy.
* For `glm-5.3` or `kimi-k3`, create a token in the `Glm` or `Kimi` group. Billing is pay-as-you-go per token with live rates displayed in the [byesu Console](https://byesu.com) after sign-in.

## Troubleshooting & Benchmarks

* **404 Not Found (`/v1/v1/chat/completions` or missing `/v1`)**: in Docker/Vercel env vars always use `BASE_URL=https://byesu.com`; in the UI **Custom Endpoint** field, match whether the grey placeholder includes `/v1`.
* **401 invalid\_api\_key**: verify `OPENAI_API_KEY` (`sk-...`) and enter your `CODE` access password in NextChat's login screen if self-hosted ([OpenAI 401 fix](/en/errors/openai-api-401-invalid-api-key)).
* **No available channel / 429**: check exact model IDs in `CUSTOM_MODELS` ([no available channel](/en/errors/no-available-channel-error)), [OpenAI 429](/en/errors/openai-api-429-rate-limit-vs-quota), and [live production benchmarks](https://byesu.com/benchmarks).
