# GLM-5.2

## Best for

Long coding tasks that run for hours and work with text

## When not to use

Image, video, or audio. Prefer GLM-5.3 Flash for native vision, video, and cheaper 1M-context serving.

## Overview

GLM-5.2 is Z.AI's flagship model for agentic engineering. Its mixture-of-experts and DSA architecture is built for coding tasks that need repeated work over a long session. It is text-only and has a 1,048,576-token context window.

| | |
| --- | --- |
| API identifier | `glm-5.2` |
| Developer | Z.ai |
| Context window | 1,048,576 tokens |
| Supports | text, reasoning, tool-use |
| Status | Serving |

## Rates

USD per 1M tokens, on-demand tier.

| Input | Cached input | Output |
| --- | --- | --- |
| $0.34 | $0.17 | $2.30 |

## Call it

Put `glm-5.2` in the `model` field. The same request works against the Anthropic Messages API — see [API Compatibility](https://inference.boundless.network/docs/api-compatibility).

```bash
curl https://api.inference.boundless.network/v1/chat/completions \
  -H "Authorization: Bearer $BOUNDLESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "messages": [{
      "content": "Say hello",
      "role": "user"
    }]
  }'
```

Every model we serve is listed at [Models](https://inference.boundless.network/models); the rate card in full is on [Pricing](https://inference.boundless.network/docs/pricing).
