GLM-ZAI-2API v1.0.0 - OpenAI Proxy for Z.AI
GLM-ZAI-2API v1.0.0
OpenAI-compatible proxy for Z.AI (GLM models) β single Go binary for all platforms.
π₯ Features
- π Single binary β server, captcha solver, and token store in one executable
- π OpenAI-compatible β
/v1/chat/completionsand/v1/modelsendpoints - π§© Tool calling β full function calling support for Kiro and other IDEs
- π‘οΈ In-process captcha β Aliyun Captcha V3 solver (no external dependencies)
- π Embedded dashboard β live HTML status UI at http://localhost:5082
- π Cross-platform β Windows, macOS (Intel/ARM), Linux
- π¦ Standalone β pure-Go SQLite, zero CGO dependencies
π‘ Works with Kiro out of the box! Perfect for AI-assisted development.
π Supported Models
- glm-4.7 β works in guest mode (no token required)
- GLM-5-Turbo β requires ZAI_TOKEN
- GLM-5v-Turbo β requires ZAI_TOKEN (vision model)
- GLM-5.1 β requires ZAI_TOKEN
- glm-5.2 β requires ZAI_TOKEN (sometimes available)
π₯ Downloads
Main API Server
| Platform | Download | Size |
|---|---|---|
| Windows x64 | glm-zai-2api-windows-amd64.exe |
~10.4 MB |
| Linux x64 | glm-zai-2api-linux-amd64 |
~10.2 MB |
| macOS Intel | glm-zai-2api-macos-amd64 |
~10.4 MB |
| macOS Apple Silicon | glm-zai-2api-macos-arm64 |
~9.8 MB |
Token Collector
| Platform | Download | Size |
|---|---|---|
| Windows x64 | token-collector-windows-amd64.exe |
~11.0 MB |
| Linux x64 | token-collector-linux-amd64 |
~10.8 MB |
| macOS Intel | token-collector-macos-amd64 |
~11.0 MB |
| macOS Apple Silicon | token-collector-macos-arm64 |
~10.4 MB |
π§ Quick Start
1. Download
Download the appropriate binary for your platform from the assets below.
2. Collect Device Tokens
The captcha solver needs a pool of device tokens:
# Windows
.\token-collector-windows-amd64.exe --count 750 --out tokens.sqlite
# Linux/macOS
chmod +x ./token-collector-*
./token-collector-* --count 750 --out tokens.sqlite3. Configure (Optional)
cp .env.example .env
# Edit .env to set ZAI_TOKEN for GLM-5 models4. Run
# Windows
.\glm-zai-2api-windows-amd64.exe
# Linux/macOS
chmod +x ./glm-zai-2api-*
./glm-zai-2api-*5. Access
- Dashboard: http://localhost:5082
- API: http://localhost:5082/v1/chat/completions
π§ Kiro Configuration
Add as custom OpenAI endpoint in Kiro:
Base URL: http://localhost:5082/v1
API Key: d3vin
Model: glm-4.7 (guest) or GLM-5.1 (with token)
Full tool calling support works out of the box! π
π‘ Getting ZAI_TOKEN (for GLM-5 models)
- Open https://chat.z.ai and log in
- DevTools (F12) β Application β Local Storage β
token - Copy the value (starts with
eyJ...) - Add to
.env:ZAI_TOKEN=eyJ...
π Documentation
- README: English | Π ΡΡΡΠΊΠΈΠΉ
- Repository: https://github.com/D3-vin/GLM-ZAI-2API
π± Contact
- Telegram: @D3_vin
- Author: @D3vin_dev
- GitHub: https://github.com/D3-vin/GLM-ZAI-2API
π What's New in v1.0.0
Initial release with:
- Complete OpenAI API compatibility
- Tool calling adapter for function calling
- In-process Aliyun Captcha V3 solver
- Cross-platform builds for 4 platforms
- Token collector utility
- Embedded web dashboard
- Session management with conversation history
- Multiple model support (GLM-4.7 to GLM-5.2)
License: Provided as-is for educational and interoperability purposes.