Back to Models
z-ai logo
z-ai/glm-5

GLM 5

GLM-5 is Z.ai’s flagship open-source foundation model engineered for complex systems design and long-horizon agent workflows. Built for expert developers, it delivers production-grade performance on large-scale programming tasks, rivaling leading closed-source models. With advanced agentic planning, deep backend reasoning, and iterative self-correction, GLM-5 moves beyond code generation to full-system construction and autonomous execution.

2/11/2026
204,800 tokens
#34 Text (Chinese)
Input: ¥178.7/M
Output: ¥571.84/M

Specifications

Modalities

Input
text
Output
text

Supported Parameters

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

Max Output Tokens

131,072

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

How GLM 5 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 out the word: **s-t-r-a-w-b-e-r-r-y** 2. Go through each letter one by one to identify the 'r's: * s (no) * t (no) * **r** (yes, this is the 1st one) * a (no) * w (no) * b (no) * e (no) * **r** (yes, this is the 2nd one) * **r** (yes, this is the 3rd one) * y (no) 3. Count the total findings: 1 + 1 + 1 = 3.
11.0s response877 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…

This error occurs because the `users` prop passed to your `UserList` component is `undefined` at the moment the component tries to render. JavaScript tries to run `undefined.map(...)`, which isn't allowed because `undefined` is not an array. Here are three ways to fix this, depending on your specific situation. ### Option 1: Set a Default Value (Recommended) You can provide a default value for the `users` prop in the function definition. If `users` is undefined, it will default to an empty array `[]`. This is the safest approach because `.map()` works perfectly on an empty array (it just renders nothing). ```javascript function UserList({ users = [] }) { // Default to empty array retur…
18.0s response1617 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 categorized by readability, performance, and best practices, followed by a refactored version of the code. ### 1. Best Practices * **Avoid Bare `except` Clauses:** Using `except:` catches *everything*, including system-exiting exceptions like `KeyboardInterrupt` or `SystemExit`. This makes your script hard to stop (Ctrl+C won't work immediately). You should catch specific exceptions like `requests.RequestException`. * **Move Imports to the Top:** Python convention dictates importing modules at the top of the file, not inside functions. This improves readability and ensures the import logic is checked immediately when the script…
30.7s response2995 output tokens

Compare these answers side by side with other models →

Frequently asked questions

How much does the GLM 5 API cost?
On FastMetal, GLM 5 is billed per token in yen: ¥178.7 per 1M input tokens and ¥571.84 per 1M output tokens, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
Can I call GLM 5 with the OpenAI SDK?
Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "glm-5" as the model; existing OpenAI-style code works unchanged, including streaming, tool calls and structured output.
What is the context window of GLM 5?
204,800 tokens, shared between the prompt and the response.
How does GLM 5 rank?
#67 on the public arena's Japanese board (ELO 1,411). Ranks move as the leaderboard is updated.
What do I need to try GLM 5?
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 5 right now

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

Leaderboard

Text
OverallELO: 1,458
#56
JapaneseELO: 1,411
#67
ChineseELO: 1,515
#34
KoreanELO: 1,427
#35
EnglishELO: 1,473
#44
frenchELO: 1,478
#56
germanELO: 1,451
#56
spanishELO: 1,456
#49
russianELO: 1,448
#66
CodingELO: 1,498
#69
MathELO: 1,443
#73
Creative WritingELO: 1,448
#37
Instruction FollowingELO: 1,446
#58
Hard PromptsELO: 1,478
#57
Multi-TurnELO: 1,473
#46
Code
OverallELO: 1,436
#64