Multi-platform AI Service Unified Management Tool — Web Edition
Chat2API Web enables zero-cost access to leading AI models by leveraging official web UIs. Deploy on any server (VPS, NAS, local machine) and manage everything from a browser. Supports DeepSeek, GLM, Kimi, MiniMax, Perplexity, Qwen, Z.ai and more — making any OpenAI-compatible client work out of the box.
- Pure Web Architecture — No Electron, no desktop app. Single Node.js process serves UI + API on one port
- OpenAI Compatible API — Standard
/v1/chat/completionsendpoint, works with any OpenAI client - Multi-Provider Support — DeepSeek, GLM, Kimi, MiniMax, Perplexity, Qwen, Qwen AI, Z.ai, Mimo
- Context Management — Sliding window, token limit, and summary compression strategies
- Function Calling — Universal tool calling via prompt engineering, compatible with Cherry Studio, Kilo Code, Cline
- Model Mapping — Flexible model name mapping with wildcard and preferred provider/account
- Load Balancing — Round-robin, fill-first, and failover strategies across multiple accounts
- API Key Management — Generate and manage keys for proxy authentication
- Dashboard — Real-time request traffic, latency, and success rate monitoring
- Request Logs — Detailed logging for debugging and analysis
- Multilingual — English and Simplified Chinese
- Dark/Light Theme — Modern responsive UI
| Provider | Auth Type | Models |
|---|---|---|
| DeepSeek | User Token | DeepSeek-V3.2, V4 Pro/Flash |
| GLM | Refresh Token | GLM-5, GLM-5-Flash |
| Kimi | JWT Token | Kimi-K2.6, K2.5 |
| MiniMax | JWT Token | MiniMax-M2.5 |
| Perplexity | Session Token | Auto, Turbo, GPT-5, Claude Sonnet/Opus |
| Qwen (CN) | SSO Ticket | Qwen3.5-Plus, Qwen3-Coder |
| Qwen AI (Global) | JWT Token | Qwen3.5-Plus, Qwen3-Max |
| Z.ai | JWT Token | GLM-5, GLM-4.7 |
| Mimo | Service Token | MiMo models |
Requirements: Node.js 20+, npm, Git
# Clone
git clone https://github.com/zhaiiker/Chat2API-web.git
cd Chat2API-web
# Install dependencies
npm ci
# Build frontend + backend
npm run build
# Start (default port 8080)
PORT=8080 node dist/backend/index.js
# Start (Windows PowerShell)
$env:PORT="8080"; $env:HOST="0.0.0.0"; node dist/backend/index.js
Open http://your-server:8080 in a browser. On first visit you'll set an administrator password.
Run with PM2 (recommended for production):
npm install -g pm2
# Start
PORT=8080 pm2 start dist/backend/index.js --name chat2api
# Auto-start on boot
pm2 startup
pm2 save
# View logs
pm2 logs chat2api# Build and start
docker compose up -d --build
# View logs
docker compose logs -f chat2apiOr with custom port:
PORT=9000 docker compose up -d --buildThe docker-compose.yml uses a named volume (chat2api-data) so data persists across container restarts.
npm ci
npm run devThis starts both backend (port 8080) and frontend dev server (port 5173) with hot reload.
All configuration is done via environment variables or the .env file:
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Server port |
HOST |
0.0.0.0 |
Bind address |
CHAT2API_DATA_DIR |
~/.chat2api |
Data directory |
CHAT2API_MANAGEMENT_SECRET |
(auto) | Pin management API secret |
CHAT2API_ENCRYPTION_KEY |
(auto) | Pin credential encryption key |
- Open the web UI → Add a provider (e.g. DeepSeek)
- Paste your token from the provider's website
- Create an API Key in the API Key Management page
- Point your AI client to
http://your-server:8080/v1with the API key
Works with Cherry Studio, Chatbox, OpenCat, Cline, Roo-Code, or any OpenAI-compatible tool.
