Skip to content

Z.ai (BYOK)

How to create an API key for Z.ai and add it to AnyRouter via Bring Your Own Key.

Z.ai (BigModel / GLM) keys use the ID.Secret format. Two variants exist — the standard PaaS key and the dedicated Coding Plan key.

Get your API key

  1. Log in to Z.ai.
  2. Open API keys.
  3. Create a new key (or use the default key from signup) and copy it.
  4. Add it under Z.ai (standard) or Z.ai (Coding Plan) to match your plan.

Gotchas

The standard key uses base URL https://api.z.ai/api/paas/v4; the Coding Plan uses https://api.z.ai/api/coding/paas/v4. Pick the card that matches your plan so routing hits the right endpoint.

Add it to AnyRouter

  1. Go to Dashboard → BYOK.
  2. Find Z.ai under Available and click Add key.
  3. Paste your key into the API key field.
  • Create key: Z.ai console
  • Default base URL (editable on the key form): https://api.z.ai/api/paas/v4
  1. Click Save. AnyRouter runs a live validation call against Z.ai before storing the key — if it fails, the dialog shows the upstream error and the key isn't saved.