Skip to main content
Zhipu AI logo

GLM-5.2

ReadyLanguageby Zhipu AI

Overview

About this model

GLM-5.2 marks a substantial leap in long-horizon task capability over its predecessor GLM-5.1 and, for the first time, delivers that capability on a solid 1M-token context. GLM-5.2's new capabilities include: Solid 1M Context: A solid 1M-token context that stably sustains long-horizon work Advanced Coding with Flexible Effort: Stronger coding capabilities with multiple thinking effort levels to balance performance and latency Improved Architecture: We propose IndexShare, which reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9× at a 1M context length. We also improve GLM-5.2’s MTP layer for speculative decoding, increasing the acceptance length by up to 20% Pure Open: An MIT open-source license — no regional limits, technical access without borders

Specifications

Model details

Provider
Zhipu AI
Modality
Language
Pricing
$1.00 in · $3.00 out / 1M

Modalities: text → text

API

Call it in code

Use the OpenAI-compatible endpoint below with your EcoHash API key and this model ID.

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.ecohash.com/v1",
    api_key="YOUR_API_KEY",
)

response = client.chat.completions.create(
    model="GLM-5.2",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
)
curl
curl https://api.ecohash.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d {
    "model": "GLM-5.2",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }

Compare

GLM-5.2 vs other language models

Same API, same billing. Rates come live from the EcoHash billing system.

GLM-5.2 compared with other EcoHash language models
ModelContextPriceModalities
GLM-5.2 (this page)—$1.00 per 1M input tokens and $3.00 per 1M output tokenstext → text
gpt-oss-20b128K tokens$0.05 per 1M input tokens and $0.20 per 1M output tokenstext → text
Llama-3.1-8B-Instruct128K tokens$0.10 per 1M input tokens and $0.10 per 1M output tokenstext → text
DeepSeek-V4-Flash—$0.49 per 1M input tokens and $1.42 per 1M output tokenstext → text

FAQ

Common questions

How much does the GLM-5.2 API cost?
GLM-5.2 is $1.00 per 1M input tokens and $3.00 per 1M output tokens on EcoHash. That figure comes live from the EcoHash billing system, so the price shown on this page is the price you are billed — there is no separate list price to reconcile.
GLM-5.2 vs gpt-oss-20b: which should I use?
Both are language models on the same OpenAI-compatible EcoHash API, so moving between them is a change of model id and nothing else. GLM-5.2 has $1.00 per 1M input tokens and $3.00 per 1M output tokens. gpt-oss-20b has a 128K-token context window at $0.05 per 1M input tokens and $0.20 per 1M output tokens. Both prices come live from the EcoHash billing system; the comparison table on this page carries the current figures.
Can I use GLM-5.2 commercially through EcoHash?
EcoHash hosts GLM-5.2 under the model publisher's own licence and does not change its terms, so whether your use is permitted is decided by that licence — read it on the model publisher's own licence. The EcoHash Terms of Service additionally require you to comply with each model's licence and acceptable-use policy. Your EcoHash bill for API usage is separate from, and does not grant, any right under the model's licence.

Start building

Grab an API key and call this model in minutes.