Z.ai: GLM-5.2
Chatz-ai/glm-5.2GLM-5.2 ๆฏ z.ai ๅฝ้ ็ซ (api.z.ai) ๆ่ฐๆจ็ๆจกๅ, MoE ๆถๆ open-weights, 1M context, ๅ ๅต thinking (reasoning_content), ๆฏๆ prompt caching / tool calling / web search. ๅผบ็ผ็ ไธ้ฟ็จ่ชๆฒปๆง่ก. ้่ฟ OpenAI-compatible + Anthropic ๅๅ่ฎฎๆฅๅ ฅ (ๆ responses ็ซฏ็น).
Context Window
1M
Max Output Tokens
128K
Released
2026-06-16
Capabilities
Function CallingReasoningPrompt CachingWeb Search
Available Providers
Zhipu
Supported Protocols
openaianthropic
Providers
Zhipu
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Web Search
$0.01/R
Protocols
openai
/v1/chat/completionsanthropic
Code Examples
from openai import OpenAIclient = OpenAI(base_url="https://api.ofox.ai/v1",api_key="YOUR_OFOX_API_KEY",)response = client.chat.completions.create(model="z-ai/glm-5.2",messages=[{"role": "user", "content": "Hello!"}],)print(response.choices[0].message.content)
Related Models
Frequently Asked Questions
Z.ai: GLM-5.2 on Ofox.ai costs $1.4/M per million input tokens and $4.4/M per million output tokens. Pay-as-you-go, no monthly fees.
Z.ai: GLM-5.2 supports a context window of 1M tokens with max output of 128K tokens, allowing you to process large documents and maintain long conversations.
Simply set your base URL to https://api.ofox.ai/v1 and use your Ofox API key. The API is OpenAI-compatible โ just change the base URL and API key in your existing code.
Z.ai: GLM-5.2 supports the following capabilities: Function Calling, Reasoning, Prompt Caching, Web Search. Access all features through the Ofox.ai unified API.