Z.ai

GLM 5

z-ai/glm-5

GLM-5 is Z.ai’s flagship open-source foundation model engineered for complex systems design and long-horizon agent workflows. Built for expert developers, it delivers production-grade performance on large-scale programming tasks, rivaling leading...

Context
205K tokens
Input, 1M tokens
$1.15
Output, 1M tokens
$3.68
Benchmark
—

Uptime and speed

Loading…

Pricing

Charged from your prepaid balance for the tokens actually used.

Input tokens$1.15 per 1M tokens
Output tokens$3.68 per 1M tokens
Cache read$0.23 per 1M tokens

Apps and activity

Loading…

Technical details

Model IDz-ai/glm-5
Context window205K tokens
AcceptsText
ProducesText
TokenizerOther
Max output tokens131,072

How to connect

The API is OpenAI-compatible: the official SDKs, LangChain and any client with a "base URL" field work.

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

Start using GLM 5

Create a free account, get a key in your dashboard and send your first request. Top up your balance when you need it.