Zhipu AI logo
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

Category Text Model ID glm-4.7
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!"}
    ]
  }'