Management API
Create, list, and revoke inference keys from automation with a management key, without granting that automation any model-inference permission at all.
Management keys are separate from inference keys and use the sk-glm5-mgmt-... prefix. They can manage keys and query Analytics, but cannot call model inference endpoints.
Create a management key in Settings → Management Keys. The plaintext secret is shown once.
List inference keys
https://glm5.app/api/v1/keyscurl https://glm5.app/api/v1/keys \
-H "Authorization: Bearer $GLM5_MANAGEMENT_KEY"
Create an inference key
https://glm5.app/api/v1/keys{
"name": "production-agent",
"rpm_limit": 60,
"spend_limit": 300,
"spend_reset": "daily"
}
The response includes the new inference secret once.
Read, update, disable, enable, rotate, revoke
GET /api/v1/keys/:idPATCH /api/v1/keys/:idDELETE /api/v1/keys/:id
Update fields with PATCH, or use action:
{ "action": "disable" }
Supported actions are disable, enable, and rotate. Rotation returns a replacement secret once and disables the old key. DELETE permanently revokes the key.
Management keys cannot run models
Sending a management key to /chat/completions is rejected. Use a normal sk-glm5-... inference key for model calls.