Using YuJun in NextChat

NextChat (formerly ChatGPT-Next-Web) is a well-known open-source AI client in the Chinese community, featuring "one-click deployment + cross-platform + PWA," allowing you to quickly deploy your own AI website on Vercel / Cloudflare / Docker. It natively supports custom OpenAI-compatible endpoints, enabling access to YuJun, with one API Token accessing over 60 large models including Claude, GPT, Gemini, Grok, DeepSeek, Kimi, GLM, etc. This article describes the configuration process.

Application Process

To integrate YuJun into NextChat, first go to the YuJun Console to obtain your API Token for backup.

If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in. After logging in or registering, you will be automatically returned to the current page.

You will receive a free quota upon your first application, allowing you to experience YuJun's model services for free.

Download NextChat

You can use the desktop version (download .exe / .dmg / AppImage from the Releases page), the Web online version, or deploy it yourself on Vercel / Cloudflare / Docker (see the advanced section below).

Configure YuJun

Start NextChat and go to Settings → Model Services:

Field Value Description
Model Provider OpenAI Use OpenAI compatible protocol
OpenAI API URL https://api.acedata.cloud Only fill in the root domain, do not include /openai or /v1
API Key Your YuJun Token Token copied from the console

NextChat will automatically append /v1/chat/completions to the API URL, so only the root domain needs to be filled in:

API URL Actual Request Result
https://api.acedata.cloud https://api.acedata.cloud/v1/chat/completions Correct
https://api.acedata.cloud/openai https://api.acedata.cloud/openai/v1/chat/completions 404 (no /v1 under /openai)
https://api.acedata.cloud/openai/v1 https://api.acedata.cloud/openai/v1/v1/chat/completions 404

In the "Custom Model Names" box, fill in the models separated by English commas. NextChat supports special syntax: +model_name to add, -model_name to hide, model_name=display_name to customize the display name, -all to hide all first. The cleanest writing is recommended:

-all,+gpt-5=GPT-5,+claude-opus-4-8=Claude Opus 4.8,+gemini-3.1-pro=Gemini 3.1 Pro,+grok-4=Grok 4,+deepseek-v3=DeepSeek V3

The following model IDs have been verified as available through YuJun GET /v1/models and POST /v1/chat/completions:

Family Model ID Notes
GPT gpt-5, gpt-5-mini, gpt-4o OpenAI flagship / cost-effective / classic multimodal
Claude claude-opus-4-8, claude-sonnet-4-6 Anthropic flagship / balanced
Gemini gemini-3.1-pro, gemini-3-flash-preview Google multimodal / fast
Grok grok-4 xAI, natively connected
DeepSeek deepseek-v3 High cost-performance, Chinese-friendly
Kimi kimi-k3 Reasoning, vision, long context

For a complete list of models, please refer to the YuJun service documentation.

Verification of Integration

If you are unsure whether the issue lies with NextChat or the network, you can first verify the endpoint directly using curl (replace {token} with your Token):

curl -X POST 'https://api.acedata.cloud/v1/chat/completions' \
  -H 'Authorization: Bearer {token}' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "ping"}]
  }'

If you receive an OpenAI-compatible chat.completion object, it indicates that both the Token and endpoint are ready; if you receive HTTP 403 used_up, it means the Token is valid but the balance is insufficient, and you can recharge at the console.

Advanced: One-Click Deployment to Your Own Domain

NextChat supports deploying your own AI website. For example, using Docker (replace {token} with your Token):

docker run -d \
  --name nextchat \
  -p 3000:3000 \
  -e OPENAI_API_KEY={token} \
  -e BASE_URL=https://api.acedata.cloud \
  -e CODE=your-password \
  -e CUSTOM_MODELS="-all,+gpt-5,+claude-opus-4-8,+gemini-3.1-pro,+grok-4,+deepseek-v3" \
  yidadaa/chatgpt-next-web

When deploying on Vercel / Cloudflare, configure the same OPENAI_API_KEY, BASE_URL, CODE, and CUSTOM_MODELS in the project's environment variables. The CODE supports multiple access passwords separated by commas for usage statistics. For a complete explanation of the above environment variables (the default BASE_URL is https://api.openai.com, and the +/-/=/-all/+all syntax for CUSTOM_MODELS), please refer to the NextChat official README.

Frequently Asked Questions

Prompt 404 Not Found

This usually occurs when the API URL is written as .../openai or .../openai/v1. Change it to https://api.acedata.cloud so that NextChat can append /v1/chat/completions itself.

Check the format of CUSTOM_MODELS, each model must be preceded by +; if -all is used, ensure that the required models are added back with +.

Prompt 401 Unauthorized

Please confirm that the API Key pasted is the YuJun Token (without the Bearer prefix and no extra spaces), and that the balance of the associated application is sufficient.

Learn More