Skip to main content

Zora glm-5.3

POST 

/v1/chat/completions

Generate model responses based on conversation context.

GLM-5.3 always enables reasoning. thinking.type only supports enabled and cannot be turned off. reasoning_effort supports low / high / max, defaulting to max. If existing requests use thinking.type: "disabled", change it to enabled and set reasoning_effort to low before switching the model ID.

Request​

Cache call examples​

GLM-5.3 can reuse long context across multiple requests. This is useful for contracts, reports, knowledge-base snippets, and other long documents that you need to ask about repeatedly.

  • Explicit cache: add cache_control: { "type": "ephemeral" } on a messages[].content[] text block to mark stable content for reuse. Later requests keep the same marked content and only change the new question.
  • Implicit cache: omit cache_control and put the stable long context in a fixed position (such as the system message). Keep that context identical and only change the user question so the same prefix can be reused.
  • Multi-turn calls: submit the long text with the first question, then reuse the same long text for follow-up summary, extraction, rewrite, or analysis questions.

Explicit cache parameter examples​

First request: mark the long text block that should be reused.

{
"model": "glm-5.3",
"messages": [
{
"role": "system",
"content": "You are an assistant skilled at analyzing long-form documents."
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "[Source material] This is a longer piece of business material, a report, or knowledge-base content that will be reused later. To save cost on follow-up requests, this stable content can be explicitly cached.",
"cache_control": {
"type": "ephemeral"
}
},
{
"type": "text",
"text": "First summarize the key points of this material."
}
]
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "max",
"stream": true
}

Second request: keep the marked long text unchanged and only replace the new question.

{
"model": "glm-5.3",
"messages": [
{
"role": "system",
"content": "You are an assistant skilled at analyzing long-form documents."
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "[Source material] This is a longer piece of business material, a report, or knowledge-base content that will be reused later. To save cost on follow-up requests, this stable content can be explicitly cached.",
"cache_control": {
"type": "ephemeral"
}
},
{
"type": "text",
"text": "Extract the action items that need follow-up from this material."
}
]
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "max",
"stream": true
}

Implicit cache parameter examples​

First request: omit cache_control and put the stable long text in a fixed position.

{
"model": "glm-5.3",
"messages": [
{
"role": "system",
"content": "[Fixed context] This is a longer piece of business material, a report, or knowledge-base content that will be reused later."
},
{
"role": "user",
"content": "[Question] Summarize the key points of this material."
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "max",
"stream": true
}

Second request: keep the fixed context identical and only change the user question.

{
"model": "glm-5.3",
"messages": [
{
"role": "system",
"content": "[Fixed context] This is a longer piece of business material, a report, or knowledge-base content that will be reused later."
},
{
"role": "user",
"content": "[Question] Extract the action items that need follow-up from this material."
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "max",
"stream": true
}

Responses​

Successfully generated a response