ollama
Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
- 188k
- Go
- MIT
- 1 d ago
A self-hosted gateway for the ZCode coding-plan API (GLM-5.3 - GLM-5.3-Flash), bundled with an account generator
Repo B3hnamR/AutoZcoder, read from GitHub 1 h ago. B3hnamR has not joined Take My Repo.
B3hnamR/AutoZcoder is a public repo on GitHub by B3hnamR. A self-hosted gateway for the ZCode coding-plan API (GLM-5.3 - GLM-5.3-Flash), bundled with an account generator. It declares the MIT license on GitHub. It is written mainly in Python, has 53 stars and last changed on 2026-11-17. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-23.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
A self-hosted gateway for the ZCode coding-plan API (GLM-5.3 / GLM-5.3-Flash), bundled with an account generator and a Cloudflare mail worker.
It exposes OpenAI- and Anthropic-compatible endpoints locally, pools multiple ZCode accounts behind one key, and can create new accounts for you on demand. Runs on Windows (desktop exe) and Linux (headless VPS).
Download latest · Release notes · 2.0.12 · MIT license
Quick start · Connect a client · Accounts · Features · Documentation · Security
Unofficial, independent project. Not affiliated with ZCode or z.ai.
Connect familiar clients. OpenAI Chat Completions and native Anthropic Messages, with streaming, tools and reasoning support.
Manage the pool. Route across accounts, track model quotas and plan expiry,
and inspect usage in the web dashboard at /dash.
Generate when needed. Optional browser-based account generation, proxy tooling and a Cloudflare mail worker live alongside the gateway, not in your client.
Choose where the gateway runs. Then add an account and connect your client. Account generation is optional.
| Platform | Start here | Requirements |
|---|---|---|
| Windows desktop | Download ZcodeGateway.exe | Portable app; no Python needed for the gateway |
| Linux VPS | Install over SSH | x86_64, systemd, glibc 2.35+ |
| From source | Run locally | Python 3.10+; 3.13 recommended |
[!IMPORTANT] Keep the admin key private: it grants code-execution authority as the gateway's OS user. Use a client key for coding clients. Read Security before exposing the gateway beyond loopback.
Double-click ZcodeGateway.exe from the latest release. On first launch it
writes its own config.yaml, accounts/, logs/ and gateway.db beside
the executable (portable; move the folder anywhere). If that folder is not
writable, data falls back to %LOCALAPPDATA%/ZcodeGateway. Default port 8788.
Dashboard: http://127.0.0.1:8788/dash
In Settings → Check for updates now, packaged Windows builds offer Download update, then a separate Restart to apply action. Downloading does not stop work; applying requires generator jobs, claims, proxy scans and client requests to be idle. The helper retains a backup and requires a health response matching a per-launch nonce within 60 seconds, rolling back on startup failure or timeout. This confirms startup, not successful inference or generation.
On an x86_64 Linux VPS with systemd and glibc 2.35+ (Ubuntu 22.04+ or a compatible distribution), run this single command over SSH:
curl -fsSL https://github.com/B3hnamR/AutoZcoder/releases/latest/download/install-linux.sh | sudo bash -s -- install
This always downloads the installer from the latest published release, not
an unreleased file from master. No version number needs changing when a new
release is published. It executes the installer as root; review it first if
your policy requires it. The installer obtains and checksum-verifies the release binary,
creates private keys/configuration, installs the generator environment,
Chromium/Xvfb and private Node/Wrangler, and starts an unprivileged service.
It does not import accounts or deploy a Cloudflare mail worker for you.
The default dashboard is https://<server-ip>:8443/dash. Ports 80/tcp
(certificate validation/renewal) and 8443/tcp must be reachable; read the
final report for the admin key and whether the issued certificate is trusted
or self-signed. No nginx is installed. Use 2 reliable vCPUs and 4 GB RAM
for comfortable one-browser generation. Small servers receive a confirmation
warning; gateway-only operation can use less.
sudo autozcoder # interactive manager
sudo autozcoder status # service and dashboard status
sudo autozcoder logs # service logs
sudo autozcoder update # verified update with deployment rollback
The one-line command is for installation. For an existing installation, use
sudo autozcoder update to obtain the latest release while preserving settings
and account data. Stop active work and keep a private backup before updating.
Default data location: /opt/zcodegateway. Back it up privately before
maintenance; sudo autozcoder info displays secrets. For manual/source installs,
ARM systems, firewall/TLS choices, updates and uninstall precautions, see the
VPS deployment guide.
From a checkout of this repository, on Windows:
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements/windows.txt
.\.venv\Scripts\python.exe -m zcode_gateway.main
On Linux, from the repository root:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements/server.txt
.venv/bin/python -m zcode_gateway.main
The standard virtual
environment is .venv/; .local/ is reserved for ignored local runtime data,
build products and scratch files, not Python packages. Packaged installs retain
their portable data layout beside the executable; this repository reorganization
does not move or migrate existing runtime files.
First add an account. Copy a client key from the Server tab, not the admin key.
| Setting | Local default |
|---|---|
| API base URL | http://127.0.0.1:8788/v1 |
| OpenAI endpoints | /v1/chat/completions, /v1/completions, /v1/models |
| Anthropic endpoint | /v1/messages |
| Models | GLM-5.3, GLM-5.3-Flash |
For a VPS, use your HTTPS server address instead of loopback. Clients differ
in whether they append /v1; configure the base URL so the final request uses
the endpoint above. See the protocol reference.
Example OpenAI Chat Completions request body:
{
"model": "GLM-5.3-Flash",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "high",
"stream": true
}
Generator and email setup: Account generator setup.
Accounts → Login with Zcode (browser approval) or Import from Zcode app
(reads ~/.zcode/v2/credentials.json). The pool reloads automatically.
To transfer one account, use Copy account for sharing, then Accounts → Import account → Validate and import on the destination. A raw CLI JWT is also accepted. Exports contain the current bearer token and account/device metadata: treat them as credentials, not public support attachments. Sharing does not duplicate quota or entitlement and includes no renewal grant. Quota refresh is read-only; credential refresh can adopt a newer saved token but does not renew it. An expired or revoked token needs a fresh login/import if no newer credential is available; a JWT without declared expiry is not permanent.
The Generator tab drives generator/ — it needs a real Python (not the
packaged exe) with the generator dependencies:
.\.venv\Scripts\python.exe -m pip install -r generator\requirements.txt
.\.venv\Scripts\python.exe -m playwright install chromium
The gateway auto-detects the bundled generator/ folder. If you keep it
elsewhere, set it in Generator → Locate generator (applies live, no restart)
or generator.zcodeauto_dir in config.yaml.
Signups need verification mail. Use your own domain with the bundled worker:
In Generator → Email setup, enter your domain (already on Cloudflare) and API token, then click Set up email. How to create a Cloudflare token lists the required permissions and account/zone scopes. Setup deploys the worker, KV storage and secret, configures routing, and checks the inbox.
If an existing catch-all has a real destination, review Keep current routing or Replace routing explicitly: replacement diverts unmatched mail to the worker; named-address rules are unchanged. Advanced / manual recovery offers Save token only to replace credentials without redeploying, optional account ID, manual inbox settings, and Test worker inbox. That test proves the worker endpoint and secret work, not that mail is delivered. Send a real message to an address on the domain to verify end-to-end delivery.
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements/windows.txt -r requirements/dev.txt pyinstaller
.\.venv\Scripts\python.exe -m pytest tests -q
.\scripts\build\windows.ps1 # Windows exe (bun compiles the captcha-mint sidecar)
On Linux, from the repository root:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements/server.txt -r requirements/dev.txt pyinstaller
.venv/bin/python -m pytest tests -q
bash scripts/build/linux.sh
Output: .local/dist/ZcodeGateway.exe / .local/dist/ZcodeGateway (single
file, no Python needed to run); intermediate build files stay in .local/build/.
CI runs the suite on both Windows and Ubuntu, plus a runtime-error lint gate.
The root install-linux.sh remains the public Linux
bootstrap for compatibility; tools/captcha-mint/ stays in place as its own
JavaScript/TypeScript subsystem.
Live checks (explicit, separate from tests):
.\.venv\Scripts\python.exe scripts\smoke\live.py
.\.venv\Scripts\python.exe scripts\smoke\live.py --infer
Account import: python scripts/accounts/import_account.py <source> (use
--config <path> for a non-default configuration). The frozen-binary check at
scripts/smoke/frozen_local.py requires AUDIT_BINARY and a separate,
network-isolated sandbox working directory; it writes dummy state there, not
beside its script.
low / high / max (medium→high, xhigh→max).405 / code 3012 "unusual activity" is a per-model park: the account is
skipped for that model only and the request rotates on. See
unusual activity troubleshooting.529 / code 1305) retries before output with backoff + jitter.The generator's proxy tooling verifies every candidate against chat.z.ai
itself: the auth page must load with a valid certificate and the Aliyun
captcha host must be reachable. Around that gate:
ip:port, scheme://, user:pass@,
provider style host:port:user:pass, CIDR ranges (up to /16), HTML tables
and JSON records (generator/proxy_parse.py).pool.json — a failed check adds one, a pass removes
one; a proxy stays usable while its score is ≤ 3. proxies.txt is the
best-first export, so main.py is unchanged. Pasted proxies are vouched
and stay pending until a real check passes; only verified proxies are exported
or counted by the generator.balanced / thorough / fast).ip_country.json. Nothing is downloaded.CLI: python generator/proxy_pool.py{ fetch | verify | recheck | pick | countries | stats | prune | clear-bad | clear-used | clear-dead }.
%LOCALAPPDATA%/ZcodeGateway if that directory is not writable); the Linux
installer defaults to /opt/zcodegateway. Back up config.yaml, accounts/,
gateway.db and packaged generator-data/ privately, plus any custom data
paths and TLS material. Stop the service or use SQLite-aware backup tooling
rather than copying an actively written database alone.config.yaml, gateway.db, accounts/, generator/mail.json,
*.har) are gitignored — they are never part of the repo or releases.127.0.0.1 by default and mints per-install random
admin/client keys on first run. An empty admin key authenticates nothing
(fail closed); public binds refuse to start without client keys and a
non-default admin key.zcode.z.ai with a per-relay secret and must be
reached over https — a deployed relay is not an open proxy.cryptography
(included in requirements/server.txt).Source-checkout launches keep private configuration, accounts, logs, database
and generator output under .local/runtime/; packaged installations retain
their portable/service data locations. Build products go to .local/build/
and .local/dist/. .local/archive/ preserves older local artifacts and
relocation manifests; it is not source or release input. The standard .venv/
and component node_modules/ folders remain in place and are ignored.
AutoZCoder/
|-- zcode_gateway/ gateway package (+ dashboard/)
|-- generator/ account generator scripts (+ requirements.txt)
|-- mail-worker/ Cloudflare Email Worker template
|-- scripts/
| |-- accounts/ import_account.py
| |-- build/ windows.ps1, linux.sh
| |-- packaging/ packaging inputs
| `-- smoke/ live.py, frozen_local.py
|-- tools/captcha-mint/ stable JS/TS subsystem
|-- requirements/ windows.txt, server.txt, dev.txt
|-- docs/
| |-- guides/ SETUP.md, VPS-DEPLOY.md
| |-- reference/ PROTOCOL.md
| `-- troubleshooting/ DIAGNOSIS-*.md, UNUSUAL-ACTIVITY.md
|-- tests/ offline tests (Windows + Linux)
|-- assets/
|-- .local/ ignored runtime/build/scratch files; dist/ output
|-- .venv/ ignored Python virtual environment
|-- config.example.yaml
`-- install-linux.sh public bootstrap (stable root URL)
| Guide | What you will find |
|---|---|
| Account generator setup | Generator dependencies, domain email and proxies |
| VPS deployment | Linux installation, TLS, service management and recovery |
| Protocol reference | Request formats and API behavior |
| Model overload | Diagnose upstream 529 / 1305 responses |
| Agent initialization | Background on 3012 initialization failures |
| Unusual activity | Distinguish activity limits from unsupported-client responses |
| Security | Trust boundaries, credentials and public deployments |
| Release history | Changes and validation notes, including 2.0.1 |
AutoZCoder · Self-hosted. Independently maintained. MIT licensed.
B3hnamR/AutoZcoder is a public repo on GitHub by B3hnamR. A self-hosted gateway for the ZCode coding-plan API (GLM-5.3 - GLM-5.3-Flash), bundled with an account generator.
It declares the MIT license on GitHub.
Its maker tagged it for Windows and Linux. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-17. GitHub counts 2 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Open-source inference platform for language, vision, embedding, reranking, image, audio, and video models. Deploy with multiple engines across heterogeneous hardware, from a laptop to a distributed cluster. Serve models through OpenAI-compatible APIs.
Frontier-class open models on a free Kaggle TPU v5e-8: GLM-5.3-Flash 320B MoE (~165 tok/s, our own JAX engine) and Qwen3.8-27B bf16 (~130 tok/s), 262k context, prefix caching. Works with Claude Code, Codex, opencode and pi.
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

Get up and running with GLM-5.3-flash, DeepSeek, Gemma and other open source frontier models.

Terraria 1.4.5.8 Web Rewrite, using GLM-5.3-Flash and GLM-5.3

Low-overhead hardened XHTTP relay on Vercel Node runtime

نسخه سبک و سریع XHTTP Relay روی Fastly Compute Edge — اینستالر ویندوزی با Config Store و مدیریت کامل سرویسها

A free model gateway for Windows and Linux with WARP, proxy pool and Relay. With Unlimited use of OpenCode and Kilo
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/B3hnamR/AutoZcoderTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.