GLM 5.1

GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. Unlike previous models built around minute-level interactions, GLM-5.1 can work independently and continuously on a single task for more than 8 hours, autonomously planning, executing, and improving itself throughout the process, ultimately delivering complete, engineering-grade results.

ChatZhipu205k tokens$1.053 / $3.3094 · 1M

z-ai/glm-5.1

Context
205k tokens
Completion cap
128,000
Tools
Yes
JSON
Yes
Released
2026-04-07

Call it from Geek Hub

Same OpenAI SDK. Change the base URL and the model id.

curl https://api.geekhub.mx/v1/chat/completions \
  -H "Authorization: Bearer $GEEKHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.1",
    "messages": [{"role": "user", "content": "Hola"}]
  }'
Get an API key

Frequently asked questions

What is GLM 5.1?
GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. Unlike previous models built around minute-level interactions, GLM-5.1 can work independently and continuously on a single task for more than 8 hours, autonomously planning, executing, and improving itself throughout the process, ultimately delivering complete, engineering-grade results. GLM 5.1 runs on the Geek Hub API (OpenAI-compatible). Model id: z-ai/glm-5.1.
Is GLM 5.1 free?
No. Input is $1.053 per 1M tokens and output is $3.3094 per 1M tokens on Geek Hub (markup included).
What is the context length of GLM 5.1?
GLM 5.1 has a 205k tokens context window. It supports up to 128,000 completion tokens.
Does GLM 5.1 support tool calling and structured outputs?
GLM 5.1 accepts tools and tool_choice for function calling. It also supports structured outputs via a JSON schema in response_format.
When was GLM 5.1 released?
GLM 5.1 was released on 2026-04-07.

More models from Zhipu