---
title: GLM-5.2 | Runware Docs
url: https://runware.ai/docs/models/zai-glm-5-2
description: Flagship long-horizon coding LLM with usable 1M context and stronger end-to-end engineering execution
---
# GLM-5.2

![GLM-5.2](https://assets.runware.ai/covers/zai-glm-5-2.jpg)

GLM-5.2 is Z.ai's flagship language model for long-horizon coding, agentic engineering, and sustained multi-step execution. It is designed to keep large project context coherent over extended runs, with a 1M token context window, 128K max output, multiple thinking modes, function calling, structured output, context caching, streaming, and MCP support for tool-rich workflows.

- **Status**: compatible-only
- **ID**: `zai-glm-5-2`
- **Context window**: 1M context
- **Max output**: 128K output
- **Creator**: Z.ai
- **Release Date**: June 16, 2026
- **Zero Data Retention**: Yes
- **Capabilities**: Text to Text, Checkpoint

**GLM-5.2** is served through Runware's **compatible endpoints**, which take another provider's request format. Point the SDK you already use at Runware by changing the base URL and the API key, and set `model` to `zai:glm@5.2`.

Requests and responses keep the provider's format, so **its reference documents every parameter**.

| Endpoint | Format |
| --- | --- |
| `/v1/chat/completions` | [OpenAI Chat Completions](https://runware.ai/docs/tools/compatible-apis#openai-chat-completions) |

### [Chat Completions](https://runware.ai/docs/models/zai-glm-5-2#chat-completions)

**cURL**:

```bash
curl -X POST https://api.runware.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai:glm@5.2",
    "messages": [{"role": "user", "content": "What is the capital of France?"}]
  }'
```

**Python**:

```python
from openai import OpenAI

client = OpenAI(
    api_key="your_runware_api_key",
    base_url="https://api.runware.ai/v1",
)

response = client.chat.completions.create(
    model="zai:glm@5.2",
    messages=[{"role": "user", "content": "What is the capital of France?"}],
)

print(response.choices[0].message.content)
```

**TypeScript**:

```typescript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'your_runware_api_key',
  baseURL: 'https://api.runware.ai/v1',
});

const response = await client.chat.completions.create({
  model: 'zai:glm@5.2',
  messages: [{ role: 'user', content: 'What is the capital of France?' }],
});

console.log(response.choices[0].message.content);
```

[Compatible APIs](https://runware.ai/docs/tools/compatible-apis#openai-chat-completions) covers streaming, tool calling and how the endpoint differs from OpenAI, and the [OpenAI API reference](https://platform.openai.com/docs/api-reference/chat/create) lists every parameter.

## Cost and speed

**Rates** (per 1M tokens)

- Input: `$0.80`
- Output: `$2.55`
- Cached input: `$0.16`

billed per token, so a request costs what the model produced · [How pricing works](https://runware.ai/docs/models-api/pricing)