GLM52.pro

GLM 5.2 API Pricing: OpenRouter, Z.ai, Free Access and Cost Examples

GLM 5.2 pricing depends on the provider route, token volume, and whether you are using ordinary chat completions, coding-agent loops, or long repository context. This page uses the currently listed OpenRouter numbers as a transparent baseline and points out where you must verify direct Z.ai pricing before production use.

Price comparison

ModelInput / 1MOutput / 1MContextAccess
GLM 5.2 (z-ai/glm-5.2)featured$1.20$4.101M tokensOpenRouter
GLM 5.2 (glm-5.2)Check Z.aiCheck Z.ai1M tokensZ.ai direct
Claude Fable$3.00$15.00200KAPI providers
GPT-4o$2.50$10.001MOpenAI

OpenRouter lists z-ai/glm-5.2 at $1.20 input and $4.10 output per 1M tokens, with 1M tokens of context. Provider pricing can change, so verify live dashboards before committing budget.

Free vs paid GLM 5.2 access

Searches for free GLM 5.2 API often mix two different ideas: hosted API trials and open-weight local usage. Hosted API calls are normally paid after credits or trial limits, because providers must serve the model on real infrastructure. Open weights can reduce provider dependency for research, but you still pay through hardware, cloud GPU rental, engineering time, or lower throughput. Treat any free or unlimited API claim as temporary until the provider confirms it.

Cost by use case

2K input + 1K output

Chat app

$6.50 per 1,000 calls

Useful for ordinary assistant turns where output is shorter than the prompt context.

8K input + 4K output

Coding agent

$26.00 per 1,000 calls

Planning, patch generation, and test-fix loops can increase both input and output tokens.

80K input + 8K output

Long-context repo review

$128.80 per 1,000 calls

The 1M context is valuable, but large repository prompts should be budgeted separately.

Where to access GLM 5.2 API

Z.ai (Official)
Direct API with the glm-5.2 model ID and official account relationship.
https://api.z.ai/api/paas/v4
Visit
Z.ai Coding
Dedicated Coding Plan path for OpenCode-style workflows.
https://api.z.ai/api/coding/paas/v4
Visit
OpenRouter
Use model z-ai/glm-5.2 with OpenAI-compatible clients and unified billing.
https://openrouter.ai/api/v1
Visit
HuggingFace
Open weights for local deployment, research, and self-hosted experiments.
https://huggingface.co/zai-org/GLM-5.2
Visit

Pricing next step

If you are still choosing between providers, read the GLM 5.2 API guide for model IDs and endpoints, then use the Coding Plan guide to estimate whether planning-heavy workflows will increase token usage.