# GLM 5.2

Z.ai's flagship for long-horizon agentic tasks, with flexible thinking effort and a 1M-token context.

Model id: `glm-5.2`
Context: 1M tokens
Max output: 1M tokens
Quantization: nvfp4
Regions: SEA
Hugging Face: [nvidia/GLM-5.2-NVFP4](https://huggingface.co/nvidia/GLM-5.2-NVFP4)

## Pricing

- Input: $0.75 / 1M tokens
- Output: $3.00 / 1M tokens

## Inputs

- text: context 1M tokens
- image: sources url, base64; formats png, jpeg, webp, gif
- file: sources url, base64; formats application/pdf, text/plain, text/markdown, text/html, text/csv, application/json; max size 100 MB

## Output: text

| Parameter | Type | Values | Default |
| --- | --- | --- | --- |
| `temperature` | number | 0–2 |  |
| `top_p` | number | 0–1 |  |
| `frequency_penalty` | number | -2–2 |  |
| `presence_penalty` | number | -2–2 |  |
| `max_tokens` | integer | 1–1048576 tokens |  |
| `stop` | array | up to 4 items |  |
| `seed` | integer |  |  |
| `continue_final_message` | boolean |  |  |
| `top_k` | integer | at least 0 |  |
| `repetition_penalty` | number | 0–2 |  |
| `n` | integer | at least 1 |  |
| `logprobs` | boolean |  |  |
| `top_logprobs` | integer | 0–20 |  |
| `response_format` | object | type: text, json_object, json_schema |  |
| `structured_outputs` | boolean |  |  |
| `reasoning_effort` | string | ultra, max, xhigh, high, medium, low, minimal |  |
| `reasoning` | object |  |  |
| `tools` | boolean |  |  |

## Endpoints

- [`POST /v1/chat/completions`](/docs/reference/create-chat-completion.md): Create Chat Completion
- [`POST /v1/responses`](/docs/reference/create-response.md): Create Response
- [`POST /v1/messages`](/docs/reference/create-message.md): Create Message
- [`POST /v1/chat/completions/RAG`](/docs/reference/rag-chat-completion.md): RAG Chat Completion
