中文 | Official Website | Documentation
Multi-platform AI Service Unified Management Tool
Chat2API is a native desktop application that provides an OpenAI-compatible API for multiple AI service providers. It allows you to use any OpenAI-compatible client with DeepSeek, GLM, Kimi, MiniMax, Qwen, Z.ai and more across macOS, Windows, and Linux.
- OpenAI Compatible API: Provides standard OpenAI-compatible API endpoints for seamless integration
- Multi-Provider Support: Connect DeepSeek, GLM, Kimi, MiniMax, Qwen, Z.ai and more
- 🆕 Multi-turn Conversation: Full support for multi-turn dialogue with session management and context retention
- 🆕 Function Calling Support: Universal tool calling capability for all models via prompt engineering, compatible with Cherry Studio, Kilo Code, and other clients
- 🆕 Model Mapping: Flexible model name mapping with wildcard support and preferred provider/account selection
- 🆕 Custom Parameters: Support for custom HTTP headers to enable web search, thinking mode, and deep research features
- Dashboard Monitoring: Real-time request traffic, token usage, and success rates
- API Key Management: Generate and manage keys for your local proxy
- Model Management: View and manage available models from all providers
- Request Logs: Detailed request logging for debugging and analysis
- Proxy Configuration: Flexible proxy settings and routing strategies
- System Tray Integration: Quick access to status from menu bar
- Multilingual: English and Simplified Chinese support
- Modern UI: Clean, responsive interface with dark/light theme support
| Provider | Auth Type | OAuth | Models |
|---|---|---|---|
| DeepSeek | User Token | Yes | DeepSeek-V3.2 |
| GLM | Refresh Token | Yes | GLM-5 |
| Kimi | JWT Token | Yes | kimi-k2.5 |
| MiniMax | JWT Token | Yes | MiniMax-M2.5 |
| Qwen (CN) | SSO Ticket | Yes | Qwen3.5-Plus, Qwen3-Max, Qwen3-Flash, Qwen3-Coder, qwen-max-latest |
| Qwen AI (Global) | JWT Token | Yes | Qwen3.5-Plus, Qwen3-Max, Qwen3-VL-Plus, Qwen3-Coder-Plus, Qwen-Plus, Qwen-Turbo |
| Z.ai | JWT Token | Yes | GLM-5, GLM-4.7, GLM-4.6V, GLM-4.6 |
Download the latest release from GitHub Releases:
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | Chat2API-x.x.x-arm64.dmg |
| macOS (Intel) | Chat2API-x.x.x-x64.dmg |
| Windows | Chat2API-x.x.x-x64-setup.exe |
| Linux | Chat2API-x.x.x-x64.AppImage or .deb |
Requirements:
- Node.js 18+
- npm
- Git
# Clone the repository
git clone https://github.com/xiaoY233/Chat2API.git
cd Chat2API
# Install dependencies
npm install
# Start development server
npx electron-vite dev 2>&1npm run build # Build the application
npm run build:mac # Build for macOS (dmg, zip)
npm run build:win # Build for Windows (nsis)
npm run build:linux # Build for Linux (AppImage, deb)
npm run build:all # Build for all platformsAfter installation, launch Chat2API. You'll see the main dashboard.
- Navigate to Providers from the sidebar
- Click Add Provider button
- Select a built-in provider (e.g., DeepSeek)
- Enter your authentication credentials
For example, to get a DeepSeek token:
- Visit DeepSeek Chat
- Start any conversation
- Press
F12to open Developer Tools - Go to Application > Local Storage
- Find
userTokenand copy its value
- Navigate to Proxy Settings from the sidebar
- Set the port (default: 8080)
- Choose a load balancing strategy:
- Round Robin: Distributes requests evenly across accounts
- Fill First: Uses one account until limit is reached
- Failover: Automatically switches on failure
- Click Start Proxy
Using Python (OpenAI SDK):
from openai import OpenAI
client = OpenAI(
api_key="your-api-key",
base_url="http://localhost:8080/v1"
)
response = client.chat.completions.create(
model="DeepSeek-V3.2",
messages=[
{"role": "user", "content": "Hello, who are you?"}
]
)
print(response.choices[0].message.content)For security, you can enable API Key authentication:
- Go to API Keys page
- Click New API Key
- Enter a name and description
- Copy the generated key
| Dashboard | Providers |
|---|---|
![]() |
![]() |
| Proxy Settings | API Keys |
|---|---|
![]() |
![]() |
| Models | Session |
|---|---|
![]() |
![]() |
- Port: Change the proxy listening port (default: 8080)
- Routing Strategy: Round Robin or Fill First
- Auto-start: Launch proxy automatically on app startup
- Theme: Light, Dark, or System preference
- Language: English or Simplified Chinese
Chat2API/
├── src/
│ ├── main/ # Electron main process
│ │ ├── index.ts # App entry point
│ │ ├── tray.ts # System tray integration
│ │ ├── proxy/ # Proxy server management
│ │ ├── ipc/ # IPC handlers
│ │ └── utils/ # Utilities
│ ├── preload/ # Context bridge
│ └── renderer/ # React frontend
│ ├── components/ # UI components
│ ├── pages/ # Page components
│ ├── stores/ # Zustand state
│ └── hooks/ # Custom hooks
├── build/ # Build resources
└── scripts/ # Build scripts
| Component | Technology |
|---|---|
| Framework | Electron 33+ |
| Frontend | React 18 + TypeScript |
| Styling | Tailwind CSS |
| State | Zustand |
| Build | Vite + electron-vite |
| Packaging | electron-builder |
| Server | Koa |
Application data is stored in ~/.chat2api/ directory:
config.json- Application configurationproviders.json- Provider settingsaccounts.json- Account credentials (encrypted)logs/- Request logs
Due to macOS security mechanisms, apps downloaded outside the App Store may trigger this warning. Run the following command to fix it:
sudo xattr -rd com.apple.quarantine "/Applications/Chat2API.app"Check for updates in the About page, or download the latest version from GitHub Releases.
- Fork the project
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
GNU General Public License v3.0. See LICENSE for details.
This means:
- ✅ Free to use, modify, and distribute
- ✅ Derivative works must be open-sourced under the same license
- ✅ Must preserve original copyright notices
- Electron - Cross-platform framework
- React - UI framework
- TypeScript - Type-safe JavaScript
- Tailwind CSS - CSS framework
- Zustand - State management
- Koa - HTTP server





