Back to Models

GLM 4.7 Flash

zhipuzhipu/glm-4.7-flash

Zhipu AI GLM 4.7 Flash β€” free-tier lightweight model (30B total, 3B active MoE). Strong reasoning despite small active params. Rate-limited concurrency.

GLM-4.7-Flash is Zhipu AI's open-weight, completely free model in the GLM-4.7 family. Built on a 30B-A3B Mixture-of-Experts architecture (31B total parameters, only ~3B activated per token), it achieves performance on par with much larger dense models while remaining deployable on a single RTX 4090. It supports a 200K-token context window with up to 128K output tokens.

The model is designed for coding, agentic workflows, and multi-step reasoning. It introduces Preserved Thinking mode β€” a mechanism that retains internal reasoning traces across conversation turns, which is especially valuable for long-horizon tool-use scenarios such as SWE-bench-style code repair and τ²-Bench multi-turn agent tasks. GLM-4.7-Flash scored 59.2% on SWE-bench Verified, the highest reported for any 30B-class model at launch.

On TheRouter, GLM-4.7-Flash is available at $0/1M tokens on both input and output β€” making it an ideal default for teams that need a capable open-weight model with zero incremental cost. The FlashX variant (zhipu/glm-4.7-flashx) offers higher concurrency at $0.12/$0.60 per million tokens for production workloads that exhaust Flash's rate-limited concurrency.

Best for
  • β€’ Agentic coding tasks β€” SWE-bench-style bug fix, multi-file edits, and terminal-based automation where 59.2% Verified accuracy matters
  • β€’ Multi-turn agent pipelines requiring preserved reasoning across turns (τ²-Bench score: 79.5%)
  • β€’ Math-heavy reasoning at zero cost β€” 91.6% AIME 2025, rivaling frontier models while running free
  • β€’ Local self-hosted deployment on a single RTX 4090 β€” low VRAM footprint from MoE sparse activation
  • β€’ Teams with free-tier budget constraints who need a capable coding and reasoning model
Reach for something else if
  • β€’ Multimodal (vision) tasks β€” GLM-4.7-Flash is text-only; use zhipu/glm-4.6v-flash for image understanding
  • β€’ High-throughput production pipelines that require guaranteed concurrency β€” Flash has rate-limited slots; use FlashX (zhipu/glm-4.7-flashx) instead
  • β€’ Strict data-residency or SLA requirements β€” free tier lacks enterprise guarantees; consider a BYOK plan via TheRouter
  • β€’ Embedding or image generation workloads β€” text generation only; see zhipu/embedding-3 or zhipu/cogview-4
Context Length
203K
Max Output
131K

Modalities

text→text

Pricing Breakdown

Pricing not available.

Supported Parameters

temperaturemax_tokenstop_ptoolstool_choiceresponse_formatstop

Specifications

Architecture30B-A3B Mixture-of-Experts (glm4_moe_lite); 31B total parameters, ~3B active per forward passhuggingface.co/zai-org/GLM-4.7-Flash β†—verified
Context window200K tokens (202,752)docs.z.ai β†—verified
Max output tokens128K tokens (131,072)docs.z.ai β†—verified
Precision / tensor typeBF16 and F32huggingface.co/zai-org/GLM-4.7-Flash β†—verified
LicenseMIThuggingface.co/zai-org/GLM-4.7-Flash β†—verified
Supported languagesEnglish, Chinesehuggingface.co/zai-org/GLM-4.7-Flash β†—verified
Inference frameworksvLLM (main branch), SGLang (main branch), Hugging Face Transformers (main branch)huggingface.co/zai-org/GLM-4.7-Flash β†—verified
Local VRAM requirementSingle RTX 4090 (24 GB) β€” enabled by MoE sparse activationawesomeagents.ai β†—to verify
Pricing on TheRouter$0.00 / 1M input tokens, $0.00 / 1M output tokens (free tier)docs.z.ai β†—verified

Benchmarks

