zai/glm-5.2/chatGLM 5.2 API brings project files, engineering rules and migration requirements into a long-running text conversation. This GLM 5.2 endpoint accepts text for repository refactoring; extract document text first because image, video, audio and file parts are outside its public input schema.
Workbench
These examples were written for this endpoint. Replace the prompt and sample media URLs with your own accessible inputs, then check the current quote and model availability before submitting.
- Input types
- Text
- Output types
- Text
- Input
- $1.2425 / 1 million tokens
- Cached input
- $0.217 / 1 million tokens
- Output
- $4.0425 / 1 million tokens
- Context
- 1,048,576
- Max output
- 131,072
$1.24/4.04per 1 million tokens · input / output
source-review Use this exampleA GLM 5.2 review can compare the implementation with its API contract and identify which changes need regression checks.
- 6000
- 0.2
- high
- Input types
- Text
- Output types
- Text
- Input
- $1.2425 / 1 million tokens
- Cached input
- $0.217 / 1 million tokens
- Output
- $4.0425 / 1 million tokens
- Context
- 1,048,576
- Max output
- 131,072
$1.24/4.04per 1 million tokens · input / output
million-token-digest Use this exampleLoad module boundaries and existing tests before asking for a refactoring plan; require a file-by-file impact list and a way to check unchanged behaviour.
- 12000
- 0
- high
- Input types
- Text
- Output types
- Text
- Input
- $1.2425 / 1 million tokens
- Cached input
- $0.217 / 1 million tokens
- Output
- $4.0425 / 1 million tokens
- Context
- 1,048,576
- Max output
- 131,072
$1.24/4.04per 1 million tokens · input / output
json-brief Use this exampleWhen GLM 5.2 returns a repository refactoring report as JSON, specify the keys through response_format and the instructions, then check types and required fields in your own code.
- 16000
- 0
- high
This example starts at Input $1.2425 / Output $4.0425 per 1 million tokens. The Playground updates the estimate when you change the settings.
