//
GLM-5.2 supports a larger context window and output length, with up to 1M context and 128K output tokens. It also delivers stronger coding performance and more advanced reasoning capabilities.
This model is available from multiple providers. Select one to see its pricing and sample code.
Official Channels of Z.AI
Transparent pay-as-you-go pricing by token usage — no subscriptions or hidden fees.
Copy an example below to start calling this model in minutes.
from openai import OpenAI
client = OpenAI(
base_url="https://api.apipod.ai/v1",
api_key="<YOUR_API_KEY>",
)
# Chat Completions
completion = client.chat.completions.create(
model="glm-5.2",
messages=[
{
"role": "user",
"content": "What is the meaning of life?",
}
],
)
print(completion.choices[0].message.content)