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
#19 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
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 →

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,457
#50
🇯🇵JapaneseELO: 1,409
#56
🇨🇳ChineseELO: 1,523
#19
🇰🇷KoreanELO: 1,426
#30
🇬🇧EnglishELO: 1,471
#41
frenchELO: 1,478
#44
germanELO: 1,444
#56
spanishELO: 1,451
#50
russianELO: 1,447
#64
💻CodingELO: 1,497
#61
🧮MathELO: 1,442
#65
✍️Creative WritingELO: 1,446
#36
📝Instruction FollowingELO: 1,447
#52
🌶️Hard PromptsELO: 1,478
#48
💬Multi-TurnELO: 1,472
#42
Code
🏆OverallELO: 1,435
#48