# GLM 5.2 API Pricing

As of October 10, 2026, GLM 5.2 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 19 providers on LiteLLM, the input price ranges from $0.61 to $1.80. It has a 1,000,000-token context window and returns up to 128,000 tokens per response.

- Page: https://models.litellm.ai/models/glm-5.2
- Lab: Z.ai
- LiteLLM model name: `zai/glm-5.2`
- Context window: 1,000,000 tokens
- Max output: 128,000 tokens
- Added to LiteLLM: June 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.2` | $1.40 | $4.40 | $0.26 | – | – | 1M |
| Alibaba Cloud Model Studio | `dashscope/glm-5.2` | $1.40 | $4.40 | $0.28 | – | – | 1M |
| Baseten | `baseten/zai-org/GLM-5.2` | $1.40 | $4.40 | $0.14 | – | – | 1M |
| Cloudflare Workers AI | `cloudflare/@cf/zai-org/glm-5.2` | $1.40 | $4.40 | $0.26 | – | – | 256K |
| Databricks | `databricks/databricks-glm-5-2` | $1.40 | $4.40 | $0.26 | – | – | 1M |
| DeepInfra | `deepinfra/zai-org/GLM-5.2` | $0.75 | $2.40 | $0.14 | – | – | 1M |
| Fireworks AI | `fireworks_ai/accounts/fireworks/models/glm-5p2` | $1.40 | $4.40 | $0.14 | – | – | 1M |
| Fireworks AI | `fireworks_ai/glm-5p2` | $1.40 | $4.40 | $0.14 | – | – | 1M |
| FriendliAI | `friendliai/zai-org/GLM-5.2` | $1.40 | $4.40 | $0.26 | – | – | 1M |
| Google Vertex AI | `vertex_ai/zai-org/glm-5.2-maas` | $1.40 | $4.40 | $0.14 | – | – | 1M |
| Mistral AI | `mistral/glm-5-2` | $1.40 | $4.40 | $0.14 | – | – | 1M |
| Nebius AI Studio | `nebius/zai-org/GLM-5.2` | $1.40 | $4.40 | – | – | – | 1M |
| Novita AI | `novita/zai-org/glm-5.2` | $1.40 | $4.40 | $0.26 | – | – | 1M |
| Perplexity | `perplexity/perplexity/glm-5.2` | $1.40 | $4.40 | $0.14 | – | – | – |
| Qianwen AI Platform | `qwen_ai_platform/glm-5.2` | $1.40 | $4.40 | $0.28 | – | – | 1M |
| QwenCloud | `qwencloud/glm-5.2` | $1.40 | $4.40 | $0.28 | – | – | 1M |
| Scaleway | `scaleway/glm-5.2` | $1.80 | $5.50 | – | – | – | 256K |
| SCX.ai | `scx-ai/GLM-5.2` | $0.61 | $1.98 | $0.22 | – | – | 1M |
| Together AI | `together_ai/zai-org/GLM-5.2` | $1.40 | $4.40 | $0.26 | – | – | 1M |
| Weights & Biases | `wandb/zai-org/GLM-5.2` | $0.76 | $2.42 | $0.14 | – | – | 1M |

## Cost examples

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

- Z.ai: $5.00
- SCX.ai: $2.21
- DeepInfra: $2.70
- Weights & Biases: $2.73

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

- Z.ai: $14.88
- SCX.ai: $6.496
- DeepInfra: $7.98
- Weights & Biases: $8.084

## Features

Supported: Function calling, Parallel tool calls, Structured output, Image input, Reasoning, Prompt caching, Web search.

## Use it with LiteLLM

```python
from litellm import completion

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

## FAQ

### How much does GLM 5.2 cost?

GLM 5.2 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 19 providers on LiteLLM, the input price ranges from $0.61 to $1.80.

### What is the context window of GLM 5.2?

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

### Which providers offer GLM 5.2?

GLM 5.2 is available from 19 providers through LiteLLM: Z.ai, Alibaba Cloud Model Studio, Baseten, Cloudflare Workers AI, Databricks, DeepInfra, Fireworks AI, FriendliAI, Google Vertex AI, Mistral AI, Nebius AI Studio and Novita AI and 7 more. The lowest price is on SCX.ai.

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

Use the LiteLLM Python SDK with model="zai/glm-5.2", 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.2 support?

GLM 5.2 supports function calling, parallel tool calls, structured output, image input, reasoning, prompt caching and web search.

### When did LiteLLM add GLM 5.2?

GLM 5.2 was added to LiteLLM's model price file in June 2026.

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