unqroute
v0.1.1
Published
UnQRoute — Unified AI router with 160+ providers, RTK+Caveman compression, auto fallback, MCP/A2A, desktop, PWA, and OpenAI-compatible APIs. Forked from OmniRoute with Z.ai Web (GLM-5.2) integration.
Maintainers
Readme
🚀 UnQRoute — The Free AI Gateway
Never stop coding. Connect every AI tool to 237 providers — 90+ free — through one endpoint.
Plug Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini. Auto-fallback.
Includes Z.ai Web (GLM-5.2) integration with token-pool architecture for 99.999%+ success rate.
RTK + Caveman compression saves 15–95% tokens. Never hit limits.
Forked from OmniRoute. Rebranded as UnQRoute with custom Z.ai Web (GLM-5.2) provider integration.
📦 Install: npm install -g unqroute · Then run: unqroute
🧩 Available CLI commands
unqroute # Start the server (alias: unqroute serve)
unqroute serve # Start server with options
unqroute setup # Interactive setup wizard
unqroute status # Show server status
unqroute providers # List providers
unqroute --help # Show all commands🌐 Quick API usage
# Once server is running on http://localhost:20128
curl http://localhost:20128/v1/chat/completions \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "zai/glm-5.2",
"messages": [{"role": "user", "content": "Hello!"}]
}'What's New in UnQRoute
This fork adds a Z.ai Web (GLM-5.2) provider (zai-web / alias zai) that uses chat.z.ai's reverse-engineered internal API to expose GLM-5.2 as an OpenAI-compatible LLM via user JWT cookies.
Architecture:
- Token pool of N user JWTs stored in
provider_connections(provider="zai-web") - On each request, executor picks the best healthy token, signs the request with HMAC-SHA256 (hard-coded secret cracked from chat.z.ai's JS bundle), and POSTs to
/api/v2/chat/completions - If response contains
FRONTEND_CAPTCHA_REQUIRED(Aliyun slider captcha, triggered per-request by server-side risk scoring), the token is put in 30-min cooldown and the next token is tried - With N tokens, success rate =
1 - 0.2^N(assuming ~80% per-token success) - For 99.999% success, import 25+ tokens via dashboard bulk-import
To use:
- Create 25+ Z.ai accounts at chat.z.ai (email/Google signup)
- For each account: login → DevTools → Application → Cookies → copy
tokenvalue - Bulk-import all tokens via UnQRoute dashboard → Providers → "Z.ai Web (GLM-5.2)" → bulk-import
- Call the API with
model: "zai/glm-5.2"
Backward Compatibility
~/.omniroute/data directory is still detected and used if it exists (existing OmniRoute users keep their data on upgrade)- The
omnirouteCLI command is still installed as an alias forunqroute - All
OMNIROUTE_*environment variables continue to work
License
MIT — same as upstream OmniRoute
