Z.ai (GLM)
Z.ai (GLM)
Configure jambonz to use Z.ai’s GLM models over its OpenAI-compatible API.
Z.ai (Zhipu AI) serves its GLM family of models behind an OpenAI-compatible API. The wire is OpenAI-compatible (chat completions, streaming, tools), so the integration is straightforward — jambonz talks to it via a base URL override.
Two endpoints are available:
- Global (default) —
https://api.z.ai/api/paas/v4 - China —
https://open.bigmodel.cn/api/paas/v4
Get credentials
- Sign in at the global console (z.ai) or the China console (open.bigmodel.cn).
- Open API Keys and create a key.
- Copy the value.
Configure in jambonz
In the portal: Account → LLM Services → + Add LLM Service → Z.ai.
The key from Z.ai’s console.
Defaults to https://api.z.ai/api/paas/v4 (global). Set to https://open.bigmodel.cn/api/paas/v4 for the China (BigModel) endpoint, or to your own proxy.
Click Test to verify.
Use in an agent verb
Available models
Check the Z.ai model catalog for the live list.
Quirks & errors
Global vs China: keep vendor: 'zai' constant — only the Base URL (in the portal credential) differs between the global Z.ai endpoint and the China BigModel endpoint. Keys are not interchangeable across endpoints.
Tool-calling capability varies by model. GLM 4.6 handles tools well; lighter -air variants may be less consistent. Test thoroughly before relying on function calling.
401 — key revoked, copied with whitespace, or used against the wrong region’s endpoint. Regenerate in the console and confirm the Base URL matches.