Home / Model Explorer / GLM 5.2

GLM 5.2 API

Zhipu·1M contextChatReasoningTool callingVision

Domestic flagship · All-around upgrade

Overview

About this model

Zhipu's new-generation flagship, 1M ultra-long context, with comprehensive upgrades in reasoning, coding, and multimodal capabilities.

Capabilities

Capability matrix

TextSupported
VisionSupported
Audio—
ToolsSupported
JSONSupported
ReasoningSupported

Pricing and groups

Routes and pricing

Zhipu Domestic Model Discount0.6× official price (save 40%)Collecting data

Supports integration with GLM5.3

Input

$0.84 / 1M

Output

$2.64 / 1M

Cache read

$0.156 / 1M

Cache write

$0 / 1M

Recent availabilityPast 24 hours · Active probes—
24h ago16h ago8h agoNow

Prices are in USD per million tokens. This page shows a public price snapshot. Before sending a request, check the Model Explorer for current prices. The console shows account-specific routes and charges.

How to compare prices · How to interpret performance metrics

Snapshot: . Availability reflects active probes over the past 24 hours; performance reflects actual calls.

API

Integration example

Use a Yomi API key that can access this model and route. Check the endpoint and request parameters when switching models or protocols.

Set the environment variable YOMI_API_KEY.

Quick start · Pricing and billing · Protocol reference · Chat Completions

Python · OpenAI SDK
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.yomiapi.com/v1",
    api_key=os.environ["YOMI_API_KEY"],
)

resp = client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
curl · OpenAI compatible
curl 'https://api.yomiapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $YOMI_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "glm-5.2",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'

Connect to GLM 5.2 now

Create an API key in the console and select an available route.

Get an API key