LiteLLMModels

GLM 5.1 API Pricing

As of October 10, 2026, GLM 5.1 costs $1.40 per 1M input tokens and $4.40 per 1M output tokens on Z.ai, with cache reads at $0.26 and cache writes at $0 per 1M tokens. Across 10 providers on LiteLLM, the input price ranges from $1.05 to $1.40. It has a 200,000-token context window and returns up to 128,000 tokens per response.

By Z.aiModel ID zai/glm-5.1Prices updated Checked
Input
$1.40 / 1M tokens
Output
$4.40 / 1M tokens
Cache read
$0.26 / 1M tokens
Context window
200,000 tokens
Max output
128,000 tokens
Providers
10
Added to LiteLLM
May 2026

GLM 5.1 pricing by provider

11 listings across 10 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.

ProviderModel name in LiteLLMInputOutputCache readCache writeContext
Z.aizai/glm-5.1$1.40$4.40$0.26$0200K
Alibaba Cloud Model Studiodashscope/glm-5.1$1.40$4.40$0.26–203K
DeepInfradeepinfra/zai-org/GLM-5.1$1.05$3.50$0.205–198K
Fireworks AIfireworks_ai/accounts/fireworks/models/glm-5p1$1.40$4.40$0.26–203K
Fireworks AIfireworks_ai/glm-5p1$1.40$4.40$0.26–203K
FriendliAIfriendliai/zai-org/GLM-5.1$1.40$4.40$0.26–198K
Nebius AI Studionebius/zai-org/GLM-5.1$1.40$4.40––198K
Novita AInovita/zai-org/glm-5.1$1.38$4.40$0.26–200K
Qianwen AI Platformqwen_ai_platform/glm-5.1$1.40$4.40$0.26–203K
QwenCloudqwencloud/glm-5.1$1.40$4.40$0.26–203K
Together AItogether_ai/zai-org/GLM-5.1$1.40$4.40$0.26–198K

What GLM 5.1 costs in practice

1,000 requests with 2,000 input and 500 output tokens each

Z.ai$5.00
DeepInfra$3.85
Novita AI$4.96
Alibaba Cloud Model Studio$5.00

100 long-document requests with 100,000 input and 2,000 output tokens each

Z.ai$14.88
DeepInfra$11.20
Novita AI$14.68
Alibaba Cloud Model Studio$14.88

GLM 5.1 features

Use GLM 5.1 with LiteLLM

Call GLM 5.1 through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.

Python SDK
from litellm import completion

response = completion(
    model="zai/glm-5.1",
    messages=[{"role": "user", "content": "Hello!"}],
)
Proxy config.yaml
model_list:
  - model_name: glm-5.1
    litellm_params:
      model: zai/glm-5.1
      # credentials: see the provider's LiteLLM docs page
Call the proxy
curl http://0.0.0.0:4000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-1234" \
  -d '{
    "model": "glm-5.1",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

GLM 5.1 FAQ

How much does GLM 5.1 cost?

GLM 5.1 costs $1.40 per 1M input tokens and $4.40 per 1M output tokens on Z.ai, with cache reads at $0.26 and cache writes at $0 per 1M tokens. Across 10 providers on LiteLLM, the input price ranges from $1.05 to $1.40.

What is the context window of GLM 5.1?

GLM 5.1 has a 200,000-token context window and returns up to 128,000 tokens per response.

Which providers offer GLM 5.1?

GLM 5.1 is available from 10 providers through LiteLLM: Z.ai, Alibaba Cloud Model Studio, DeepInfra, Fireworks AI, FriendliAI, Nebius AI Studio, Novita AI, Qianwen AI Platform, QwenCloud and Together AI. The lowest price is on DeepInfra.

How do I call GLM 5.1 with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="zai/glm-5.1", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

What features does GLM 5.1 support?

GLM 5.1 supports function calling, parallel tool calls, structured output, reasoning and prompt caching.

When did LiteLLM add GLM 5.1?

GLM 5.1 was added to LiteLLM's model price file in May 2026.

Sources

Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:

LiteLLM docs: Z.ai, Alibaba Cloud Model Studio, DeepInfra, Fireworks AI, FriendliAI, Nebius AI Studio.

Provider pages: Z.ai, Alibaba Cloud Model Studio, DeepInfra, Fireworks AI, FriendliAI, Nebius AI Studio, Novita AI, Qianwen AI Platform, QwenCloud, Together AI.