Z.AI · API (Global)
How an agent gets a Z.AI · API (Global) key through KeyKeeper, what to choose on z.ai, and how KeyKeeper verifies it.
| Template id | zai-global (also zai, z.ai, zai-api) |
|---|---|
| Field | zai-api-key → ZAI_API_KEY · secret |
| Key looks like | whether it can be viewed again is unconfirmed |
| Created at | z.ai |
| Verified by KeyKeeper | not verified |
| Template checked | 2026-09-15 |
What the agent does
keykeeper providers show zai-global
keykeeper save --provider zai-global --from-clipboard --create --purpose "what this task does"
keykeeper run -c zai-global -- <your command>--provider zai-global fills in the credential id and the field. The environment
variable is the one 智谱 · Z.AI's own tools read, so nothing has to be mapped.
What only you can do
What to choose
国际 Z.AI 通用 API 使用 https://api.z.ai/api/paas/v4。Coding Plan 的 endpoint、订阅授权与允许用途不同;不能因为格式相同就混用或假定套餐结算。不要把中国平台 key 迁到此模板。
The agent is told the same thing. It opens the page for you and says what to pick; it never logs in, passes 2FA or pays on your behalf.
What KeyKeeper checks
- Before writing: the value must look like a Z.AI · API (Global) key (whether it can be viewed again is unconfirmed). A wrong paste is refused before anything is stored, and the agent is told why — without the value.
- After saving: Z.AI · API (Global) offers no read-only endpoint KeyKeeper can use, so the first real call is the test.
Endpoints
The key is a bearer token for these endpoints. keykeeper run sets only the variables above;
point your client at the base URL yourself.
- OpenAI Chat Completions —
https://api.z.ai/api/paas/v4(Global)
Rotation and expiry
No universal expiry policy was confirmed for this credential type. Record the date shown by the provider, or leave it unknown. Rotate or revoke at z.ai.