Skip to content

NextChat (ChatGPT-Next-Web) ​

NextChat is a widely-used open-source ChatGPT web client that supports custom OpenAI-compatible endpoints.

Official repository: https://github.com/ChatGPTNextWeb/NextChat Official docs: https://docs.nextchat.dev/quickstart/selfhost/env

UI configuration ​

  1. Click the Settings icon in the lower left
  2. Find the Custom Endpoint toggle in the settings panel and turn it on
  3. Fill in the connection details:
FieldValue
OpenAI API KeyYour codex_... or sk-... key
API Proxy URLhttps://codex.openai.com/v1
  1. Save and start a conversation to verify.

Self-hosted deployment ​

For self-hosted instances, configure via environment variables:

OPENAI_API_KEY=codex_your_api_key
BASE_URL=https://codex.openai.com/v1

Restart the service after setting the variables.

Custom models ​

In the settings panel's Model dropdown, you can manually enter gpt-5-codex-mini or any other available model name.

For self-hosted deployments, you can also pre-set the model list via the CUSTOM_MODELS environment variable:

bash
CUSTOM_MODELS=gpt-5-codex-mini

Notes ​

  • The API Proxy URL takes the base URL including /v1: https://codex.openai.com/v1
  • Available models can be found via GET /v1/models

OpenAI-compatible gateway integration docs