Models/z-ai

glm-5.1· Released Apr 7, 2026

z-ai/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...

Input
From$1.26/M
Output
From$3.96/M
Context
Up to 205K
Max output
Up to 128K
Modalities
TextText

Input and output show the lowest price across upstreams, for reference. Your actual prices are listed per upstream below.

Upstreams & pricing
UpstreamContextMax outputInput $/1MOutput $/1MCached input $/1M
Zenlayer AI Gateway-openai_compat (Global)From price
205K128K
$1.26
$3.96
$0.234

Routed in real time — you pay the listed price of whichever upstream serves your call.

How to call
curlrequest.sh
curl https://api.tkex.ai/v1/chat/completions \
  -H "Authorization: Bearer $TX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.1",
    "messages": [
      {"role": "user", "content": "Say hello in five words."}
    ]
  }'