GLM API & Docs
Everything you need to build with GLM through the Z.ai API. Start with the API quickstart to create a key, set the base URL and send your first request in curl, Python or Node, then go deeper with the guides on function calling and JSON output, thinking mode and reasoning effort, context caching, the built-in web search tool, and the rate limits and error codes you will meet in production. Each guide uses the exact model IDs and request parameters from the official documentation, shows working code, and tells you which GLM model to pick for the job. You will also find plain answers on licensing, including which GLM models are open weights under MIT and what the GLM-5.3 License adds, plus a profile of Z.ai, the company formerly known as Zhipu AI. New to GLM? Try any model free in GLM Chat first, then come back here when you are ready to write code.
-
Zhipu AI (Z.ai): The Company Behind GLM — Models, History, Stock and Products
Zhipu AI, now Z.ai: the company behind GLM, its history since 2019, HKEX stock code 2513, products, open-source record and 2026 news.
-
GLM Function Calling & Structured Output: Complete Guide
How GLM function calling and JSON mode work: tool schemas, a complete Python loop, tool_stream, thinking with tools, and schema validation.
-
GLM Thinking Mode: How Reasoning Effort Works and When to Turn It Off
How GLM thinking mode and reasoning_effort work on every model, with code, cost math and when to turn reasoning off.
-
GLM Web Search API: Give GLM Live Internet Access
Give GLM live internet access with Z.ai's web_search tool, Web Search API and Web Reader API, with parameters, code and pricing.
-
GLM API Rate Limits, Quotas and Error Codes (400, 429, 401) Explained
Every GLM API error code explained, with fixes for 400, 401 and 429 errors, Coding Plan limits, and retry-with-backoff code.
-
Is GLM Open Source? Licenses for Every GLM Model (MIT vs GLM-5.3 License) and Commercial Use
The license for every GLM model: which are MIT, what the GLM-5.3 License adds, which are API-only, and what commercial use is allowed.
-
GLM Context Caching: Cut Your API Bill With Cached Input
How GLM context caching works, what cached input costs on every model, and how to lay out prompts so you actually get the discount.
-
Z.ai GLM API: Get a Key, Base URL, First Request (curl, Python, Node)
Get a Z.ai API key and make your first GLM API call in curl, Python or Node, with streaming and an OpenAI migration checklist.







