Models / Z.ai
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...

Input
$1.2558 / 1M tokens
Output
$3.9468 / 1M tokens
Context
203K tokens

Capabilities

✓ Streaming✓ Tool / function calling✓ JSON / structured output○ Vision (image input)

Call this model

Pass z-ai/glm-5.1 as the model. Change only the base URL from your existing OpenAI SDK setup.

quickstart.sh
curl https://modeldatabase.com/v1/chat/completions \
  -H "Authorization: Bearer $MDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.1",
    "messages": [{"role":"user","content":"Hello!"}]
  }'

Prices are final — the routing margin is already included. See the full pricing table or the API docs.