智谱 AI / GLM
概述
智谱 AI 是国内知名的 AI 厂商,推出了 GLM 系列大模型。智谱同时提供国内版和海外版,还有专门面向编程工具的 Coding Plan。
两个平台的区别:
🇨🇳 国内版:
🌐 海外版:
两者的 API Key 不互通,模型列表也略有不同。
🇨🇳 国内版:
open.bigmodel.cn(开放平台,API 地址 https://open.bigmodel.cn/api/anthropic)🌐 海外版:
z.ai(Z.AI 平台,API 地址 https://api.z.ai/api/anthropic)两者的 API Key 不互通,模型列表也略有不同。
获取 API Key(国内版)
1
注册智谱开放平台
访问 open.bigmodel.cn,用手机号注册。
2
获取 API Key
登录后进入 API Keys 管理页面,创建新密钥。
3
充值或开通 Coding Plan
标准 API 按量付费,支持支付宝、微信。如果想要更高速率和专属编程功能,可以考虑 Coding Plan。
智谱 Coding Plan
智谱的 Coding Plan 是专门面向编程工具(如 Cursor、OpenClaw、Windsurf 等)的月付方案。使用 Coding Plan 时,API 地址和普通 API 不同。
重要:Coding Plan 使用 Anthropic 兼容格式的 API,地址是
https://open.bigmodel.cn/api/anthropic,和标准 API 地址不一样。配置时注意区分。
配置到 OpenClaw
国内版(标准 API):
openclaw configure --provider zhipu-cn
{
"providers": {
"zhipu-cn": {
"baseUrl": "https://open.bigmodel.cn/api/anthropic",
"apiKey": "你的密钥",
"models": ["glm-4.7"]
}
}
}
海外版(Z.AI):
openclaw configure --provider zhipu-global
{
"providers": {
"zhipu-global": {
"baseUrl": "https://api.z.ai/api/anthropic",
"apiKey": "你的密钥",
"models": ["glm-5", "glm-4.7"]
}
}
}
openclaw gateway restart
可用模型
| 模型 | 平台 | 特点 |
|---|---|---|
| glm-4.7 | 国内 + 海外 | 主力模型,综合能力强 |
| glm-5 | 海外版 | 最新旗舰模型 |