Zhipu AIPremium plan

GLM 5

Z.ai's GLM-5 via the Vercel AI Gateway: stronger systems engineering, long-horizon agentic work, and enterprise document generation with 202k context. Function calling supported. Served only by zero-data-retention providers. Does not support web search or image input.

You always get the exact model you pick — we never silently route you to another.

About GLM 5

GLM-5 earns its place as a developer's workhorse through focused, reliable coding ability — not sprawling generalism. Built by Zhipu AI, China's first publicly-traded AI company, this 744B-parameter Mixture-of-Experts model activates only 40B parameters per token, delivering 76.8 tokens per second with low latency. Its MIT-licensed open weights and native support for local deployment give teams real commercial flexibility that proprietary alternatives rarely offer. People consistently point to its structured code generation as a standout — producing clean functions, classes, and modules from natural language descriptions with solid attention to edge cases. On SWE-Bench Lite it scores 53.33%, and with extended agentic tasks it has demonstrated autonomous operation across multi-hour loops. The tradeoff is real, though: GLM-5 struggles with long-horizon reasoning and architectural consistency across sessions, making it less suited to ambiguous, multi-step system design than to well-scoped engineering tasks. At $1.00 per million input tokens via third-party providers (or $0.60 on Z.ai directly), it sits at a fair price for what it delivers — strong, predictable coding help for developers who know what they need built.

Best for

  • Code generation and completion — writing functions, classes, and modules from natural language with attention to edge cases and polish
  • Debugging and root cause analysis — reasoning through failures and tracing errors across multi-file codebases
  • Test scaffolding — generating test suites and coverage structures for existing code
  • Code review and refactoring — identifying improvements and restructuring code with agentic tool support
  • Extended autonomous engineering tasks — suitable for long-running agentic loops on well-defined, scoped workflows

Specifications

ProviderZhipu AI
Released2026-02
IntelligenceHigh
SpeedMedium
Context window202,800 tokens
Max output128,000 tokens
Knowledge cutoffApproximately February 2026
Input price$1.00 / 1M tokens
Output price$3.20 / 1M tokens
Request cost1 premium request
Plan tierPremium
InputText
OutputText
FeaturesFunction calling supported, Served through the Vercel AI Gateway (zai/glm-5), Zero data retention and no prompt training
Model IDglm-5

Frequently asked questions

On the Z.ai API, GLM-5 is priced at $0.60 per million input tokens and $1.92 per million output tokens. Through OpenRouter and other providers, prices are typically $1.00 per million input tokens and $3.20 per million output tokens.

GLM-5 supports a 200,000-token context window with a maximum output of 128,000 tokens. The follow-on release, GLM-5.2, expanded this to 1,000,000 tokens.

Yes. GLM-5 is released under the MIT license with weights available on Hugging Face, allowing commercial use and local deployment, though self-hosting requires a minimum of 8xH100 GPUs.

Structured code generation, debugging, test scaffolding, and extended agentic coding tasks within well-defined scopes. It scores 53.33% on SWE-Bench Lite and achieves 86% on GPQA Diamond.

It has limited capacity for long-horizon reasoning across multi-step or ambiguous workflows, and tends to produce verbose output — generating roughly 110 million output tokens in evaluations compared to a median of 43 million for comparable models.

GLM-5.1 improved on most benchmarks, including SWE-Bench Pro at 58.4 (above GPT-5.4's 57.7) and AIME at 95.3%. GLM-5 is the original release and remains available via API and open weights.

Related models