AI教程 glm-5 大模型使用指南 AI API
2026年GLM-5使用教程:从入门到精通
为什么选择 GLM-5?
GLM-5 由 智谱AI 推出,在 中文理解 方面表现出色,定价仅 ¥0.0005/1K,是2026年最具性价比的AI模型之一。
快速入门
1. 注册账号
访问 [UGOOE AI](https://ai.ugooe.cn/pages/register.html) 注册,即送 $5 体验金。
2. 获取API Key
注册成功后,在控制台获取您的专属 API Key。
3. 调用示例
import requests
# 使用 glm-5 模型
response = requests.post(
"https://ai.ugooe.cn/api/chat",
json={{
"api_key": "您的API_KEY",
"model": "glm-5",
"message": "请用中文介绍自己",
"stream": False
}}
)
print(response.json()["response"])
4. 流式输出(推荐)
import requests, json
response = requests.post(
"https://ai.ugooe.cn/api/chat",
json={{
"api_key": "您的API_KEY",
"model": "glm-5",
"message": "写一篇500字的文章",
"stream": True
}},
stream=True
)
for line in response.iter_lines():
if line:
data = json.loads(line.decode().replace('data: ', ''))
print(data.get("content", ""), end="")
高级技巧
常见问题
**Q: 充值后多久到账?**
A: USDT充值即时到账,支付宝/微信人工审核后到账。
**Q: 如何选择模型?**
A: 代码任务选 DeepSeek V4 Pro,对话聊天选 GPT-5,中文创作选 GLM-5。
🚀 立即注册 [UGOOE](https://ai.ugooe.cn/pages/register.html),开启您的AI之旅!