Back to Models
z-ai logoZ.ai
glm-4.7-flash

GLM 4.7 Flash

As a 30B-class SOTA model, GLM-4.7-Flash offers a new option that balances performance and efficiency. It is further optimized for agentic coding use cases, strengthening coding capabilities, long-horizon task planning, and tool collaboration, and has achieved leading performance among open-source models of the same size on several current public benchmark leaderboards.

1/19/2026
202,752 tokens
Input: $0.0666/M
Output: $0.44/M

Specifications

Modalities

Input
text
Output
text

Supported Parameters

frequency_penalty
include_reasoning
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

Data policy

Prompt retention
Not retained — every host this model runs on is configured not to retain prompts
Training
Not used for training

Whether a provider trains on prompts is a declared value from our terms with them. Retention is determined from the upstream listing for every host this model can reach. Neither is guessed.

Measured performance

Time to first response (p50)676ms

    Measured through FastMetal's own gateway over the last 30 days (659 first-response samples).

    Time to first response is measured to the first streamed chunk; throughput counts all output tokens, including reasoning tokens. These are observations, not a performance guarantee.

    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-flash",
        "messages": [{"role": "user", "content": "Hello!"}]
      }'

    How GLM 4.7 Flash 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. Write the word out clearly: **s-t-r-a-w-b-e-r-r-y**. 2. Go through the word letter by letter: * The 3rd letter is an 'r'. * The 9th letter is an 'r'. * The 10th letter is an 'r'. 3. Add them up: **1 + 1 + 1 = 3**.
    10.6s response642 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 `.map()` function is being called on a value that is `undefined`. In your code at line 12: ```javascript {users.map(user => ...)} ``` The variable `users` is `undefined`. This usually happens when you are **not passing the `users` prop** to the `UserList` component from its parent. --- ### How to Fix It Here are the two best ways to resolve this. #### Solution 1: Pass the data from the Parent (Most Likely Fix) Check the component that is using `UserList`. It must pass the array of data. **Incorrect (Causes error):** ```javascript // Parent Component function Parent() { return…
    19.1s response1364 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 the function with suggestions for improvement, followed by a refactored version. ### Key Issues & Improvements 1. **Imports at the top:** * *Current:* Imports are inside the function. * *Improvement:* Imports should be at the top of the file (module level). This improves performance slightly (no need to reload the module for every function call) and follows Python style guidelines (PEP 8). 2. **Generic `except` block:** * *Current:* `except:` * *Improvement:* This catches *all* exceptions, including `KeyboardInterrupt` and `SystemExit`. This makes debugging impossible. You should catch specific exceptions (e.g., `requests.exceptions.RequestExc…
    43.6s response2943 output tokens

    Compare these answers side by side with other models →

    Frequently asked questions

    How much does the GLM 4.7 Flash API cost?
    On FastMetal, GLM 4.7 Flash is billed per token: $0.0666 per 1M input tokens and $0.44 per 1M output tokens on a US-dollar account, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
    Can I call GLM 4.7 Flash with the OpenAI SDK?
    Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "glm-4.7-flash" 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 Flash?
    202,752 tokens, shared between the prompt and the response.
    What do I need to try GLM 4.7 Flash?
    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 Flash right now

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