d3-vin/glm-zai-2api — explained in plain English
Analysis updated 2026-05-18
Point an OpenAI-compatible coding assistant like OpenCode or Claude Code at GLM models via a local proxy.
Use function calling with GLM models even though Z.AI does not natively support it.
Run a self-hosted API endpoint for GLM-4.7 or GLM-5 models without writing custom integration code.
| d3-vin/glm-zai-2api | adisbladis/nix-cache-beacon | aspecttaleadapter/adobe-lightroom-classic-15-3-full | |
|---|---|---|---|
| Stars | 25 | 25 | 25 |
| Language | Go | Go | Go |
| Setup difficulty | moderate | hard | easy |
| Complexity | 3/5 | 4/5 | 1/5 |
| Audience | developer | ops devops | general |
Figures from each repo's GitHub metadata at analysis time.
Requires Chrome for the token collector and a Z.AI account token to unlock GLM-5 models.
GLM-ZAI-2API is a small proxy program, written in Go, that lets tools built for OpenAI's chat API talk to Z.AI's GLM language models instead. It ships as a single binary with no separate services to run, and it handles the captcha checks Z.AI requires behind the scenes. The main idea is compatibility. Many coding assistants and IDE plugins, such as OpenCode, Claude Code, and Roo Code, already know how to speak to an OpenAI-style API. By pointing one of these tools at this proxy's local address instead of OpenAI's servers, a developer can use GLM models without changing any of that tool's configuration beyond the base URL and API key. The proxy also translates GLM's responses so that function calling, also called tool calling, works even though Z.AI does not support it natively. It does this by rewriting the request as a special prompt, then parsing the model's reply back into the expected format. Running it requires downloading a prebuilt release for your operating system, or building from source with Go. Before first use, you also need to run a separate helper program that opens a headless Chrome browser to collect device tokens the proxy needs to pass Z.AI's captcha checks. After that, you copy an example configuration file, optionally add a Z.AI account token to unlock the larger GLM-5 models, and start the server. Once running, it shows a small status dashboard in the browser and accepts requests at the familiar chat completions endpoint. Without an account token, only the smaller glm-4.7 model works in guest mode. This project is meant for developers who already use GLM models through Z.AI and want to plug them into existing OpenAI-compatible coding tools without writing custom integration code themselves.
GLM-ZAI-2API is a Go proxy that makes Z.AI's GLM language models work with tools built for OpenAI's chat API, including coding assistants like Claude Code.
Mainly Go. The stack also includes Go, SQLite, Chrome DevTools Protocol.
Provided as-is for educational and interoperability purposes, no formal open-source license specified.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.