Use TeamoRouter with NextChat

NextChat (formerly ChatGPT Next Web) is an open-source chat UI. Run it as a desktop app or deploy your own copy on Vercel or Docker, then point it at TeamoRouter to use every model in the catalog with one API key.

Checked on 2026-11-07 against the NextChat source code at v2.16.1 (the latest release) and the current main branch; the address handling is the same in both.

1. Before you start

Create an API key in the TeamoRouter console. It starts with sk-teamo-.

2. Set it up in Settings

This works in the desktop app and on any NextChat web page, including one you host.

  1. Open Settings (gear icon, bottom left).

  2. Turn on Custom Endpoint. The desktop app has no such switch; it's always on there.

  3. Set Model Provider to OpenAI.

  4. OpenAI Endpoint: https://api.teamorouter.com — without /v1. NextChat appends /v1/chat/completions itself.

  5. OpenAI API Key: your sk-teamo- key.

  6. Custom Models: TeamoRouter model IDs separated by commas. Start with -all to hide NextChat's built-in models, whose IDs don't match TeamoRouter's:

    text
    -all,gpt-6.1-sol,gpt-6-luna,gemini-4-argon,deepseek-v4-pro,glm-5.3
    
  7. Back in a chat, click the model button above the input box and pick a TeamoRouter model. Until you do, chats stay on NextChat's own default model.

Claude models

NextChat has a native Anthropic provider. Use it for Claude so requests go to /v1/messages:

  1. In Settings, switch Model Provider to Anthropic. Your OpenAI settings stay saved.

  2. Endpoint Address: https://api.teamorouter.com (no /v1; NextChat appends /v1/messages).

  3. Anthropic API Key: the same sk-teamo- key.

  4. In Custom Models, add Claude IDs with an @Anthropic suffix:

    text
    -all,gpt-6.1-sol,deepseek-v4-pro,claude-sonnet-5-5@Anthropic,claude-opus-5-5@Anthropic,claude-haiku-5-5@Anthropic
    

Without @Anthropic, NextChat sends a Claude model through the OpenAI endpoint. That works too, but this format may not use prompt caching and may not show Claude's thinking.

3. Your own deployment: environment variables

If you host NextChat, set TeamoRouter on the server so your users don't have to enter anything:

bash
OPENAI_API_KEY=sk-teamo-xxxxxx
BASE_URL=https://api.teamorouter.com
CUSTOM_MODELS=-all,+gpt-6.1-sol,+deepseek-v4-pro,+claude-sonnet-5-5@Anthropic
DEFAULT_MODEL=gpt-6.1-sol
CODE=your-password
# Needed for models marked @Anthropic
ANTHROPIC_API_KEY=sk-teamo-xxxxxx
ANTHROPIC_URL=https://api.teamorouter.com
  • BASE_URL is the host without /v1. NextChat's server adds /v1/chat/completions.

  • In CUSTOM_MODELS, + adds a model and -all hides the built-in list.

  • CODE is an access password. Set one on any public deployment, or anyone who finds the URL can spend your TeamoRouter balance.

  • ANTHROPIC_URL is also the host without /v1 (the server adds /v1/messages). Claude models marked @Anthropic use ANTHROPIC_API_KEY, not OPENAI_API_KEY.

With Docker:

bash
docker run -d -p 3000:3000 \
  -e OPENAI_API_KEY=sk-teamo-xxxxxx \
  -e BASE_URL=https://api.teamorouter.com \
  -e CUSTOM_MODELS="-all,+deepseek-v4-pro" \
  -e CODE=your-password \
  yidadaa/chatgpt-next-web

On Vercel, add the same variables in the project's environment variables and redeploy.

Family Model ID In Custom Models
Claude claude-sonnet-5-5, claude-opus-5-5, claude-haiku-5-5 Add @Anthropic, e.g. claude-sonnet-5-5@Anthropic
GPT gpt-6.1-sol, gpt-6-luna As is
Gemini gemini-4-argon As is
DeepSeek deepseek-v4-pro, deepseek-v4-flash As is
GLM glm-5.3 As is
Kimi kimi-k3.1-pro As is
Qwen qwen3.8-max As is

Use model IDs exactly as written, with no vendor prefix. The full list and current prices are in the model list.

5. Common errors

What you see Cause Fix
401, API key incomplete Key copied with missing characters Copy the full sk-teamo- key again
402 (400 on the OpenAI format), wallet balance is insufficient Balance is $0 Top up, from $5
404 "No gateway route matched this request path", a 301 redirect, or an HTML page instead of a reply The endpoint has /v1 or another path after the host, so NextChat calls something like /v1/v1/chat/completions Set the endpoint (or BASE_URL) to exactly https://api.teamorouter.com
Model not found or not available Typo in the model ID, a vendor prefix, or the chat is still on NextChat's default model Copy IDs from the model list and pick a TeamoRouter model in the chat
403 "you are not allowed to use … model" (your own deployment) The model isn't in the server's CUSTOM_MODELS Add it with + and redeploy
"empty access code" or "wrong access code" Custom Endpoint is off, so the request went to the deployment's own server, which has a password Turn on Custom Endpoint, or enter the deployment's access code
Ready? Three steps to startLog in to the console · top up · create an API key
DiscordDapatkan bantuan komunitas secara instan