# GLM-5.2

> Z.ai's flagship long-horizon reasoning and coding model with a 1M-token context window.

Agent resources: the index of everything machine-readable is https://www.ohmygpt.com/llms.txt; the integration skill (endpoints, auth, SDK and coding-tool setup) is https://www.ohmygpt.com/skill.md.

- Model ID: `zhipu/glm-5.2`
- Live status and providers as JSON, no key needed: https://api.ohmygpt.com/v1/models/zhipu/glm-5.2
- Released: 2026-06-17
- Context: 1M tokens
- Max output: 128K tokens
- Input: text; output: text
- Knowledge cutoff: 2025-04
- Capability score: 153 (as of 2026-11-10, see https://www.ohmygpt.com/rankings.md)
- Human preference rating (LMArena text): 1469

## Prices (USD)

| Item | Price | Unit |
| --- | --- | --- |
| Input | $0.66–$1.54 | per 1M tokens |
| Output | $2.3106–$4.84 | per 1M tokens |
| Cache read | $0.165–$0.286 | per 1M tokens |

## Providers

Without a prefix each request goes to the best-priced healthy provider. To pin one, send the model as `<provider>:zhipu/glm-5.2`.

| Provider | Pinned model ID | Location | Input | Output | Trains on your data |
| --- | --- | --- | --- | --- | --- |
| Tencent Cloud TokenHub | `tencent:zhipu/glm-5.2` | China | $0.9344 | $3.2704 | no |
| Together AI | `together:zhipu/glm-5.2` | United States | $1.54 | $4.84 | no |
| Alibaba Cloud (Model Studio Intl) | `alibaba:zhipu/glm-5.2` | Global (HK/DE/JP) | $0.66 | $2.3106 | no |

## Endpoints

| API | Request | model |
| --- | --- | --- |
| OpenAI Chat | POST https://api.ohmygpt.com/v1/chat/completions | `zhipu/glm-5.2` |
| OpenAI Responses | POST https://api.ohmygpt.com/v1/responses | `zhipu/glm-5.2` |
| Anthropic Messages | POST https://api.ohmygpt.com/v1/messages | `zhipu/glm-5.2` |
| Google Gemini | POST https://api.ohmygpt.com/v1/models/zhipu/glm-5.2:generateContent | `zhipu/glm-5.2` |

## Example

```bash
curl https://api.ohmygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $OHMYGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zhipu/glm-5.2",
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      }
    ]
  }'
```

Web page: https://www.ohmygpt.com/models/zhipu/glm-5.2
