Skip to content

Zcode2API v1.0.0 - Initial Release

Choose a tag to compare

@D3-vin D3-vin released this 15 Sep 10:18
· 1 commit to main since this 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_tokens clamped 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

πŸ“± Contact


⚠️ Disclaimer: This tool is for educational purposes. Ensure compliance with Z.AI Terms of Service.