AI Proxy Documentation

Intelligent AI Request Router with Smart Monitoring

← Back to Home

Z.ai GLM Coding Plan - Complete Reference

Last Updated: February 21, 2026 Provider: Zhipu AI (Z.ai / BigModel.cn) Documentation Sources: z.ai | docs.z.ai | open.bigmodel.cn

Related:

Looking for more details? See the Z.ai Knowledge Base for comprehensive documentation including model specs, integrations, known issues, and historical changes.


Quick Summary

Z.ai’s GLM Coding Plan is a subscription-based AI coding service marketed as “1/7 the cost of Claude, 3x the usage”. It uses Zhipu AI’s GLM models (GLM-4.7, GLM-5) and is compatible with major coding tools like Claude Code, Cursor, Cline, and Roo Code.

Feature Value
Models GLM-4.7 (358B params), GLM-5 (754B params)
Context Window 128K - 200K tokens
Pricing Range $10 - $80/month (International)
Quota System 5-hour rolling window (prompts)
API Compatibility OpenAI + Anthropic compatible

Table of Contents

  1. Subscription Tiers & Pricing
  2. Usage Limits & Quotas
  3. Model Access by Tier
  4. API Endpoints & Authentication
  5. Concurrency & Rate Limits
  6. MCP Tool Limits
  7. Integration with Coding Tools
  8. Recent Changes (2026)
  9. Comparison with Competitors
  10. Troubleshooting & Known Issues

Subscription Tiers & Pricing

International Pricing (USD) - Post February 12, 2026

Plan Monthly Quarterly Yearly
Lite $10/month $27/quarter $84/year
Pro $30/month $81/quarter $252/year
Max $80/month $216/quarter $672/year

China Pricing (CNY) - Post February 12, 2026

Plan Monthly Quarterly Yearly
Lite ¥49/month ¥132/quarter ¥411/year
Pro ¥149/month ¥402/quarter ¥1,251/year
Max ¥469/month ¥1,266/quarter ¥3,939/year

Price Increase Notice

Effective February 12, 2026: Z.ai increased prices by 30%+ and cancelled first-purchase discounts. Existing subscribers maintain their original pricing (grandfathered in).


Usage Limits & Quotas

5-Hour Rolling Window Limits

The core quota system is based on a 5-hour rolling window, not fixed reset times. Quota dynamically recovers as requests age out of the 5-hour window.

Plan Prompts per 5 Hours Weekly (Estimated) Monthly (Estimated)
Lite ~120 prompts ~9,000 prompts ~18,000 prompts
Pro ~600 prompts ~45,000 prompts ~90,000 prompts
Max ~2,400 prompts ~180,000 prompts ~360,000 prompts

Important Notes

MCP Tool Quotas (Monthly)

Plan MCP Tool Allowance
Lite 100 calls/month
Pro 1,000 calls/month
Max 4,000 calls/month

Model Access by Tier

Model Specifications

Model Parameters Context SWE Score Availability
GLM-4.7 358B 128K - 200K 0.68 All tiers
GLM-4.6 ~300B 128K - 200K 0.68 All tiers
GLM-4.5 ~250B 128K 0.65 All tiers
GLM-4.5-Air ~200B 128K 0.62 All tiers
GLM-5 754B TBD ~0.75+ Pro, Max only
GLM-5-Code 754B TBD ~0.78 Pro, Max only

Tier Model Access

Feature Lite Pro Max
GLM-4.7 ✓ ✓ ✓
GLM-4.6 ✓ ✓ ✓
GLM-4.5 ✓ ✓ ✓
GLM-4.5-Air ✓ ✓ ✓
GLM-5 ✗ (planned) ✓ ✓
GLM-5-Code ✗ ✓ ✓
Early Access ✗ ✗ ✓

GLM-5 Details


API Endpoints & Authentication

Base URLs

Platform Base URL
Z.ai International https://api.z.ai/api/paas/v4/
BigModel China https://open.bigmodel.cn/api/paas/v4/
Anthropic Compatible https://open.bigmodel.cn/api/anthropic

Coding Plan Specific Endpoint

Coding Plan subscribers must use a different endpoint than standard API users:

/api/coding/paas/v4

Authentication Methods

Bearer Token (Direct API Key)

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-4.7-flash",
    "messages": [
      {"role": "user", "content": "Write a Python function to parse CSV files"}
    ],
    "max_tokens": 4096
  }'

Environment Variables for Claude Code

macOS/Linux:

export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"
export ANTHROPIC_API_KEY="YOUR_ZAI_API_KEY"

Windows PowerShell:

$env:ANTHROPIC_BASE_URL = "https://open.bigmodel.cn/api/anthropic"
$env:ANTHROPIC_API_KEY = "YOUR_ZAI_API_KEY"

Windows CMD:

set ANTHROPIC_BASE_URL=https://open.bigmodel.cn/api/anthropic
set ANTHROPIC_API_KEY=YOUR_ZAI_API_KEY

Python SDK

from openai import OpenAI

