4 个模型 · chat / code / reasoning / tools · 输入价低至 $1/M
为什么经 Synthorai 使用 Z.ai
- 按量付费,无需订阅。 一把 key 用全部模型,无需 Z.ai 账号。
- 零提示词留存。 网关默认零提示词留存;上游适用 Z.ai 自身的 API 数据政策。 详情 →
- 提示词缓存。 自动提示词缓存:重复的提示词前缀按价格表所示的缓存命中费率计费,无需改代码。 缓存读取低至 $0.2/M。
Z.ai 模型与价格
| 模型 | 输入 /M | 输出 /M | 缓存读取 /M | 上下文 |
|---|---|---|---|---|
| GLM-5.1 | $1.4 | $4.4 | $0.26 | 200K |
| GLM-5.2 | $1.4 | $4.4 | $0.26 | 1M |
| GLM-5-Turbo | $1.2 | $4 | $0.24 | 205K |
| GLM-5 | $1 | $3.2 | $0.2 | 200K |
厂商牌价,无平台加价。各模型页价格实时刷新。 以下为官方 list 价。登录客户可在 /console/pricing 查看含工作空间折扣的实际价格。
30 秒用上 Z.ai 模型
from openai import OpenAI
client = OpenAI(
base_url="https://synthorai.io/v1",
api_key="sk-syn-...",
)
resp = client.chat.completions.create(
model="glm-5.1",
messages=[{"role": "user", "content": "Summarize this diff"}],
reasoning_effort="medium",
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.chat.completions.create({
model: "glm-5.1",
messages: [{ role: "user", content: "Summarize this diff" }],
reasoning_effort: "medium",
});
console.log(resp.choices[0].message.content);curl https://synthorai.io/v1/chat/completions \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.1",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "medium"
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
Model: "glm-5.1",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Summarize this diff"),
},
ReasoningEffort: openai.ReasoningEffortMedium,
})
fmt.Println(resp.Choices[0].Message.Content)
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.models.ReasoningEffort;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ChatCompletion resp = client.chat().completions().create(
ChatCompletionCreateParams.builder()
.model("glm-5.1")
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));关于 Z.ai
Z.ai(前身为智谱)打造 GLM 家族:编码与智能体性能突出、价格激进的前沿开源权重模型;GLM-5.2 是网关上性价比最高的选择之一。Synthorai 通过与其他所有模型相同的 OpenAI 兼容端点提供 GLM,价格实时更新,支持处按提示词缓存读取计费。
常见问题
不订阅怎么拿到 Z.ai API key?
不需要 Z.ai 账号:注册 Synthorai,创建一把 API key,本页所有 Z.ai 模型都能通过 OpenAI 兼容端点调用,按量付费,无需订阅(标注「邀请测试」的模型还需申请通过)。
Z.ai API 什么价格?
按 token 计费的模型输入价低至 $1/M;每个模型的实时单价见上表,厂商牌价,无平台加价。
可以用自己的 Z.ai 密钥(BYOK)吗?
Z.ai 的 BYOK 暂未开放,请求经 Synthorai 的托管通道按所列费率运行。
Z.ai 的 API 数据留存策略是什么?
网关默认零提示词留存;上游适用 Z.ai 自身的 API 数据政策。