z-ai

Z.ai: GLM 5.2

GLM 5.2 is a large-scale reasoning model from Z.ai. It supports text input and output with a 1M-token context window, and is suited for long-horizon agent workflows, project-level software engineering,...

Context
1M tokens
Input / 1M tokens
$1.20
Output / 1M tokens
$4.10
Benchmark

Pricing

Input tokens$1.20 per 1M tokens
Output tokens$4.10 per 1M tokens
Cache read$0.20 per 1M tokens

Technical details

Model IDz-ai/glm-5.2
Context window1M tokens
Input modalitiestext
Output modalitiestext
TokenizerOther
Max output tokens131,072

Use with MegaBrain

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

const response = await client.chat.completions.create({
  model: 'z-ai/glm-5.2',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use Z.ai: GLM 5.2?

Get an API key and start making requests in minutes.

Get an API key