Keys / Zhipu AI
ZHIPUAI_API_KEY
The BigModel open platform API key your app calls GLM models with. Standard API keys and GLM Coding Plan keys are separate and don't work for each other.
- Expires
- the docs don't say
- API
- none documented; console only
Get it
Create one on bigmodel.cn/usercenter/proj-mgmt/apikeys. The steps aren't recorded yet.
Set it
ZHIPUAI_API_KEY=...
The older zhipuai Python SDK reads it from this variable when you don't pass a key. The current zai-sdk reads ZAI_API_KEY instead. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Create a new key for each way you use the old one: a standard key from the API Keys page for pay-as-you-go use, or a Coding Plan key from the plan's page for plan quota.
- A key created before October 16, 2026 and marked compatible bills by endpoint. If it serves both standard and Coding Plan endpoints, replace it with one of each.
- Deploy them everywhere that reads
ZHIPUAI_API_KEY. - Check that requests succeed and bill the way you expect, then delete the old key. A deleted key can't call the API.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.