Skip to main content

GLM Models

GLM is a model family developed by ZhipuAI, available through the Z.AI platform. In WednesdayAI, GLM models are accessed via the zai provider using model IDs like zai/glm-5.
GLM is a model family, not a separate provider. All GLM access goes through the Z.AI provider. See the Z.AI provider page for full setup instructions.

Quick setup

1. Get a Z.AI API key

Create an API key in the Z.AI console and store it:
echo 'ZAI_API_KEY=sk-...' >> ~/.openclaw/.env

2. Run onboarding

openclaw onboard --auth-choice zai-api-key

3. Configure

{
  models: {
    providers: {
      zai: {
        apiKey: "ZAI_API_KEY", // references the env var
      },
    },
  },
  agents: {
    defaults: {
      model: { primary: "zai/glm-5" },
    },
  },
}
apiKey is the name of the environment variable, not the key value itself. Keep secrets in .env, not in committed config files.

Provider settings

SettingValue
Provider IDzai
Auth env varZAI_API_KEY
Auth methodBearer token

Available models

GLM model IDs use the zai/<model-id> prefix:
Model IDNotes
zai/glm-5Current flagship GLM model
zai/glm-4.7GLM 4.7
zai/glm-4.6GLM 4.6
zai/glm-4-flashFaster, lower-cost variant
GLM versions and availability change over time. Check Z.AI’s documentation for the current model catalog.

Verification

openclaw models status --probe-provider zai

Troubleshooting

Verify ZAI_API_KEY is set correctly in ~/.openclaw/.env. Re-run openclaw onboard --auth-choice zai-api-key to refresh the stored credential.
Check the current GLM model catalog in the Z.AI console — model IDs are versioned and may change.