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

GLM-4.7

Masukan:$0.96/M
Keluaran:$3.84/M
Konteks:200K
Keluaran Maksimum:128K
Dilancarkan: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.

Baru
Penggunaan komersial

Playground untuk GLM-4.7

Terokai Playground GLM-4.7 โ€” persekitaran interaktif untuk menguji model dan menjalankan pertanyaan dalam masa nyata. Cuba prompt, laraskan parameter, dan ulangi serta-merta untuk mempercepatkan pembangunan dan mengesahkan kes penggunaan.

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

Harga untuk GLM-4.7

Terokai harga yang kompetitif untuk GLM-4.7, direka bentuk untuk memenuhi pelbagai bajet dan keperluan penggunaan. Pelan fleksibel kami memastikan anda hanya membayar untuk apa yang anda gunakan, menjadikannya mudah untuk meningkatkan skala apabila keperluan anda berkembang. Temui bagaimana GLM-4.7 boleh meningkatkan projek anda sambil mengekalkan kos yang terurus.

Comet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
Masukan:$0.96/M
Keluaran:$3.84/M
Masukan:$1.2/M
Keluaran:$4.8/M
-20%

Kod contoh dan API untuk GLM-4.7

Akses kod sampel yang komprehensif dan sumber API untuk GLM-4.7 bagi memperlancar proses integrasi anda. Dokumentasi terperinci kami menyediakan panduan langkah demi langkah, membantu anda memanfaatkan potensi penuh GLM-4.7 dalam projek anda.

#!/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);