Unlock exclusive introductory pricing for the newly launched Gemini 3.5 Flash.
Z

GLM-4.7

Ввод:$0.96/M
Вывод:$3.84/M
Контекст:200K
Максимальный вывод:128K
Дата выпуска:Oct 1, 2025

GLM-4.7 is Z.AI’s latest flagship model, featuring upgrades in two key areas: enhanced programming capabilities and more stable multi-step reasoning/execution. It demonstrates significant improvements in executing complex agent tasks while delivering more natural conversational experiences and superior front-end aesthetics.

Новый
Коммерческое использование

Playground для GLM-4.7

Изучите Playground GLM-4.7 — интерактивную среду для тестирования моделей и выполнения запросов в реальном времени. Попробуйте промпты, настройте параметры и итерируйте мгновенно, чтобы ускорить разработку и проверить варианты использования.

What GLM-4.7 is

GLM-4.7 is Z.ai / Zhipu AI’s latest flagship open-foundation large language model (model name glm-4.7). It is positioned as a developer-oriented “thinking” model with particular improvements in coding/agentic task execution, multi-step reasoning, tool invocation, and long-context workflows. The release emphasizes large context handling (up to 200K context), high maximum output (up to 128K tokens), and specialized “thinking” modes for agentic pipelines.

Main features

  • Agentic / tool-use improvements: Built-in thinking modes (“Interleaved Thinking”, “Preserved Thinking”, turn-level control) to let the model “think before acting”, retain reasoning across turns, and be more stable when calling tools or executing multi-step tasks. This is aimed at robust agent workflows (terminals, tool chains, web browsing).
  • Coding & terminal competence: Significant improvements on coding benchmarks and terminal automation tasks — vendor benchmarks show clear gains vs GLM-4.6 in SWE-bench and Terminal Bench metrics. This translates to better multi-turn code generation, command sequencing and recovery in agent environments.
  • “Vibe coding” / frontend output quality: Improved default UI/layout quality for generated HTML, slides and presentations (cleaner layouts, sizing, better visual defaults).
  • Long-context workflows: 200K token context window and tools for context caching; practical for multi-file codebases, long documents, and multi-round agent sessions.

Benchmark performance

GLM-4.7’s publisher/maintainers and community benchmark tables report substantial gains vs GLM-4.6 and competitive results against other contemporary models on coding, agentic and tool usage tasks. Selected numbers (source: official Hugging Face / Z.AI published tables):

  • LiveCodeBench-v6 (coding agent benchmark): 84.9 (open-source SOTA cited).
  • SWE-bench Verified (coding): 73.8% (up from 68.0% in GLM-4.6).
  • SWE-bench Multilingual: 66.7% (+12.9% vs GLM-4.6).
  • Terminal Bench 2.0 (agentic terminal actions): 41.0% (notable +16.5% improvement over 4.6).
  • HLE (complex reasoning with tools): 42.8% when used with tools (big improvement reported vs prior versions).
  • τ²-Bench (interactive tool invocation): 87.4 (reported open-source SOTA).

Typical use cases & example scenarios

  • Agentic coding assistants: Autonomous or semi-autonomous code generation, multi-turn code fixes, terminal automation and CI/CD scripting.
  • Tool-driven agents: Web browsing, API orchestration, multi-step workflows (supported by preserved thinking & function calling).
  • Front-end and UI generation: Automatic website scaffolding, slide decks, posters with improved aesthetics and layout.
  • Research & long-context tasks: Document summarization, literature synthesis, and retrieval-augmented generation across long documents (200k token window is helpful here).
  • Interactive educational agents / coding tutors: Multi-turn tutoring with preserved reasoning that remembers prior reasoning blocks across a session.

How to access and use GLM 4.7 API

Step 1: Sign Up for API Key

Log in to cometapi.com. If you are not our user yet, please register first. Sign into your CometAPI console. Get the access credential API key of the interface. Click “Add Token” at the API token in the personal center, get the token key: sk-xxxxx and submit.

Step 2: Send Requests to MiniMax M2.1 API

Select the “glm-4.7” endpoint to send the API request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience. Replace <YOUR_API_KEY> with your actual CometAPI key from your account. Where to call it: Chat-style APIs.

Insert your question or request into the content field—this is what the model will respond to . Process the API response to get the generated answer.

Step 3: Retrieve and Verify Results

Process the API response to get the generated answer. After processing, the API responds with the task status and

Цены для GLM-4.7

Изучите конкурентоспособные цены на GLM-4.7, разработанные для различных бюджетов и потребностей использования. Наши гибкие планы гарантируют, что вы платите только за то, что используете, что упрощает масштабирование по мере роста ваших требований. Узнайте, как GLM-4.7 может улучшить ваши проекты, сохраняя при этом управляемые расходы.

Comet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
Ввод:$0.96/M
Вывод:$3.84/M
Ввод:$1.2/M
Вывод:$4.8/M
-20%

Пример кода и API для GLM-4.7

Получите доступ к исчерпывающим примерам кода и ресурсам API для GLM-4.7, чтобы упростить процесс интеграции. Наша подробная документация предоставляет пошаговые инструкции, помогая вам использовать весь потенциал GLM-4.7 в ваших проектах.

#!/bin/bash

# Get your CometAPI key from https://api.cometapi.com/console/token
COMETAPI_KEY="${COMETAPI_KEY:-<YOUR_COMETAPI_KEY>}"

# glm-4.7: Zhipu GLM-4.7 model via chat/completions
curl -s https://api.cometapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -d '{
    "model": "glm-4.7",
    "messages": [
      {
        "role": "user",
        "content": "Hello! Tell me a short joke."
      }
    ]
  }'

cURL Code Example

#!/bin/bash

# Get your CometAPI key from https://api.cometapi.com/console/token
COMETAPI_KEY="${COMETAPI_KEY:-<YOUR_COMETAPI_KEY>}"

# glm-4.7: Zhipu GLM-4.7 model via chat/completions
curl -s https://api.cometapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -d '{
    "model": "glm-4.7",
    "messages": [
      {
        "role": "user",
        "content": "Hello! Tell me a short joke."
      }
    ]
  }'

Python Code Example

from openai import OpenAI
import os

# Get your CometAPI key from https://api.cometapi.com/console/token
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com/v1"

client = OpenAI(base_url=BASE_URL, api_key=COMETAPI_KEY)

# glm-4.7: Zhipu GLM-4.7 model via chat/completions
completion = client.chat.completions.create(
    model="glm-4.7",
    messages=[
        {"role": "user", "content": "Hello! Tell me a short joke."}
    ]
)

print(completion.choices[0].message.content)

JavaScript Code Example

import OpenAI from "openai";

// Get your CometAPI key from https://api.cometapi.com/console/token
const COMETAPI_KEY = process.env.COMETAPI_KEY || "<YOUR_COMETAPI_KEY>";
const BASE_URL = "https://api.cometapi.com/v1";

const client = new OpenAI({
  apiKey: COMETAPI_KEY,
  baseURL: BASE_URL,
});

// glm-4.7: Zhipu GLM-4.7 model via chat/completions
async function main() {
  const completion = await client.chat.completions.create({
    model: "glm-4.7",
    messages: [{ role: "user", content: "Hello! Tell me a short joke." }],
  });

  console.log(completion.choices[0].message.content);
}

main().catch(console.error);