Z.ai: GLM 5.1
Autonomous Tasks, 8 Hours
Deploy GLM 5.1 Power
Long-Horizon
Sustained Execution
Handles single tasks autonomously up to 8 hours from planning to production.
Coding Strength
Agentic Engineering
Matches Claude Opus 4.6 in coding and general capabilities with 200K context.
Deep Reasoning
Enable Thinking Mode
Activates compulsory reasoning for complex tasks via thinking parameter.
Examples
See what Z.ai: GLM 5.1 can create
Copy any prompt below and try it yourself in the playground.
Code Refactor
“Refactor this Python function for better performance and add error handling: def process_data(data): return sum(data)”
Tech Docs
“Write technical documentation for a REST API endpoint that handles user authentication with JWT tokens.”
System Design
“Design a scalable microservices architecture for an e-commerce platform including database schema.”
Debug Script
“Debug this bash script that fails on large files and optimize it: for file in *.log; do grep error $file > output.txt; done”
For Developers
A few lines of code.
GLM 5.1. One Call.
ModelsLab handles the infrastructure: fast inference, auto-scaling, and a developer-friendly API. No GPU management needed.
- Serverless: scales to zero, scales to millions
- Pay per token, on plans from $21/month
- Python and JavaScript SDKs, plus REST API
import requestsresponse = requests.post("https://modelslab.com/api/v7/llm/chat/completions",json={"key": "YOUR_API_KEY","messages": [{"role": "user","content": "Write a Python function that retries an HTTP request with exponential backoff."}],"model_id": "z-ai-glm-5.1"})print(response.json())
Ready to create?
Start generating with Z.ai: GLM 5.1 on ModelsLab.
GLM API models
Every GLM model on ModelsLab, with the task it runs and the price billed per unit. Each one has its own page with a playground and API docs.
| Model | Task | Price | Model ID |
|---|---|---|---|
| GLM 4.5 | Text Generation | $0.75/1M input, $2.75/1M output tokens | z-ai-glm-4.5 |
| GLM 4.5 Air | Text Generation | $0.1625/1M input, $1.0625/1M output tokens | z-ai-glm-4.5-air |
| GLM 4.5V | Text Generation | $0.75/1M input, $2.25/1M output tokens | z-ai-glm-4.5v |
| GLM 4.6 | Text Generation | $0.625/1M input, $2.50/1M output tokens | z-ai-glm-4.6 |
| GLM 4.6V | Text Generation | $0.375/1M input, $1.125/1M output tokens | z-ai-glm-4.6v |
| GLM 4.7 | Text Generation | $0.75/1M input, $2.75/1M output tokens | z-ai-glm-4.7 |
| GLM 4.7 Flash | Text Generation | $0.075625/1M input, $0.50/1M output tokens | z-ai-glm-4.7-flash |
| GLM 5 | Text Generation | $1.25/1M input, $4.00/1M output tokens | z-ai-glm-5 |
| GLM 5.1 | Text Generation | $1.75/1M input, $5.50/1M output tokens | z-ai-glm-5.1 |
| GLM 5.2 | Text Generation | $0.775/1M input, $3.025/1M output tokens | z-ai-glm-5.2 |
| GLM 5.3 | Text Generation | $0.087375/1M input, $1.75/1M output tokens | z-ai-glm-5.3 |
| GLM 5.3 Flash | Text Generation | $0.049875/1M input, $0.098/1M output tokens | z-ai-glm-5.3-flash |
| GLM 5.3 FlashX | Text Generation | $0.4625/1M input, $1.5625/1M output tokens | z-ai-glm-5.3-flashx |
| GLM 5.3 FlashX Legal | Text Generation | $0.4625/1M input, $1.5625/1M output tokens | z-ai-glm-5.3-flashx-legal |
| GLM 5.3 Prime | Text Generation | $2.10/1M input, $6.60/1M output tokens | z-ai-glm-5.3-prime |
| GLM Flash Latest | Text Generation | $0.049875/1M input, $0.098/1M output tokens | z-ai-glm-flash-latest |
| GLM Latest | Text Generation | $0.087375/1M input, $1.75/1M output tokens | z-ai-glm-latest |
GLM API quickstart
Call z-ai-glm-5.1 with your API key:
curl -X POST https://modelslab.com/api/v7/llm/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model_id": "z-ai-glm-5.1",
"messages": [
{"role": "user", "content": "Hello!"}
],
"max_tokens": 1000
}'