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

- Page: https://models.litellm.ai/models/glm-5.1
- Lab: Z.ai
- LiteLLM model name: `zai/glm-5.1`
- Context window: 200,000 tokens
- Max output: 128,000 tokens
- Added to LiteLLM: May 2026
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| Z.ai | `zai/glm-5.1` | $1.40 | $4.40 | $0.26 | – | – | 200K |
| Alibaba Cloud Model Studio | `dashscope/glm-5.1` | $1.40 | $4.40 | $0.26 | – | – | 203K |
| DeepInfra | `deepinfra/zai-org/GLM-5.1` | $1.05 | $3.50 | $0.205 | – | – | 198K |
| Fireworks AI | `fireworks_ai/accounts/fireworks/models/glm-5p1` | $1.40 | $4.40 | $0.26 | – | – | 203K |
| Fireworks AI | `fireworks_ai/glm-5p1` | $1.40 | $4.40 | $0.26 | – | – | 203K |
| FriendliAI | `friendliai/zai-org/GLM-5.1` | $1.40 | $4.40 | $0.26 | – | – | 198K |
| Nebius AI Studio | `nebius/zai-org/GLM-5.1` | $1.40 | $4.40 | – | – | – | 198K |
| Novita AI | `novita/zai-org/glm-5.1` | $1.38 | $4.40 | $0.26 | – | – | 200K |
| Qianwen AI Platform | `qwen_ai_platform/glm-5.1` | $1.40 | $4.40 | $0.26 | – | – | 203K |
| QwenCloud | `qwencloud/glm-5.1` | $1.40 | $4.40 | $0.26 | – | – | 203K |
| Together AI | `together_ai/zai-org/GLM-5.1` | $1.40 | $4.40 | $0.26 | – | – | 198K |

## Cost examples

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

## Features

Supported: Function calling, Parallel tool calls, Structured output, Reasoning, Prompt caching.

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="zai/glm-5.1",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

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

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
