~z-ai

Z.ai: GLM Latest (retires Dec 31)

This model always redirects to the latest GLM model from Z.ai.

Context
1M tokens
Input / 1M tokens
$1.40
Output / 1M tokens
$4.40
Benchmark

Pricing

Input tokens$1.40 per 1M tokens
Output tokens$4.40 per 1M tokens
Cache read$0.26 per 1M tokens

Technical details

Model ID~z-ai/glm-latest
Context window1M tokens
Input modalitiestext
Output modalitiestext
TokenizerRouter
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-latest',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use Z.ai: GLM Latest (retires Dec 31)?

Get an API key and start making requests in minutes.

Get an API key