Doubleword
    Agentic Engineering
    Thinking Mode
    1M Context
    FP8
    Z.ai
    Open Weights

    GLM-5.2-FP8

    Z.ai's next-generation flagship for agentic software engineering. Significantly stronger coding than GLM-5.1, with a 1M-token context window for sustained repository-scale workflows.

    Quantization

    FP8

    GLM MoE

    Context Window

    1M

    Tokens

    Intelligence

    33.7

    AA Index v4.3

    License

    Open

    Open Weights

    About

    A Major Step Up From GLM-5.1

    GLM-5.2-FP8 is Z.ai's latest flagship open model for long-horizon agentic work, coding, and complex engineering. It pairs stronger real-world coding performance with a 1M-token context window — ideal for repository-scale workflows, extended terminal sessions, debugging, tool orchestration, and ambiguous multi-step projects.

    Under the hood, GLM-5.2 uses Z.ai's improved GLM MoE architecture with FP8 quantization, IndexShare sparse-attention optimization, and enhanced speculative decoding via improved MTP — reducing long-context compute while improving throughput. Thinking mode is on by default; disable with {"chat_template_kwargs": {"enable_thinking": false}}.

    SWE
    Repo
    Term
    Tools
    Plan
    Iter

    Flagship Agentic Engineering Model

    Use Cases

    Best for sustained engineering agents

    Agentic Engineering

    Strong performance on SWE-bench Pro, NL2Repo, DeepSWE, FrontierSWE and SWE-Marathon — built for multi-file edits and repository-scale work.

    Terminal & Tool Use

    Tuned for Terminal Bench 2.1 workflows — sustained tool calls, shell execution, and iterative debugging across long sessions.

    Long-Horizon Reasoning

    1M-token context plus IndexShare sparse attention keeps the model productive over extended planning, experimentation and iteration loops.

    Repository Generation

    Top-tier NL2Repo performance — turn specs, tickets and prompts into working codebases without losing the thread mid-build.

    Benchmarks

    Artificial Analysis Intelligence Index

    AA Intelligence Index v4.3 scores. GLM-5.2 holds frontier-tier reasoning while taking a clear step up on agentic engineering benchmarks over GLM-5.1.

    33.7

    Intelligence Index

    Better than 92% of models

    85

    GPQA Diamond

    Better than 93% of models

    98

    τ²-Bench Telecom

    Better than 95% of models

    CategoryBenchmarkScore
    ReasoningGPQA Diamond85%
    ReasoningHumanity's Last Exam29%
    Reasoningτ²-Bench Telecom98%
    ReasoningAA-LCR64%
    ReasoningIFBench77%
    ReasoningGDPval-AA54%
    CodingSWE-bench Pro47%
    CodingTerminal Bench 2.148%
    CodingNL2Repo52%
    CodingSciCode46%
    KnowledgeAA-Omniscience Accuracy28%
    KnowledgeAA-Omniscience Non-Hallucination73%

    Metrics sourced from Artificial Analysis and Z.ai's published evaluations. Reasoning (thinking) mode enabled.

    Pricing

    Flexible Pricing Tiers

    Choose the optimal balance of speed and cost for your workflow. Prices are per 1M tokens.

    TierInput / 1M tokensOutput / 1M tokens
    Batch$0.47$1.50
    Async$0.70$2.25
    Realtime$0.93$3.00

    Context window natively supported up to 1,048,576 tokens.

    Quickstart

    Start Building in Minutes

    GLM-5.2-FP8 is accessible via OpenAI-compatible endpoints. Default sampling: temperature=1.0, top_p=0.95.

    Python
    from openai import OpenAI
    
    client = OpenAI(
        api_key="your-api-key-here",
        base_url="https://api.doubleword.ai/v1"
    )
    
    # Long-horizon agentic coding task (thinking enabled by default)
    response = client.chat.completions.create(
        model="zai-org/GLM-5.2-FP8",
        messages=[
            {"role": "user", "content": "Refactor this repo to use async I/O end-to-end."}
        ],
        temperature=1.0,
        top_p=0.95,
        # To disable step-by-step reasoning:
        # extra_body={"chat_template_kwargs": {"enable_thinking": False}},
    )
    
    print(response.choices[0].message.content)

    💡 Pro Tip

    GLM-5.2 is built for long-horizon agentic work — let it sustain reasoning across planning, tool use, experiments, and iterative debugging. Keep thinking mode on for ambiguous tasks. Disable with "chat_template_kwargs": {"enable_thinking": false} for latency-sensitive endpoints.