Zhipu AI
GLM-4.7
Zhipu AI's latest flagship model with coding capabilities matching Claude Sonnet 4, supporting 200K ultra-long context, deep reasoning and tool calling
Context Length200K tokens
Model TypeLarge Language Model (LLM)
Special CapabilitiesCode generation, deep reasoning, tool calling
ๅฎไปทไธ่งๆ ผ
๐ฐ ๅฎไปท
่พๅ
ฅ$2 / M tokens
่พๅบ$8 / M tokens
Cached$0.4 / M tokens
โ๏ธ ่งๆ ผ
Context Length200K tokens
Model TypeLarge Language Model (LLM)
Special CapabilitiesCode generation, deep reasoning, tool calling
Language OptimizationChinese
API ่ฐ็จ็คบไพ
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.xairouter.com/v1",
api_key="your-api-key"
)
response = client.chat.completions.create(
model="glm-4.7",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)cURL
curl https://api.xairouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "glm-4.7",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'