Models

GLM 5.2

tools

glm-5.2GLM-5.2 is a powerful large language model from Z.ai, designed for advanced reasoning, coding.

+100% credit with a usage package. $100 buys $200 of usage on this model — from $10. Cached input tokens are not discounted.

Input / 1M tokens

$0.06

$0.00000006 / token

Output / 1M tokens

$7

$0.000007 / token

Cached input / 1M

$0.059

Uptime · 24h

—

No traffic yet

Details

Type
Chat
Input
text
Output
text

Supported parameters

max_tokenstemperaturetop_pstopseedpresence_penaltyfrequency_penaltyresponse_formatpluginstoolstool_choiceparallel_tool_calls

Last 24 hours

Requests per hour; red = provider errors.

Avg latency
—
Avg first token
—
Throughput
—

Use it

curl https://staging-api.ultragpt.pro/v1/chat/completions \
  -H "Authorization: Bearer $ULTRAGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

Anthropic SDK / Claude Code

curl https://staging-api.ultragpt.pro/v1/messages \
  -H "x-api-key: $ULTRAGPT_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "max_tokens": 1024,
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

More Z.ai models

All GLM API models and prices

Compare GLM 5.2

FAQ

How much does the GLM 5.2 API cost?

$0.06 input / $7 output per 1M tokens; cached input $0.059 per 1M tokens. You pay per use from a prepaid balance - no subscription, and every response reports its exact cost in usage.cost.

How do I call GLM 5.2 through the API?

Create an UltraGPT API key, point the official OpenAI SDK (or any OpenAI-compatible client) at https://staging-api.ultragpt.pro/v1 and pass "glm-5.2" as the model. Anthropic SDKs and Claude Code work too, through /v1/messages.

Does GLM 5.2 support tools, vision and reasoning?

Tool / function calling: yes. Image input (vision): no. Reasoning: no. Input: text; output: text.