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

    51

    AA Index

    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.0 scores. GLM-5.2 holds frontier-tier reasoning while taking a clear step up on agentic engineering benchmarks over GLM-5.1.

    51

    Intelligence Index

    Better than 92% of models

    85

    GPQA Diamond

    Better than 93% of models

    98

    τ²-Bench Telecom

    Better than 95% of models

    Category Benchmark Score Description
    Reasoning GPQA Diamond 85% Graduate-level scientific reasoning
    Reasoning Humanity's Last Exam 29% Frontier reasoning evaluation
    Reasoning τ²-Bench Telecom 98% AI agents in dual-control scenarios
    Reasoning AA-LCR 64% Long context reasoning evaluation
    Reasoning IFBench 77% Instruction-following accuracy
    Reasoning GDPval-AA 54% Agentic performance on real-world work tasks
    Coding SWE-bench Pro 47% Real-world software engineering tasks
    Coding Terminal Bench 2.1 48% Agentic coding & terminal use
    Coding NL2Repo 52% Natural-language to repository generation
    Coding SciCode 46% Python for scientific computing
    Knowledge AA-Omniscience Accuracy 28% Proportion of correctly answered questions
    Knowledge AA-Omniscience Non-Hallucination 73% Confidently answered questions that are correct

    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.

    Tier Input / 1M tokens Output / 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.