z-ai

Z.ai: GLM 5.1

GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. Unlike previous models built around minute-level interactions, GLM-5.1 can work independently and continuously on...

Context
203k tokens
Input / 1M tokens
$0.98
Output / 1M tokens
$3.08
Benchmark

Pricing

Input tokens$0.98 per 1M tokens
Output tokens$3.08 per 1M tokens
Cache read$0.49 per 1M tokens

Technical details

Model IDz-ai/glm-5.1
Context window203k tokens
Input modalitiestext
Output modalitiestext
TokenizerOther
Max output tokens65,535

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.1',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use Z.ai: GLM 5.1?

Get an API key and start making requests in minutes.

Get an API key