| glm-5.1 | glm-5.2 | |
|---|---|---|
| Providers | Zhipu AI | Zhipu AI |
| Input $/M | $0.91 | $1.21 |
| Output $/M | $3.64 | $4.24 |
| Output multiplier | ×4.00 | ×3.50 |
| Context window | 200K tokens | — |
| Intelligence index | — | — |
| Coding index | 55.8 | 68.8 |
Input pricing is close — 1.33× apart — so the decision should come down to measured quality on your own evaluation set rather than headline cost.
Tags: glm-5.1 — Chat, Reasoning, Coding · glm-5.2 — Chat, Reasoning, Coding
from openai import OpenAI
client = OpenAI(base_url="https://starseaapi.com/v1", api_key="sk-...")
# glm-5.1
client.chat.completions.create(model="glm-5.1", messages=[{"role":"user","content":"Hi"}])
# glm-5.2
client.chat.completions.create(model="glm-5.2", messages=[{"role": "user", "content": "Hi"}])