API · Models
Text

GLM 4.6

As the latest iteration in the GLM series, GLM-4.6 achieves comprehensive enhancements across multiple domains, including real-world coding, long-context processing, reasoning, searching, writing, and agentic applications.

CacheReasoningTools
Context 200K·Max out 96K

Quickstart

import { streamText } from 'ai';
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';

const blackbox = createOpenAICompatible({
  name: 'blackbox',
  apiKey: process.env.BLACKBOX_API_KEY!,
  baseURL: 'https://api.blackbox.ai/v1',
});

const result = streamText({
  model: blackbox('blackboxai/zai/glm-4.6'),
  prompt: 'Why is the sky blue?',
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

Specs & pricing

Input $/M
0.6
Output $/M
2.20
Context window
200K
Max output
96K
Supported parameters

Related models

ModelTypeContextInput $/M
GLM 4.5Text128K0.6
GLM 4.5 AirText128K0.2
GLM 4.5VText66K0.6
GLM-4.6VText128K0.3
GLM-4.6V-FlashText128K