GLM-4.7 是智谱最新旗舰模型,重点围绕两部分做了升级:更强的编程能力与更稳定的多步骤推理/执行能力。在执行复杂智能体任务提升明显,同时具有更自然的对话体验和更好的前端审美。限时免费!
| Provider | Max Input | Max Output | Context length | Tool Calling |
|---|---|---|---|---|
z-ai z-ai/glm-4.7 | 1.28M | 32.2M | 32.2M | Supported |
from openai import OpenAI
client = OpenAI(
base_url="https://api.openroute.cn/v1",
api_key="<ONTOROUTE_API_KEY>",
)
completion = client.chat.completions.create(
model="glm-4.7",
messages=[
{
"role": "user",
"content": "Write a one-sentence bedtime story about a unicorn.",
}
],
)
print(completion.choices[0].message.content)暂无调用数据
Prices are CNY (¥) per million tokens, billed as you go. Cache reads can cut the cost of repeated context.
| Parameter | Description | Default |
|---|---|---|
| tools | Tools | Set per request |