How b3hnamr/autozcoder works
AutoZCoder is a self-hosted ZCode gateway with an optional account generator and Cloudflare mail worker. The main workflow is client request → compatible API endpoint → shared chat service → account selection and ZCode transport → response; operators also manage accounts and inspect usage through the dashboard. Account generation is a separate optional workflow, with CAPTCHA tooling and proxy support. The README and source index establish the product branches, but several routes and integrations were not excerpted, so uncertain connections are omitted.
Main entry points: main.py Account generator · app.py HTTP application · service.py Chat service · pool.py Account pool
Components 22
Client APIs
- OpenAI API
zcode_gateway/api_openai.py - Anthropic API
zcode_gateway/api_anthropic.py
Request Routing
- Chat service
zcode_gateway/service.py - Model registry
zcode_gateway/registry.py - ZCode transport
zcode_gateway/upstream.py
Account Management
- Account pool
zcode_gateway/pool.py - Account files
zcode_gateway/accounts_dir.py - Account import
zcode_gateway/zcode_accounts.py
Operations
- Web dashboard
zcode_gateway/api_dash.py - Admin API
zcode_gateway/api_admin.py - HTTP application
zcode_gateway/app.py - Configuration
zcode_gateway/config.py
Account Generation
- Generator controls
zcode_gateway/generator.py - Account generator
generator/main.py - Plan checker
generator/plan_check.py - Invite claims
generator/invite_claim.py - Proxy pool
generator/proxy_pool.py - CAPTCHA minting
tools/captcha-mint/captcha.ts - Cloudflare mail worker
mail-worker/src/index.js
Other components
- API client
- ZCode API
- Operator
Connections 24
- API client → OpenAI API: sends request
- API client → Anthropic API: sends request
- OpenAI API → Chat service: handles request
zcode_gateway/app.py - Anthropic API → Chat service: handles request
zcode_gateway/app.py - Chat service → Model registry: resolves model
zcode_gateway/service.py - Chat service → Account pool: selects account
zcode_gateway/service.py - Chat service → ZCode transport: sends completion
zcode_gateway/service.py - ZCode transport → ZCode API: calls upstream
- Account pool → Account files: loads accounts
zcode_gateway/pool.py - Account pool → Account import: uses credentials
zcode_gateway/pool.py - Operator → Web dashboard: manages pool
- Operator → Admin API: administers gateway
- HTTP application → OpenAI API: registers routes
zcode_gateway/app.py - HTTP application → Anthropic API: registers routes
zcode_gateway/app.py - HTTP application → Web dashboard: registers routes
zcode_gateway/app.py - HTTP application → Admin API: registers routes
zcode_gateway/app.py - HTTP application → Configuration: loads settings
zcode_gateway/app.py - Operator → Generator controls: starts generation
- Generator controls → Account generator: drives generator
- Account generator → Plan checker: checks plans
generator/main.py - Account generator → Invite claims: claims invite
generator/main.py - Account generator → Proxy pool: uses proxies
generator/main.py - Account generator → CAPTCHA minting: solves CAPTCHA
- Account generator → Cloudflare mail worker: uses mail service