GLM-5.2 (OpenRouter free) API

OpenRouter · serves glm-5.2

Pricing

Input / 1M$0.00
Output / 1M$0.00
Blended / 1M$0cheapest of 22
Context window131,072 tokens
Max output32,768 tokens
LicenseOpen weights · MIT permissive
Knowledge cutoffJanuary 2026 · source
Intelligence index52.6 Artificial Analysis Intelligence Index · source

textfunction-calling

Price verified 2026-09-03 (2 days ago) · sourcesingle source

Sources

SourceInput / 1MOutput / 1MVerified
OpenRouter$0.00$0.002026-09-03

Single source — no second reference available to cross-check.

Latency measured

RegionTTFT p50TTFT p95Total p50Total p95ThroughputSamples
eu-paris0

Time-to-first-token, measured server-side. Measured 2026-09-04 (0 days ago).

Call it

OpenAI-compatible endpoint — set OPENROUTER_API_KEY.

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2:free",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
from openai import OpenAI  # pip install openai

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="...",  # OPENROUTER_API_KEY
)
resp = client.chat.completions.create(
    model="z-ai/glm-5.2:free",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

Price unchanged since 2026-09-03 — 1 point on record.

Use this data

Raw JSON for this page: glm-5.2.json. Free to reuse under CC BY 4.0 with attribution to apipriceindex.com.