Connect NextChat to APIVAI
NextChat (ChatGPT-Next-Web) is one of the most popular
one-click-deploy ChatGPT-style web UIs. It speaks the OpenAI-compatible format, so you can run it on
APIVAI's Claude and GPT models by pointing the API endpoint at APIVAI — in the UI or via env vars.
Option A — in Settings
- Open NextChat → Settings.
- Find Custom Endpoint (自定义接口) and enable it.
- Set:
-
API Endpoint / 接口地址:
https://api.apivai.com - API Key / 密钥: your APIVAI key
-
API Endpoint / 接口地址:
- (Optional) set Custom Models to the names you want.
- Save, start a chat, and pick a model.
Option B — environment variables (self-hosted / Vercel / Docker)
OPENAI_API_KEY=your_apivai_key
BASE_URL=https://api.apivai.com
# optional: expose specific models
CUSTOM_MODELS=+claude-sonnet-4-6,+gpt-5.5
Redeploy/restart; NextChat now routes through APIVAI.
Confirm models
curl -s https://api.apivai.com/v1/models \
-H "Authorization: Bearer $APIVAI_API_KEY"
Use a returned name in Custom Models.
Troubleshooting
-
401 / no response — check the endpoint (
https://api.apivai.com) and key. -
model_not_found— set a name from/v1/modelsin Custom Models. -
Wrong base path — NextChat appends
/v1/...; use the host, not/v1, in BASE_URL.
Why APIVAI for NextChat
One endpoint gives NextChat both Claude and GPT models at a fraction of list price, pay-as-you-go,
with crypto/USDT/Alipay and no VPN — ideal for a self-hosted personal or team chat.
FAQ
Does NextChat work with APIVAI? Yes — set the custom API endpoint to https://api.apivai.com
and your APIVAI key, in Settings or via BASE_URL/OPENAI_API_KEY.
Can I use Claude and GPT both? Yes — one key, both families; list them in Custom Models.
Do I need to change code? No — it's a settings/env change.
Get started
Point NextChat's endpoint at APIVAI, add your key, set a model from /v1/models. Examples:
APIVAI examples repo.
Top comments (0)