Zhipu AI (GLM) Free API
z.aiFree GLM-4 Flash — a capable always-free chat model.
Opens Zhipu AI (GLM)’s official key page. You create and own the key — FreeLLMKeys never sees or stores it.
Quick facts
https://open.bigmodel.cn/api/paas/v4About Zhipu AI (GLM)’s free API
Zhipu AI’s GLM-4-Flash is one of the few frontier-lab chat models that is permanently free, and GLM-4V-Flash adds free vision.
You get an OpenAI-compatible key plus signup credit for the premium GLM-4.6 tier. The console is mostly in Chinese but the API is standard.
A good always-free fallback model to keep in your routing alongside Gemini Flash.
How to get a free Zhipu AI (GLM) API key
- 1Go to the official key page: https://open.bigmodel.cn/
- 2Create a free account — no credit card needed.
- 3Open the API keys section and generate a new key. Copy it somewhere safe.
- 4In your code, set the base URL to
https://open.bigmodel.cn/api/paas/v4and paste your key. - 5Call a model such as
glm-4-flashusing the examples below.
Code examples
Replace YOUR_ZHIPU_GLM_KEY with the key you created.
from openai import OpenAI
client = OpenAI(
base_url="https://open.bigmodel.cn/api/paas/v4",
api_key="YOUR_ZHIPU_GLM_KEY"
)
resp = client.chat.completions.create(
model="glm-4-flash",
messages=[{"role": "user", "content": "Hello!"}]
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://open.bigmodel.cn/api/paas/v4",
apiKey: process.env.API_KEY, // your free Zhipu AI (GLM) key
});
const resp = await client.chat.completions.create({
model: "glm-4-flash",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);curl https://open.bigmodel.cn/api/paas/v4/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "glm-4-flash",
"messages": [{"role":"user","content":"Hello!"}]
}'Pros & cons
Pros
- A genuinely free, always-on chat model
- Free vision model too (GLM-4V-Flash)
- OpenAI-compatible
- Signup credit for premium models
Cons
- Console primarily in Chinese
- Premium models need credit
Zhipu AI (GLM) free API — FAQ
Is the Zhipu AI (GLM) API really free?+
Yes. Zhipu AI (GLM) offers free tier access: GLM-4-Flash and GLM-4V-Flash are free; other models use free signup credit. No credit card is required to start.
How do I get a free Zhipu AI (GLM) API key?+
Create a free account at https://open.bigmodel.cn/, open the API keys section, generate a key, then set your base URL to https://open.bigmodel.cn/api/paas/v4 in your OpenAI-compatible code.
Which models does Zhipu AI (GLM) offer for free?+
GLM-4-Flash (free), GLM-4.6, GLM-4-Air, GLM-4V-Flash (vision, free), GLM-Z1-Flash.
What are the Zhipu AI (GLM) free-tier rate limits?+
Free Flash models are rate-limited per minute; fair for app use.
Is Zhipu AI (GLM) OpenAI-compatible?+
Yes. Zhipu AI (GLM) exposes an OpenAI Chat Completions compatible endpoint, so you can reuse your existing OpenAI SDK code and only change the base URL and API key.
Popular free models on Zhipu AI (GLM)
Related free LLM APIs
Alibaba Qwen (DashScope)
First-party Qwen models with a free token quota.
Google AI Studio (Gemini)
The most generous permanent free tier for a frontier model.
Groq
The fastest free inference on the planet — 500+ tokens/sec.