GLM-5.2
by zai · family glm
Facts
| Release date | 2026-06-16 |
|---|---|
| Retired date | — |
| Knowledge cutoff | — |
| Context (max) | 1,048,576 |
| Max output | 131,072 |
| Modalities | text → text |
| Aliases | glm-5.2 |
| Open weights | yes |
| Description | 756B open-weight model, 976K context. |
Unknown values are shown as —.
Intelligence Index v4.1.1: 53 · max · Source: Artificial Analysis (accessed 2026-08-20)
Offerings
| Provider | Wire ID | Variant | Endpoint | Protocol | Status | Price (USD / Mtok) | Reasoning |
|---|---|---|---|---|---|---|---|
| Alibaba Token Plan | glm-5.2 | compatible-mode | openai-chat | ga | — | toggle · default on · returns reasoning_content · round-trips reasoning_content | |
| Baseten | zai-org/GLM-5.2 | chat-completions | openai-chat | ga | 1.40 / 4.40 | effort · default on · returns reasoning_content | |
| IO Intelligence (io.net) | zai-org/GLM-5.2 | chat | openai-chat | ga | 1.55 / 4.88 | effort · default on · returns reasoning_content | |
| NEAR AI Cloud | z-ai/glm-5.2 | chat | openai-chat | ga | 1.40 / 4.40 | toggle · default on · returns reasoning_content | |
| Ollama Cloud | glm-5.2 | v1-chat-completions | openai-chat | ga | — | effort · default on · returns hidden | |
| OpenCode Go | glm-5.2 | go-chat-completions | openai-chat | ga | — | toggle · default on · returns reasoning_content · round-trips reasoning_content | |
| OpenCode Zen | glm-5.2 | chat-completions | openai-chat | ga | 1.40 / 4.40 | toggle · default on · returns reasoning_content · round-trips reasoning_content | |
| OpenRouter | z-ai/glm-5.2 | chat-completions | openai-chat | ga | 0.97 / 3.04 | effort · default on · returns reasoning_content · round-trips reasoning_content | |
| Synthetic | hf:zai-org/GLM-5.2 | openai-chat | openai-chat | ga | — | adaptive · default on · returns hidden | |
| Synthetic | syn:large:text | openai-chat | openai-chat | ga | — | effort · default on · returns reasoning_content |
Reasoning controls
Alibaba Token Plan· glm-5.2· compatible-mode toggle
enable_thinking on true · off false
toggle · default on · returns reasoning_content · round-trips reasoning_content
Baseten· zai-org/GLM-5.2· chat-completions effort
reasoning_effort nonehigh●max Default not documented — verify.
effort · default on · returns reasoning_content
IO Intelligence (io.net)· zai-org/GLM-5.2· chat effort
reasoning.effort nonelowmediumhigh● Default not documented — verify.
effort · default on · returns reasoning_content
NEAR AI Cloud· z-ai/glm-5.2· chat toggle
chat_template_kwargs.enable_thinking on true · off false
toggle · default on · returns reasoning_content
Ollama Cloud· glm-5.2· v1-chat-completions effort
reasoning_effort nonelowmediumhigh●max Default level not documented; verify.
effort · default on · returns hidden
OpenCode Go· glm-5.2· go-chat-completions toggle
thinking.type on enabled · off disabled
toggle · default on · returns reasoning_content · round-trips reasoning_content
OpenCode Zen· glm-5.2· chat-completions toggle
thinking.type on enabled · off disabled
toggle · default on · returns reasoning_content · round-trips reasoning_content
OpenRouter· z-ai/glm-5.2· chat-completions effort
reasoning.effort nonelowmedium●highxhighmax
effort · default on · returns reasoning_content · round-trips reasoning_content
Synthetic· hf:zai-org/GLM-5.2· openai-chat adaptive
adaptive · default on · returns hidden
Synthetic· syn:large:text· openai-chat effort
reasoning_effort lowmediumhigh●
effort · default on · returns reasoning_content
Example requests
Alibaba Token Plan · openai-chat · glm-5.2
curl 'https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"enable_thinking": true
}'Python (requests)
import requests
resp = requests.post(
"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "glm-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"enable_thinking": true
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "glm-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"enable_thinking": true
}),
})
console.log(await resp.json())- ⚠ Responses include
reasoning_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
Baseten · openai-chat · zai-org/GLM-5.2
curl 'https://inference.baseten.co/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "zai-org/GLM-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
}'Python (requests)
import requests
resp = requests.post(
"https://inference.baseten.co/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "zai-org/GLM-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://inference.baseten.co/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "zai-org/GLM-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
}),
})
console.log(await resp.json())IO Intelligence (io.net) · openai-chat · zai-org/GLM-5.2
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.2",
"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.2",
"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.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "high"
}
}),
})
console.log(await resp.json())NEAR AI Cloud · openai-chat · z-ai/glm-5.2
curl 'https://cloud-api.near.ai/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "z-ai/glm-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"chat_template_kwargs": {
"enable_thinking": true
}
}'Python (requests)
import requests
resp = requests.post(
"https://cloud-api.near.ai/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "z-ai/glm-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"chat_template_kwargs": {
"enable_thinking": true
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://cloud-api.near.ai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "z-ai/glm-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"chat_template_kwargs": {
"enable_thinking": true
}
}),
})
console.log(await resp.json())Ollama Cloud · openai-chat · glm-5.2
curl 'https://ollama.com/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.2",
"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.2",
"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.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
}),
})
console.log(await resp.json())OpenCode Go · openai-chat · glm-5.2
curl 'https://opencode.ai/zen/go/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.2",
"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.2",
"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.2",
"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.2
curl 'https://opencode.ai/zen/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.2",
"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.2",
"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.2",
"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.2
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.2",
"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.2",
"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.2",
"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).
Synthetic · openai-chat · hf:zai-org/GLM-5.2
curl 'https://api.synthetic.new/openai/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "hf:zai-org/GLM-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
]
}'Python (requests)
import requests
resp = requests.post(
"https://api.synthetic.new/openai/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "hf:zai-org/GLM-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
]
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://api.synthetic.new/openai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "hf:zai-org/GLM-5.2",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
]
}),
})
console.log(await resp.json())Synthetic · openai-chat · syn:large:text
curl 'https://api.synthetic.new/openai/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "syn:large:text",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
}'Python (requests)
import requests
resp = requests.post(
"https://api.synthetic.new/openai/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "syn:large:text",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://api.synthetic.new/openai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "syn:large:text",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "high"
}),
})
console.log(await resp.json())