Back to Models
z-ai logo
z-ai/glm-4-7

GLM 4.7

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.

12/22/2025
202,752 tokens
Input: ¥107.22/M
Output: ¥393.14/M

Specifications

Modalities

Input
text
Output
text

Supported Parameters

frequency_penalty
include_reasoning
logit_bias
max_tokens
min_p
presence_penalty
reasoning
repetition_penalty
response_format
seed
stop
structured_outputs
temperature
tool_choice
tools
top_k
top_p

Reasoning Configuration

Default
Thinking on
Turning thinking off
Possible (reasoning.enabled: false)

How to control thinking, and what it costs

Code Examples

curl https://api.fastmetal.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "glm-4.7",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

How GLM 4.7 actually answers

Real responses to our standard prompts, recorded on FastMetal.

Count the number of 'r's in 'strawberry'

Count the number of 'r's in 'strawberry'. Explain your reasoning step by step.

There are **3** "r"s in "strawberry". Here is the step-by-step reasoning: 1. **Break down the word into individual letters:** s - t - r - a - w - b - e - r - r - y 2. **Identify the position of each 'r':** * The 3rd letter is **r**. * The 8th letter is **r**. * The 9th letter is **r**. 3. **Count the total occurrences:** 1 + 1 + 1 = 3.
23.3s response685 output tokens

Debug This Error

I'm getting the following error in my Node.js application: TypeError: Cannot read properties of undefined (reading 'map') at UserList (/app/components/UserList.js:12:25) at renderWithHooks (/app/node_modules/rea…

### The Cause The error `TypeError: Cannot read properties of undefined (reading 'map')` means that the variable `users` is `undefined` when the component tries to render. In React, this typically happens for one of two reasons: 1. The **Parent Component** is not passing the `users` prop to `UserList`. 2. The **Parent Component** passed the prop, but the data hasn't loaded yet (e.g., an API call is still pending), so the value is initially `undefined`. Since `undefined` does not have a `.map()` method, the application crashes. --- ### How to Fix It There are two main ways to fix this: handling it inside the `UserList` component (defensive coding) or fixing the parent component passing…
42.0s response1384 output tokens

Code Review

Please review the following Python function and suggest improvements for readability, performance, and best practices: def get_data(url, retries=3): import requests import time for i in range(retries):…

Here is a review of your function with suggestions for improving readability, performance, and best practices, followed by a refactored version of the code. ### Code Review 1. **Import Placement:** You import `requests` and `time` inside the function. Imports should generally be placed at the top of the file so they are loaded once when the module starts, rather than every time the function is called. 2. **Bare `except:`:** You used `except:` without specifying an exception type. This is dangerous because it catches *everything*, including `KeyboardInterrupt` (Ctrl+C) and `SystemExit`, preventing your program from terminating when needed. You should specifically catch `requests.exception…
24.5s response2951 output tokens

Compare these answers side by side with other models →

Frequently asked questions

How much does the GLM 4.7 API cost?
On FastMetal, GLM 4.7 is billed per token in yen: ¥107.22 per 1M input tokens and ¥393.14 per 1M output tokens, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
Can I call GLM 4.7 with the OpenAI SDK?
Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "glm-4.7" as the model; existing OpenAI-style code works unchanged, including streaming, tool calls and structured output.
What is the context window of GLM 4.7?
202,752 tokens, shared between the prompt and the response.
What do I need to try GLM 4.7?
Create an account and add credit; the model is then available both in the browser chat and over the API. There is no contract or minimum spend.

Try GLM 4.7 right now

GLM 4.7 is available on FastMetal through one API key. Start in the browser, or call it from the OpenAI SDK.