Zhipu AI logo
Zhipu AI

GLM-4.6

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 zai-glm-4.6
Context Length200K tokens
Model TypeLarge Language Model (LLM)
Special CapabilitiesCode generation, deep reasoning, tool calling

ๅฎšไปทไธŽ่ง„ๆ ผ

๐Ÿ’ฐ ๅฎšไปท

่พ“ๅ…ฅ$2.25 / M tokens
่พ“ๅ‡บ$2.75 / 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="zai-glm-4.6",
    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": "zai-glm-4.6",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'