Zcode2API v1.0.0 - Initial Release
Zcode2API v1.0.0 - Initial Release
OpenAI & Anthropic-compatible proxy for Z.AI with JWT account pool, automatic failover, captcha solving, and smart proxy rotation.
π What's New
- Dual Protocol Support β Anthropic Messages (
/v1/messages) + OpenAI Chat (/v1/chat/completions) in one server - JWT Account Pool β automatic rotation with smart failover on quota exhaustion
- Embedded Captcha Solver β integrated Node.js solver for Aliyun captchas (auto-extracts on first run)
- Smart Proxy Management β sticky/rotate modes, auto-pause on failures, IP probing
- Live Dashboard β web UI for account management, quota monitoring, proxy profiles
- Dynamic Model Catalog β synced from account billing (currently GLM-5.3 & GLM-5.3-Flash)
- Async Ticket API β SSE-based async endpoint for long-running requests
- OAuth Integration β login to Z.AI directly from dashboard, auto-claim plans
- Cross-Platform β Windows, macOS (Intel/ARM), Linux
π₯ Downloads
Main Binary
| Platform | Download | Size |
|---|---|---|
| Windows x64 | zcode2api-windows-amd64.exe |
~24.5 MB |
| Linux x64 | zcode2api-linux-amd64 |
~24.2 MB |
| macOS Intel | zcode2api-macos-amd64 |
~24.4 MB |
| macOS Apple Silicon | zcode2api-macos-arm64 |
~24.0 MB |
π Quick Start
# Download and extract
# Copy .env.example to .env and edit AUTH_TOKEN
# Run server
./zcode2api-*
# Dashboard: http://localhost:3101
# API: http://localhost:3101/v1/chat/completionsπ§ OpenAI Client Configuration (Cursor, OpenCode, etc.)
Base URL: http://localhost:3101/v1
API Key: d3vin # your AUTH_TOKEN
Model: GLM-5.3
π§ Anthropic Client Configuration (Claude Code)
Base URL: http://localhost:3101
API Key: d3vin # your AUTH_TOKEN
Model: GLM-5.3
Works out of the box with streaming, function calling, and context management!
π Key Features
Account Management:
- OAuth login to Z.AI from dashboard
- Bulk JWT import (multi-line paste)
- File import (
tokens.txt) - Import from manager
accounts.db(migrates device-ids & API keys) - Auto warm-up and plan claiming
- Status tracking: Active/Standby/Cooling/Exhausted/Revoked/Expired/Disabled
- Export/import pool with device identities (JSON)
Smart Failover:
- Model exhaustion (429) β mark dead until quota reset, try next account
- Load errors (3012/3007/3009/3010/529) β pause, rotate egress, fresh captcha
- 429 with
Retry-Afterβ wait (capped at 120s) up to 5 retries max_tokensclamped to 131072 (origin limit)
Proxy Management:
- Sticky/rotate modes
- Assign proxy to specific account (sticky egress)
- Auto-pause after 2 probe failures
- IP probing with configurable delay
- Supported formats: http, https, socks5 (with/without auth)
Dashboard:
- Web UI at http://localhost:3101
- Real-time account quotas and status
- Proxy profile management
- Settings (change tokens on-the-fly, persists to DB)
- Health monitoring
Requirements:
- Node.js on PATH (for captcha solver)
- Go 1.25+ (if building from source)
π Documentation
- README: English | Π ΡΡΡΠΊΠΈΠΉ
- Repository: https://github.com/D3-vin/Zcode2Api
π± Contact
- Telegram: @D3_vin
- Author: @D3vin_dev