Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

Popular Guides

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
Prompt guide
MediaGLM-5.2

GLM-5.2 Official Documentation: Overview and API Quick Start (docs.z.ai)

Original source

Z.ai official developer documentation (docs.z.ai)

AuthorZ.ai (Zhipu International)

Source date2026-06-16

Tabbit curation2026-08-19

Read original

One-sentence takeaway

The official standard integration configuration for GLM-5.2 is: model name glm-5.2, a 1M context window / 128K maximum output, thinking.type: enabled + reasoning_effort: max, and temperature: 1.0. You can copy the curl / Python examples directly to make your first call and review the typical use cases identified by the official documentation.

Use cases

  • Suitable tasks: first-time GLM-5.2 API integration; understanding and modifying an entire project-level codebase; long-horizon tasks; the complete development workflow from requirements to a deployable product; research reproduction (paper → runnable project); and official example scenarios such as WeChat Mini Program migration, mini-game development, on-device debugging loops, and Code-to-Video loops.

  • Unsuitable tasks: tasks requiring visual/multimodal input (GLM-5.2 supports text input and text output only); scenarios where the official API has not made strict structured output with json_schema available (see the migration guide).

  • Applicable model versions: GLM-5.2 (API model ID glm-5.2; GLM-5.2 in the GLM Coding Plan; GLM-5.2[1m] can be used in Claude Code to enable a 1M context window).

  • Applicable clients, Agents, or APIs: the official Z.ai API (https://api.z.ai/api/paas/v4/chat/completions, OpenAI-compatible protocol); the official Python/Java SDKs and OpenAI Python SDK; and the GLM Coding Plan (ZCode, Claude Code, OpenCode, and others).

  • Recommended reasoning tier and parameters: thinking: {"type": "enabled"} (thinking is enabled by default); reasoning_effort supports high / max (the default is max, and the official recommendation for coding tasks is max); temperature defaults to 1.0 and top_p defaults to 0.95; max_tokens supports up to 128K; maximum context length is 1M.

Ready-to-use content

At-a-glance specs (official)

ItemValue
PositioningFlagship foundation model
Input modalityText
Output modalityText
Context length1M tokens
Maximum output128K tokens
CapabilitiesThinking Mode, streaming output, Function Call, context caching, structured output (JSON), MCP

Typical use cases identified by the official documentation

  • Taking over an entire project-level codebase: put the entire project into the model at once for it to understand

  • Long-horizon refactoring: have the model run real engineering tasks end to end

  • Production-grade standard stress testing: test whether the model can hold up under demanding engineering constraints

  • Closed-loop debugging on mobile devices: from code implementation to device verification

  • WeChat Mini Program development: migrate a web application to a Mini Program

  • Mini-game development: from gameplay rules to a playable loop

  • Research reproduction: from papers and data to a runnable engineering project

  • Code-to-Video loop: from a natural-language idea to a demonstrable video

Basic call (official Quick Start, reproduced verbatim)

curl -X POST "https://api.z.ai/api/paas/v4/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
  "model": "glm-5.2",
  "messages": [
    {
      "role": "system",
      "content": "You are a senior full-stack software engineer, proficient in frontend development, backend architecture design, and modern web technology stacks."
    },
    {
      "role": "user",
      "content": "Design and build a personal blog website for me, including a homepage, article list page, and article detail page, using React + Node.js technology stack."
    }
  ],
  "thinking": {
    "type": "enabled"
  },
  "reasoning_effort": "max",
  "max_tokens": 4096,
  "temperature": 1.0
}'

Streaming call (official Quick Start, reproduced verbatim)

curl -X POST "https://api.z.ai/api/paas/v4/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
  "model": "glm-5.2",
  "messages": [
    {
      "role": "system",
      "content": "You are a senior full-stack software engineer, proficient in frontend development, backend architecture design, and modern web technology stacks."
    },
    {
      "role": "user",
      "content": "Design and build a personal blog website for me, including a homepage, article list page, and article detail page, using React + Node.js technology stack."
    }
  ],
  "thinking": {
    "type": "enabled"
  },
  "reasoning_effort": "max",
  "stream": true,
  "max_tokens": 4096,
  "temperature": 1.0
}'

Official promotional points (relevant to usage decisions)

  • "Solid 1M context": the 1M context window was specially trained for coding-agent scenarios (large-scale implementation, automated research, performance optimization, and complex debugging), rather than merely being able to "accept more tokens."

  • It ranks highest among open-source models on FrontierSWE, PostTrainBench, and SWE-Marathon; on FrontierSWE, it trails Claude Opus 4.8 by only about 1%.

  • Standard coding benchmarks: Terminal-Bench 2.1 is 81.0 (GLM-5.1 is 63.5; the official documentation page says 62.0), and SWE-bench Pro is 62.1 (GLM-5.1 is 58.4). The gap with Opus 4.8 (85.0) has narrowed, and GLM-5.2 leads Gemini 3.1 Pro.

  • Before release, it was made available early to GLM Coding Plan users. Developer feedback focused on stronger project-level context handling, more stable execution of long tasks, better adherence to engineering standards, and stronger client-side and mobile engineering capabilities.

Notes and limitations

  • This page describes the vendor's self-reported capabilities and configuration; the benchmark scores use the vendor's methodology. See the evaluation directory for independent third-party verification (NIST CAISI, Arena.ai, and others).

  • The documentation gives two Terminal-Bench 2.1 comparisons: 81.0 vs. 62.0 in one place, and 81.0 vs. 63.5 (GLM-5.1) in another. The official blog reports 81.0 vs. 63.5; use the blog figure as the reference.

Curated by Tabbit

Prompt material is summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

GLM-5.2

Use in Tabbit

GLM-5.2

Related prompts

MediaZ.ai official developer documentation (docs.z.ai, Get Started / Migrate)2026-06

Official Configuration Guide for Migrating from GLM-5.1 / GLM-5 / GLM-4.x to GLM-5.2

MediaZ.ai Official Developer Documentation (docs.z.ai, Capabilities / Thinking Mode)

GLM-5.2 Thinking Mode Configuration: Default Thinking / Interleaved Thinking / Preserved Thinking / Turn-level Thinking (Official)

CommunityX.com (Twitter), @arena (official Arena.ai account)2026-06-27

Arena.ai Frontend Coding Head-to-Head: 10 Single-shot Generation Examples Comparing GLM-5.2 (Max) and Claude Opus 4.8 (Thinking)

Mediarentry.org (the author's self-hosted prompt library, recommended by the SillyTavernAI community)2026-08-07

GLM-5.2 Role-Playing (RP) System Prompt: Evening-Truth Complete Dark-Version Prompt

GLM-5.2

Related reviews

OfficialZ.ai official blog2026-06-16

GLM-5.2 Official Release Notes and Complete Benchmark Table (Z.ai Blog)

MediaNIST (National Institute of Standards and Technology) official news site2026-07-17

NIST CAISI's Independent Capability Assessment of Z.ai GLM-5.2

Mediarentry.org (a page describing the author's personal prompt library)2026-03-09

Evening-Truth's Complaints About Z.AI Coding Plan Response Quality and Quantization Suspicions

MediaHugging Face official blog (Security incident disclosure)2026-07

Hugging Face Security Incident Forensics: GLM-5.2 Used for Self-Hosted Attack Log Analysis (Real-World Project Report)