Skip to main content

Moderate
zai/glm-5.2/chat

GLM 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.

Input $1.2425Output $4.0425per 1 million tokens8% below the publisher's list priceCached input $0.217Z.ai official priceInput $1.40Output $4.40

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

    A GLM 5.2 review can compare the implementation with its API contract and identify which changes need regression checks.

    • 6000
    • 0.2
    • high
    Use this example
  • 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

    Load 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
    Use this example
  • 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

    When 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
    Use this example

This example starts at Input $1.2425 / Output $4.0425 per 1 million tokens. The Playground updates the estimate when you change the settings.