Z.AI
Z.AI is the API platform for GLM models developed by ZhipuAI. It provides a REST API for GLM model access using API key authentication. WednesdayAI uses thezai provider to connect to Z.AI.
Prerequisites
- An API key from the Z.AI console
Quick setup
1. Get an API key
Sign in to the Z.AI console and create an API key. Keys typically start withsk-.
Store it on the gateway host:
2. Run onboarding
3. Configure
apiKey is the name of the environment variable, not the key value itself. Keep secrets in .env, not in committed config files.Provider settings
| Setting | Value |
|---|---|
| Provider ID | zai |
| Auth env var | ZAI_API_KEY |
| Auth method | Bearer token |
| Tool streaming | Enabled by default |
Available models
GLM models are referenced aszai/<model-id>:
| Model ID | Notes |
|---|---|
zai/glm-5 | Current flagship |
zai/glm-4.7 | GLM 4.7 |
zai/glm-4.6 | GLM 4.6 |
zai/glm-4-flash | Faster, lower-cost variant |
Check the Z.AI platform for the current model catalog — GLM versions are updated regularly.
Verification
Troubleshooting
401 Unauthorized
401 Unauthorized
Model not found
Model not found
GLM model IDs are versioned. Check the Z.AI console for the current list and update your config accordingly.