client = OpenAI(
    api_key="your-zai-api-key",
    base_url="https://api.z.ai/api/paas/v4/",
)

completion = client.chat.completions.create(
    model="glm-4.7-flash",
    messages=[{"role": "user", "content": "Hello, write code"}],
)

Key Management


Concurrency & Rate Limits

Official Documentation Status

Important: Zhipu AI does NOT publicly document specific TPM (Tokens Per Minute) or RPM (Requests Per Minute) rate limits for GLM Coding Plan subscriptions. Their documentation focuses on “prompts per 5 hours” rather than per-minute limits.

Known Concurrency Limits

Source Limit Notes
GLM-4.7-Flash Free 1 concurrent request Free tier limitation
Standard API ~10 QPS For GLM-4.7 on direct API
Coding Plan Undocumented Varies by tier, not publicly specified

Peak Hour Restrictions

Known Issues (as of January 2026):

Official Capacity Measures

Since January 23, 2026:

Tier Concurrency Differences

Tier Concurrency
Lite Standard (may lag during peak)
Pro Enhanced (40-60% faster generation)
Max Ultra-high, no lag guaranteed
  1. Avoid peak hours when possible (15:00-18:00 weekdays)
  2. Use Max tier for production/high-concurrency needs
  3. Enable auto-renewal for more stable resource allocation
  4. Monitor usage with quota tracking tools like opencode-glm-quota

MCP Tool Limits

MCP Tools Available

Monthly MCP Quotas

Plan Monthly MCP Calls
Lite 100 calls/month
Pro 1,000 calls/month
Max 4,000 calls/month

MCP Usage Tracking

The 24-hour rolling window tracks:

Use the opencode-glm-quota tool for real-time monitoring.


Integration with Coding Tools

Supported Tools

Z.ai GLM Coding Plan is compatible with 10+ mainstream coding tools:

Tool Integration Method
Claude Code Anthropic-compatible API
Cursor OpenAI-compatible API
Cline OpenAI-compatible API
Roo Code OpenAI-compatible API
OpenCode Native support
Codex CLI Custom integration
Kilo Code Custom integration

Claude Code Integration

Step 1: Set Environment Variables

# For Anthropic-compatible endpoint
export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"
export ANTHROPIC_API_KEY="your-zai-coding-plan-api-key"

Step 2: Configure Model

In Claude Code settings or .claude/settings.json:

{
  "provider": "anthropic",
  "model": "glm-4.7"
}

Cursor Integration

Settings → API Providers → Custom:

{
  "baseURL": "https://api.z.ai/api/paas/v4/",
  "apiKey": "your-api-key",
  "model": "glm-4.7"
}

Cline (VS Code Extension)

Settings JSON:

{
  "cline.apiUrl": "https://api.z.ai/api/paas/v4/",
  "cline.apiKey": "your-api-key",
  "cline.model": "glm-4.7"
}

Recent Changes (2026)

February 12, 2026 - Price Increase

Change Detail
Price Increase 30%+ across all tiers
First-Purchase Discount Cancelled
Quarterly/Annual Discounts Retained
Existing Subscribers Grandfathered at original pricing

GLM-5 Launch

Feature Availability
Pro/Max Tiers Immediate access
Lite Tier “Coming later” (no date specified)
Parameters 754B (vs GLM-4.7’s 358B)
Performance Approaches Claude Opus 4.5
Token Cost Significantly higher consumption

Capacity Constraints

Since January 2026:


Comparison with Competitors

Value Proposition

Metric Z.ai GLM Pro Claude Pro Ratio
Price $30/month $20/month 1.5x
5-Hour Quota ~600 prompts ~40 prompts 15x
Value $0.05/prompt $0.50/prompt 10x better

Market Positioning

Z.ai claims “21x better value than Claude”:

Chinese Market Alternatives

Provider Lite Pro Max
Zhipu GLM ¥49/m ¥149/m ¥469/m
Alibaba Qwen ¥40/m ¥200/m N/A
Moore Threads ¥120/q ¥600/q ¥1200/q
Volcano Ark ¥9.9/m* ¥49.9/m* N/A

*First-month promotional pricing


Troubleshooting & Known Issues

Common Error Messages

Error Cause Solution
并发限流 Too many concurrent requests Reduce concurrency, wait for off-peak
Quota exceeded 5-hour window limit reached Wait for quota to recover (5-hour rolling)
API key invalid Wrong endpoint or key Verify key matches platform (z.ai vs bigmodel.cn)

Known Issues

1. Undocumented Concurrency Limit (GitHub Issue)

2. Peak Hour Slowdowns

3. GLM-5 High Token Consumption

Getting Help


SDKs & Libraries

Official SDKs

Language Package/Link
Python pip install zhipuai
Java github.com/zai-org/z-ai-sdk-java
MCP Server npm package @z_ai/mcp-server
OpenAI Compatible Use standard OpenAI SDK with custom base_url

Monitoring Tools


Quick Start Checklist


Cross-References

Internal Documentation

External Documentation


This document is maintained as a living reference. Last comprehensive search: February 21, 2026.