BenchmarkDistributionScoreSource
SWE-bench Verified
Temperature 0.7, top-p 1.0, max new tokens 16384
59.2%%huggingface.co/zai-org/GLM-4.7-Flash β†—
τ²-Bench (tau2-Bench)
Temperature 0, max new tokens 16384; Preserved Thinking mode on
79.5%%huggingface.co/zai-org/GLM-4.7-Flash β†—
AIME 2025
Temperature 1.0, top-p 0.95, max new tokens 131072
91.6%%huggingface.co/zai-org/GLM-4.7-Flash β†—
GPQA-Diamond
Temperature 1.0, top-p 0.95, max new tokens 131072
75.2%%huggingface.co/zai-org/GLM-4.7-Flash β†—
LCB v6 (LiveCodeBench)
Temperature 1.0, top-p 0.95, max new tokens 131072
64.0huggingface.co/zai-org/GLM-4.7-Flash β†—
HLE (Humanity's Last Exam)
Temperature 1.0, top-p 0.95, max new tokens 131072
14.4%%huggingface.co/zai-org/GLM-4.7-Flash β†—
BrowseComp
Temperature 1.0, top-p 0.95, max new tokens 131072
42.8%%huggingface.co/zai-org/GLM-4.7-Flash β†—

API Usage Examples

Use the global api.therouter.ai endpoint shown below for new integrations; the legacy China accelerated endpoint is retired.

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "zhipu/glm-4.7-flash",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'

Basic chat completion

GLM-4.7-Flash is fully OpenAI-compatible. Swap the model name and point baseURL to TheRouter β€” your existing SDK code works unchanged.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zhipu/glm-4.7-flash",
    "messages": [{"role": "user", "content": "Explain MoE architectures in one paragraph."}]
  }'

More from zhipu

Similar models

Cross-provider sibling models

News & changes

2026-01-20

Zhipu AI releases GLM-4.7-Flash: strongest 30B-class agent model at zero cost

Zhipu AI launched GLM-4.7-Flash, a 30B-A3B MoE model that sets a new high for the 30B class on SWE-bench Verified (59.2%) and τ²-Bench (79.5%) while remaining completely free via the Z.AI API and deployable on a single RTX 4090.

re-authored by TheRoutermarktechpost.com β†—

Frequently asked

Is GLM-4.7-Flash actually free to use on TheRouter?

Yes. GLM-4.7-Flash is priced at $0.00 per million tokens for both input and output on TheRouter and on the Z.AI API directly. The free tier has rate-limited concurrency; for production workloads needing higher throughput, use zhipu/glm-4.7-flashx at $0.12/$0.60 per million tokens.

What is Preserved Thinking mode and when should I use it?

Preserved Thinking mode retains the model's internal reasoning chain across multiple conversation turns. Z.AI recommends enabling it for multi-turn agentic tasks β€” such as τ²-Bench and Terminal Bench 2 β€” where the model needs to remember intermediate tool results and decisions from earlier turns. For single-turn Q&A or straightforward code generation, it is not necessary.

How does GLM-4.7-Flash compare to the full GLM-4.7?

GLM-4.7-Flash is the lightweight free-tier variant: 30B total / 3B active MoE, deployable on a single RTX 4090, priced at $0. The full GLM-4.7 is the flagship with 355B total / 32B active, a higher pricing tier, and stronger absolute performance. Both share the 200K context window and 128K output limit.

Can I run GLM-4.7-Flash locally on my own GPU?

Yes. The model weights are on HuggingFace (zai-org/GLM-4.7-Flash) under an MIT license. It supports vLLM (main branch), SGLang (main branch), and Hugging Face Transformers (main branch). The MoE sparse activation keeps the active parameter footprint at ~3B, which fits on a single 24 GB RTX 4090.

What is the difference between GLM-4.7-Flash and GLM-4.7-FlashX?

Both use the same 30B-A3B MoE architecture. Flash is the free-tier variant with rate-limited concurrency slots β€” suitable for development, prototyping, and low-traffic production. FlashX (zhipu/glm-4.7-flashx) is the paid variant at $0.12/$0.60 per million input/output tokens that provides higher throughput for production workloads.

Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Architecturehuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
Context windowdocs.z.ai β†—2026-06-09verified
Max output tokensdocs.z.ai β†—2026-06-09verified
Precision / tensor typehuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
Licensehuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
Supported languageshuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
Inference frameworkshuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
Local VRAM requirementawesomeagents.ai β†—2026-06-09to verify
Pricing on TheRouterdocs.z.ai β†—2026-06-09verified
SWE-bench Verifiedhuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
τ²-Bench (tau2-Bench)huggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
AIME 2025huggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
GPQA-Diamondhuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
LCB v6 (LiveCodeBench)huggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
HLE (Humanity's Last Exam)huggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
BrowseComphuggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09verified
Zhipu AI releases GLM-4.7-Flash: strongest 30B-class agent model at zero costmarktechpost.com β†—2026-06-09verified
Is GLM-4.7-Flash actually free to use on TheRouter?docs.z.ai β†—2026-06-09to verify
What is Preserved Thinking mode and when should I use it?docs.z.ai/guides/capabilities/thinking-mode β†—2026-06-09to verify
How does GLM-4.7-Flash compare to the full GLM-4.7?docs.z.ai β†—2026-06-09to verify
Can I run GLM-4.7-Flash locally on my own GPU?huggingface.co/zai-org/GLM-4.7-Flash β†—2026-06-09to verify
What is the difference between GLM-4.7-Flash and GLM-4.7-FlashX?docs.z.ai β†—2026-06-09to verify
Help & contact