Skip to main content
Z.aiMediumUltra

GLM 5.2

Z.ai's GLM 5.2 served through the OpenRouter aggregator - a large-scale text reasoning model with a 1M-token context window, suited for long-horizon agent workflows and project-level software engineering. Billed at OpenRouter's actual usage cost.

858/2,698credits
input / output ยท per 1M tokens
1M-token context window, up to 128K output tokens
Large-scale reasoning model (reasoning_effort + parallel tool calls)
Text-only input and output
OpenAI-compatible API (chat completions) via /llm/openrouter/v1
Billed at OpenRouter's actual usage.cost - listed rates are estimates

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

Model Specifications

Context Window
1.0M
tokens
Max Output
128K
tokens
Training Cutoff
Not published
Compatible SDK
OpenAI

Capabilities

Vision
Function Calling
Streaming
JSON Mode
System Prompt

Token Pricing (per 1M tokens)

Token TypeCreditsUSD Equivalent
Input Tokens858$0.57
Output Tokens2,698$1.80
Cached Tokens159.416$0.11

* 1,500 credits โ‰ˆ $1 (actual charges may vary based on usage)

Quick Start

curl -X POST "https://api.core.today/llm/openrouter/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "z-ai/glm-5.2",
  "messages": [
    {
      "role": "user",
      "content": "Summarize the attached report in 5 bullets."
    }
  ],
  "max_tokens": 1024
}'

Parameters

ParameterTypeRequiredDefaultDescription
modelstringYes-Model ID in vendor/model form, e.g. "z-ai/glm-5.2".
messagesarrayYes-Chat messages in OpenAI format (system/user/assistant roles).
temperaturenumberNo0.7Sampling temperature (0-2).
max_tokensintegerNo2048Maximum completion tokens.
streambooleanNofalseStream the response as server-sent events.

Examples

Chat completion

OpenAI-compatible chat completion request via OpenRouter

curl -X POST "https://api.core.today/llm/openrouter/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "z-ai/glm-5.2",
  "messages": [
    {
      "role": "user",
      "content": "Summarize the attached report in 5 bullets."
    }
  ],
  "max_tokens": 1024
}'

Tips & Best Practices

1Works with the OpenAI SDK - set base_url to https://ai.api.core.today/llm/openrouter/v1
2Charged at OpenRouter's usage.cost x 1,858 credits/USD - the listed rates are estimates and may lag OpenRouter price changes
3Text-only - it does not accept images; for reasoning tasks use reasoning_effort to trade latency for depth, and enable parallel_tool_calls in agent loops

Use Cases

Long-horizon agent workflows
Project-level software engineering across many files
Reasoning-heavy analysis over very long inputs