# GLM 5.2

GLM 5.2 costs $0.84 per 1M input tokens and $2.64 per 1M output tokens on LLM API, with a 1M-token context window.

Model ID: `zai-glm-5.2` · Z.ai · Text generation · Released June 16, 2026
Updated: 2026-10-27
Canonical: https://llmapi.ai/models/zhipu-zai-glm-5-2/

- Input: $0.84 (list $1.4) per 1M tokens
- Output: $2.64 (list $4.4) per 1M tokens
- Cache read: $0.156 (list $0.26) per 1M tokens
- Context: 1M tokens
- Max output: 4K tokens

## Pricing

Lowest price among 4 providers, after discounts.

| Price | Amount | Per |
| --- | --- | --- |
| Input | $0.84 (list $1.4) | per 1M tokens |
| Output | $2.64 (list $4.4) | per 1M tokens |
| Cache read | $0.156 (list $0.26) | per 1M tokens |

**Volume pricing.** At higher monthly volume, GLM 5.2 may cost less. Book a call and sales will quote a price for your usage. [Book a call with sales](https://meetings.hubspot.com/julia-andriienko/llmapi) or [Create an account first](https://app.llmapi.ai/signup).

## Providers

Prices after each provider’s discount; the lowest in bold.

| Provider | Input / 1M | Output / 1M | Cache read / 1M | Context | Max output |
| --- | --- | --- | --- | --- | --- |
| [Nebius](https://llmapi.ai/providers/nebius/) | $1.4 | $4.4 | $0.26 | 1M | 4K |
| [Novita AI](https://llmapi.ai/providers/novita/) (−40%) | **$0.84** | **$2.64** | **$0.156** | 1M | 4K |
| [Z.ai](https://llmapi.ai/providers/zai/) | $1.4 | $4.4 | $0.26 | 1M | 4K |
| [CanopyWave](https://llmapi.ai/providers/canopywave/) (−15%) | $1.19 | $3.74 | $0.221 | 1M | 4K |

## Features

“Some providers”: not every provider of this model supports it.

- Tools: Yes
- Parallel tool calls: No
- Image input: No
- Reasoning: Yes
- Prompt caching: Yes
- Structured outputs: Yes
- JSON mode: Some providers
- Streaming: Yes
- Web search: Yes

## Call GLM 5.2

### Chat Completions (`POST /v1/chat/completions`)

Set LLMAPI_KEY to your LLM API key.

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

response = client.chat.completions.create(
    model="zai-glm-5.2",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

Docs: [Chat Completions docs](https://docs.llmapi.ai/api/v1/chat/completions)

## More from Z.ai

- [GLM-5.3](https://llmapi.ai/models/zhipu-glm-5-3/): $0.98 / $3.08 per 1M input / output
- [GLM-5.3-Flash](https://llmapi.ai/models/zhipu-glm-5-3-flash/): $0.118 / $0.472 per 1M input / output
- [GLM-5V-Turbo](https://llmapi.ai/models/z-ai-glm-5v-turbo/): $1.2 / $4 per 1M input / output

Prices synced 2026-11-09.

Next step: [Get API key](https://app.llmapi.ai/signup)
