API · Models
Text
GLM 4.7
GLM-4.7 is Z.ai’s latest flagship model, with major upgrades focused on two key areas: stronger coding capabilities and more stable multi-step reasoning and execution.
ReasoningToolsCache
Context 200K·Max out 120K
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.7'),
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
- 120K
- Supported parameters
- —
Related models
| Model | Type | Context | Input $/M |
|---|---|---|---|
| GLM 4.5 | Text | 128K | 0.6 |
| GLM 4.5 Air | Text | 128K | 0.2 |
| GLM 4.5V | Text | 66K | 0.6 |
| GLM 4.6 | Text | 200K | 0.6 |
| GLM-4.6V | Text | 128K | 0.3 |