Back to models
GLM-5.1
GLM-5.1 is Zhipu AI's 754B-total, 40B-active MIT-licensed MoE flagship model using DeepSeek Sparse Attention and 200K context for long-horizon software engineering, terminal workflows, and autonomous tool execution.
What you can do
- End-to-end repository generation
- Autonomous terminal debugging and repair
- Long-horizon multi-step engineering agents
Input & output
- Input
- Repository specifications, terminal execution outputs, multi-turn tool logs, and text up to 200K tokens
- Output
- Extended reasoning trajectories, multi-file repository code, terminal commands, and tool calls
Try a prompt like this
Design and implement a complete Python CLI static analyzer for SQL migration files—including AST parsing, lock-risk rules, CLI flags, and pytest suite—ready to run in a clean repo.
Things to know
Frontier 754B MoE requires multi-node GPU clusters (~1.5TB BF16 or ~780GB FP8 across 2× 8×80GB or 1× 8×141GB H200/B200 nodes); MIT-licensed open weights supported in vLLM and SGLang.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
ZhipuAI/GLM-5.1
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="ZhipuAI/GLM-5.1",
messages=[{"role": "user", "content": "Design and implement a complete Python CLI static analyzer for SQL migration files—including AST parsing, lock-risk rules, CLI flags, and pytest suite—ready to run in a clean repo."}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide