GLM 4.5

Chat Completions API
glm-4.5
отZ.aiСоздана 20 сент. 2025 г.128K контекст
Chat Completions API

GLM-4.5 is the latest flagship foundation model from Z.AI, specifically designed for agent-based applications. It utilizes a Mixture-of-Experts (MoE) architecture and supports context lengths of up to 128k tokens. GLM-4.5 offers significantly improved capabilities in reasoning, code generation, and agent alignment. It features a hybrid inference mode with two options: a "thinking mode," tailored for complex reasoning and tool usage, and a "non-thinking mode," optimized for instant responses.

Пример кода

Пример использования модели через API на Python или cURL. Замените значения-заполнители своим API-ключом и ID модели.

Базовый пример запроса. Проверьте разрешения API-ключа. Подробнее см. документацию.
curl https://api.makura.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "model": "glm-4.5",
  "messages": [
    {
      "role": "user",
      "content": "Сколько будет 2 + 2?"
    }
  ]
}'