ModelHubby

← All guides · provider record →

Z.ai (Zhipu AI) — free tier setup

What you get free

Permanently free GLM "Flash" models on the international Z.AI platform, no credit card. Catalog quota: "Permanent free models, no credit card required. Rate limit: 1 concurrent request (mnfst data.json). Z.ai pricing page: GLM-4.7-Flash and GLM-4.5-Flash 'Free' for input, cached input, cached input storage, and output; GLM-4.6V-Flash free vision model." Category: permanent_free. The gotcha: the free models are concurrency-limited (1 in-flight request), not RPM/TPM-limited — throughput is bounded by model latency, and any parallelism 429s immediately. Also don't confuse platforms: international = api.z.ai; mainland China = open.bigmodel.cn — same model family, separate account systems.

Friction check

Credit card no
Phone verification unknown
Org/membership no
Est. time to first key 5m
Trains on your prompts unknown

Get a key

Confirmed against the official quick-start:

  1. Go to https://z.ai/model-api and register (or log in).
  2. Skip billing/top-up — the Flash models are free.
  3. Go to the key management page: https://z.ai/manage-apikey/apikey-list and create a new API key.
  4. Copy the key.

First request

Base URL confirmed via official quick-start (OpenAI SDK compatible, Bearer auth); model id from the catalog. Success shape: JSON with choices[0].message.content.

export ZAI_API_KEY="YOUR_KEY"
curl -X POST https://api.z.ai/api/paas/v4/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ZAI_API_KEY" \
  -d '{"model":"glm-4.7-flash","messages":[{"role":"user","content":"Say OK."}],"max_tokens":16}'

Limits that will bite you

  • 1 concurrent request on free models (catalog, per seed repo; not confirmed on the official pricing page — verify by probing). Serialize everything; a queue is mandatory.
  • Free models per catalog: glm-4.7-flash (200K context, 128K max output), glm-4.5-flash, glm-4.6v-flash (vision, 128K context).
  • Whether the concurrency slot is shared across the three free models is unknown (catalog shared_pool: unknown) — assume shared until probed.
  • Tool-calling support: unknown in the catalog — probe before relying on it.
  • The official quick-start showcases paid models (glm-5.2 etc.); make sure your requests pin the -flash ids or you may hit a paywalled model error.

Key rotation runbook

  • Second key: create another from https://z.ai/manage-apikey/apikey-list (multiple keys per account expected but unconfirmed — verify on first signup). Note: extra keys likely will not lift a per-account concurrency limit.
  • Revoke: delete the key from the same key-management page (exact button label unconfirmed).
  • ModelHubby integration: export ZAI_API_KEY_2="..." — the key pool picks it up automatically; state machine cools down rate-limited keys per-key.

ModelHubby usage

pnpm mh show zai
pnpm mh probe --live --provider zai --apply