TokenRoute
Get started
Back to models

Z.ai: GLM 5.1

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...

Pricing

Input$0.6762 /M
Output$2.13 /M
Cache read$0.1256 /M

Specs

Context length204.8K tokens
Max output128K tokens
Inputtext
Outputtext

Quickstart

Point the OpenAI SDK at https://tokenroute.app/api/v1 and use a TokenRoute API key.

bash
curl https://tokenroute.app/api/v1/chat/completions \
  -H "Authorization: Bearer $TOKENROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.1",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

Supported parameters

frequency_penalty
include_reasoning
logit_bias
logprobs
max_tokens
min_p
presence_penalty
reasoning
repetition_penalty
response_format
seed
stop
structured_outputs
temperature
tool_choice
tools
top_k
top_logprobs
top_p