Providers

Z.ai

Z.ai is a free AI chatbot powered by GLM models.

Supported Models

ModelDescription
GLM-5Latest GLM-5 model
GLM-4.7GLM-4.7 model
GLM-4.6VVision model
GLM-4.6Standard model

Features

  • Free to use
  • Deep thinking mode
  • Web search
  • Streaming/non-streaming output
  • Multi-turn conversation support
  • Tool calling support

Authentication

Z.ai supports OAuth Login and JWT Token authentication methods.

In Chat2API, click Add Provider and select Z.ai.

Choose OAuth Login method.

Click Start Login, the system will automatically open the browser and redirect to the Z.ai login page.

After completing login in the browser, return to Chat2API, the system will automatically obtain authentication information.

Method 2: JWT Token Authentication

Go to Z.ai and log in.

Press F12 to open Developer Tools.

Check one of the following locations:

  • Cookies: Look for token cookie
  • Local Storage: Look for token key

Copy the JWT token value (starts with eyJ).

Token can be found in either Cookies or Local Storage.

Adding to Chat2API

  1. Navigate to Providers > Add Provider
  2. Select Z.ai from the list
  3. Paste your JWT Token
  4. Click Validate to confirm
  5. Save the provider

API Usage

Model Names

{
  "model": "GLM-5",
  "messages": [...]
}

Model Mapping Recommendations

Model NameActual ModelDescription
GLM-5-ThinkGLM-5Deep thinking model
GLM-5-SearchGLM-5Web search model
GLM-5-Think-SearchGLM-5Deep thinking + Web search

Official Resources

On this page