GLM-5.1
by zai · family glm
Facts
| Release date | 2026-04-07 |
|---|---|
| Retired date | — |
| Knowledge cutoff | — |
| Context (max) | 204,800 |
| Max output | 131,072 |
| Modalities | text → text |
| Aliases | glm-5.1 |
| Open weights | yes (zai-org/GLM-5.1) |
| Description | 744B/40B-active MoE (MIT); thinking default enabled; 200K context; superseded by 5.2/5.3 but still listed and priced. |
Unknown values are shown as —.
Offerings
| Provider | Wire ID | Variant | Endpoint | Protocol | Status | Price (USD / Mtok) | Reasoning |
|---|---|---|---|---|---|---|---|
| IO Intelligence (io.net) | zai-org/GLM-5.1 | chat | openai-chat | ga | 1.31 / 4.27 | effort · default on · returns reasoning_content | |
| Ollama Cloud | glm-5.1 | v1-chat-completions | openai-chat | ga | — | effort · default on · returns hidden | |
| OpenCode Go | glm-5.1 | go-chat-completions | openai-chat | ga | — | toggle · default on · returns reasoning_content · round-trips reasoning_content | |
| OpenCode Zen | glm-5.1 | chat-completions | openai-chat | ga | 1.40 / 4.40 | toggle · default on · returns reasoning_content · round-trips reasoning_content | |
| OpenRouter | z-ai/glm-5.1 | chat-completions | openai-chat | ga | 1.26 / 3.96 | effort · default on · returns reasoning_content · round-trips reasoning_content | |
| Z.ai | glm-5.1 | chat-completions | openai-chat | ga | 1.40 / 4.40 | toggle · default on · returns reasoning_content · round-trips reasoning_content |
Reasoning controls
IO Intelligence (io.net)· zai-org/GLM-5.1· chat effort
reasoning.effort nonelowmediumhigh● Default not documented — verify.
effort · default on · returns reasoning_content
Ollama Cloud· glm-5.1· v1-chat-completions effort
reasoning_effort nonelowmediumhigh●max Default level not documented; verify.
effort · default on · returns hidden
OpenCode Go· glm-5.1· go-chat-completions toggle
thinking.type on enabled · off disabled
toggle · default on · returns reasoning_content · round-trips reasoning_content
OpenCode Zen· glm-5.1· chat-completions toggle
thinking.type on enabled · off disabled
toggle · default on · returns reasoning_content · round-trips reasoning_content
OpenRouter· z-ai/glm-5.1· chat-completions effort
reasoning.effort nonelowmedium●highxhighmax
effort · default on · returns reasoning_content · round-trips reasoning_content
Z.ai· glm-5.1· chat-completions toggle
thinking.type on enabled · off disabled
toggle · default on · returns reasoning_content · round-trips reasoning_content
Example requests
IO Intelligence (io.net) · openai-chat · zai-org/GLM-5.1
curl 'https://api.intelligence.io.solutions/api/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "zai-org/GLM-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "high"
}
}'Python (requests)
import requests
resp = requests.post(
"https://api.intelligence.io.solutions/api/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "zai-org/GLM-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "high"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://api.intelligence.io.solutions/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "zai-org/GLM-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "high"
}
}),
})
console.log(await resp.json())Ollama Cloud · openai-chat · glm-5.1
curl 'https://ollama.com/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
}'Python (requests)
import requests
resp = requests.post(
"https://ollama.com/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://ollama.com/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
}),
})
console.log(await resp.json())OpenCode Go · openai-chat · glm-5.1
curl 'https://opencode.ai/zen/go/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
}'Python (requests)
import requests
resp = requests.post(
"https://opencode.ai/zen/go/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://opencode.ai/zen/go/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
}),
})
console.log(await resp.json())- ⚠ Responses include
reasoning_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
OpenCode Zen · openai-chat · glm-5.1
curl 'https://opencode.ai/zen/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
}'Python (requests)
import requests
resp = requests.post(
"https://opencode.ai/zen/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://opencode.ai/zen/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
}),
})
console.log(await resp.json())- ⚠ Responses include
reasoning_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
OpenRouter · openai-chat · z-ai/glm-5.1
curl 'https://openrouter.ai/api/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "z-ai/glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "medium"
}
}'Python (requests)
import requests
resp = requests.post(
"https://openrouter.ai/api/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "z-ai/glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "medium"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://openrouter.ai/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "z-ai/glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "medium"
}
}),
})
console.log(await resp.json())- ⚠ Responses include
reasoning_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
Z.ai · openai-chat · glm-5.1
curl 'https://api.z.ai/api/paas/v4/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
}'Python (requests)
import requests
resp = requests.post(
"https://api.z.ai/api/paas/v4/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://api.z.ai/api/paas/v4/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"thinking": {
"type": "enabled"
}
}),
})
console.log(await resp.json())- ⚠ Responses include
reasoning_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).