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

# GLM API - 通过 AIsa 访问智谱 AI glm-5

> 智谱 GLM 模型访问指南，包括精确小写模型 ID glm-5、上下文窗口、endpoint、能力和价格。

AIsa 为智谱 AI 的 GLM 家族提供 OpenAI 兼容访问。当前 AIsa 目录暴露的精确模型 ID 是 `glm-5`；API 调用中请使用小写。

`glm-5` 使用 `POST /v1/chat/completions`。

## 支持的 GLM 模型

| 模型 ID   |     上下文 | 能力           |  输入 / 1M |  输出 / 1M | 适合           |
| ------- | ------: | ------------ | -------: | -------: | ------------ |
| `glm-5` | 128,000 | Coding, Text | \$0.4011 | \$1.8060 | 中文推理、双语文档、编程 |

## Quickstart

```python theme={null}
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["AISA_API_KEY"], base_url="https://api.aisa.one/v1")

response = client.chat.completions.create(
    model="glm-5",
    messages=[{"role": "user", "content": "Analyze the competitive dynamics of China's cloud computing market."}]
)
print(response.choices[0].message.content)
```

## 适合使用 `glm-5` 的场景

* 中文推理和长篇分析
* 中英双语文档处理
* 中文开发语境下的编程帮助
* 需要 Alibaba、ByteDance、MiniMax 和 Moonshot 之外的模型家族

## 数据隐私

通过 AIsa 发出的 GLM 请求受 AIsa 与智谱 AI 的企业协议保护。客户数据不会用于模型训练。如需合规要求，请[联系我们](mailto:developer@aisa.one)。

## 下一步

* [所有中国 AI 模型](/zh/guides/chinese-llms)
* [MiniMax 模型](/zh/guides/chinese-llms/minimax)
* [所有支持的 AIsa 模型](/zh/guides/models)
