providers
GLM (Zhipu)
Zhipu's official international endpoint for GLM — glm-4.7 is their flagship agentic model; glm-4-flash is the fast/cheap tier.
| endpoint | https://api.z.ai/api/paas/v4 |
| env var | ZHIPUAI_API_KEY (aliases: ZAI_API_KEY, ZHIPU_API_KEY) |
| get a key | z.ai |
Get an API key
- Sign up at z.ai (mainland users: open.bigmodel.cn)
- Open the API Keys page from your account menu
- Click 'Create a new API key'
- Copy the key now — it's shown once
- Set ZHIPUAI_API_KEY (base URL api.z.ai/api/paas/v4)
Free Flash-tier models; full GLM API is pay-per-token (trial credits for new users).
Enable
export ZHIPUAI_API_KEY=... # shell profile — survives foreveror in the terminal — validates the key live before saving:
/enable glmor pick any locked 🔒 GLM (Zhipu) model in /models and paste the key inline.
Models
Starter menu (once enabled, /models fetches the provider's full live list):
glm-4.7glm-4.6glm-4-plusglm-4-flash
Switch anytime — /model glm-4.7 fuzzy-matches; context carries over.
SDK
from mantis_agent import MantisAgentOptions
options = MantisAgentOptions(
model="glm-4.7",
backend="https://api.z.ai/api/paas/v4", # key read from $ZHIPUAI_API_KEY
)Notes
ZAI_API_KEYandZHIPU_API_KEYwork as aliases.- glm-4.7 full-size is the model that's impractical to self-host — this endpoint is the sane way to run it.