> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hostlinku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GLM 5.2

> GLM-5.2 是一款专为长上下文任务时代设计的旗舰模型。它支持真正可用的 100 万Token上下文窗口-能够处理项目...

## 摘要

GLM-5.2 是一款专为长上下文任务时代设计的旗舰模型。 它支持真正可用的 100 万Token上下文窗口-能够处理现实世界测试中的项目级工程上下文-并在执行长距离任务时提供更高的稳定性，在遵循工程标准方面具备更高的可靠性，从而进一步提高开发场景中的成功率。 它能够通过单个任务完成整个开发生命周期-从需求定义到可跨平台部署的构建产物。

| 属性 | 值 |
| - | - |
| 提供商 | Zhipu |
| Slug | `glm-5-2` |
| 上下文 | 1,000,000 个Token |
| 最大输出 | 64,000 个Token |
| 输入 | 文本 |
| 输出 | 文本 |
| 发布日期 | 2026-06-16 |
| 标签 | 推理 |

## 能力

* `text`
* `tool-calling`
* `function-calling`
* `structured-outputs`
* `json-mode`
* `streaming`
* `reasoning`
* `code-generation`
* `long-context`
* `multilingual`

## 价格

| 项目 | 价格 |
| - | - |
| 输入（提示词） | \$1.177 |
| 输出（补全） | \$4.118 |
| 缓存读取 | \$0.294 |
| 缓存写入 | - |

该价格为API密钥Hostlinku的**100万个Token**的客户单价，其中1 kredit = 1美元。 每次请求的实际价格仍以 Service Mode API key 为准，且可能会发生变化；请查看 [控制台](https://console.hostlinku.com/models) 或 `GET /v1/models` 以获取当前有效的价格。

## 支持的端点

| 端点 | 格式 | 支持 |
| - | - | - |
| `POST /v1/chat/completions` | OpenAI Chat Completions | 可用 |
| `POST /v1/messages` | Anthropic Messages | 适配（桥接） |
| `POST /v1/responses` | OpenAI Responses | 适配（桥接） |

端点和模型的可用性遵循目录以及所使用的Service Mode API key规范。如果该模式下没有可用模型，则可能以`400 MODEL_NOT_IN_SERVICE_MODE`为由拒绝该请求。

## 请求示例

```bash theme={null}
curl https://api.hostlinku.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5-2",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'
```

## 相关模型

* [GLM 5](https://docs.hostlinku.com/zh/models/glm-5.md)
* [GLM 5.1](https://docs.hostlinku.com/zh/models/glm-5-1.md)
* [GLM 5.3](https://docs.hostlinku.com/zh/models/glm-5-3.md)
* [GLM 5.3 Hyper Chat](https://docs.hostlinku.com/zh/models/glm-5-3-hyper-chat.md)
* [GLM-5.3 Flash](https://docs.hostlinku.com/zh/models/glm-5-3-flash.md)
* [GLM-5.3 Flash Hyper](https://docs.hostlinku.com/zh/models/glm-5-3-flash-hyper.md)

[← 返回模型目录](https://docs.hostlinku.com/zh/models.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.