it's free*.ai

Z.ai (Zhipu)

The GLM models with a permanent free tier.

Z.ai is Zhipu’s API, the lab behind GLM. The Flash line is the permanent free tier — glm-4.7-flash and glm-4.5-flash. GLM-5, GLM-5.2 and glm-4.7 bill per token. OpenAI-compatible at open.bigmodel.cn/api/paas/v4.

open.bigmodel.cn wants a Chinese phone number. The international portal at z.ai is email-only and a different account. Concurrency is per account and model, shown in the console. Flash chat goes to 200K.

Free models
4
Max context
200K
Free tier
GLM Flash models for free
Requirement
Phone verification, no card

Endpoint

Base URLhttps://open.bigmodel.cn/api/paas/v4
Env varZHIPU_API_KEY
Rate limitConcurrency set per account in the console

Code examples

npm install openai
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://open.bigmodel.cn/api/paas/v4',
  apiKey: process.env.ZHIPU_API_KEY
})

const response = await client.chat.completions.create({
  model: 'glm-4.7-flash',
  messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})

console.log(response.choices[0].message.content)

Worth knowing

Models you get for free4