Z.AI: GLM 5.2
GLM-5.2 supports a larger context window and output length, with up to 1M context and 128K output tokens. It adds streaming output for tool calls via `tool_stream=true`, enabling real-time access to tool call arguments. Like the GLM-4.7 series, it supports deep thinking with `thinking={ type: "enabled" }`, where thinking is enforced once enabled, and introduces `reasoning_effort` to control reasoning intensity under chain-of-thought mode. It also delivers stronger coding performance and more advanced reason
Supply channels
Direct official channels with shared authentication, billing and observability. Use the same API key as for other models.
Channels are ordered by request volume over the last 24 hours. A valid public provider name is shown when available; otherwise a generic channel label is used. Availability, latency and throughput use a rolling 24-hour window. Hourly colors show operational, degraded, down or no-traffic periods. Hover for actual values. The price is the same across channels.
Quick start
OpenAI / Anthropic compatible: change the base URL and set the model to z-ai/glm-5.2.
from openai import OpenAI
client = OpenAI(
base_url="https://api.goodputai.cn/v1",
api_key="GOODPUT_API_KEY",
)
resp = client.chat.completions.create(
model="z-ai/glm-5.2",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)Billing method:Billed by token usage: Input CN¥4.00 · output CN¥14.00, per million tokens.Web search is billed separately: CN¥0.00 per search.
Related models
GLM-5.3 is the next-generation model in Z.AI's GLM series, supporting up to 1M context tokens and 128K output tokens. Native deep thinking, tool calling and structured output support long-document understanding, code generation and complex reasoning. Served on our own compute infrastructure, with both OpenAI and Anthropic API protocols.
HappyHorse 1.1 image-to-video model creates a video from one image and a text prompt. Uses asynchronous task-based generation. Billed by successfully generated video duration: CNY 0.36/second at 720P or CNY 0.48/second at 1080P. Failed generations are not billed.
HappyHorse 1.1 reference-to-video model creates a new video from reference images or videos and a text prompt. Uses asynchronous task-based generation. Billed by successfully generated video duration: CNY 0.36/second at 720P or CNY 0.48/second at 1080P. Failed generations are not billed.
Add Z.AI: GLM 5.2 to your app
Change the base URL and start calling after you sign up.