GLM โ
Endpoint: https://mmu.vod-qcloud.com/v1Authentication: VOD ApiToken / Bearer
GLM is a text generation / chat model called through an OpenAI-compatible API, with JSON and SSE streaming responses. It supports the Chat Completions and Messages protocols, offers versions such as 5.1, 5, and 5-turbo, and can enable reasoning mode as needed.
Basic Information โ
| Item | Value |
|---|---|
| Call endpoint | https://mmu.vod-qcloud.com |
| Authentication | VOD Application-issued ApiToken / Bearer |
| Output | Text / Structured response |
| Response mode | JSON / SSE |
Supported Protocols โ
| Spec | Path | Target |
|---|---|---|
| Chat Completions | POST /v1/chat/completions | All models below |
| Messages | POST /v1/messages | All models below |
The model IDs below use the corresponding spec. Authentication and common fields follow API Reference.
Sampling Options โ
Commonly applies to all models listed in this document.
| Parameter | Setting |
|---|---|
temperature | Configurable |
top_p | Configurable |
temperature specifies the sampling temperature, and top_p specifies the cumulative probability range. Adjust centered on one method.
Per-Version Reasoning Settings โ
| Model ID | Configuration | Disable |
|---|---|---|
glm-5.1 | thinking_enabled | Cannot be disabled |
glm-5-turbo | thinking_enabled | false |
glm-5 | thinking_enabled | false |
Based on Chat Completions. Reasoning content is read from reasoning_content, and the final answer from content. Do not pass a disable option to versions that cannot be disabled.
Request Parameters โ
| Parameter | Required | Type | Description |
|---|---|---|---|
model | Required | String | A model ID from the per-version options table |
messages | Required | Array | Conversation input for Chat Completions / Messages |
max_tokens | Optional | Integer | Generation limit for Chat Completions / Messages. Required in Messages |
stream | Optional | Boolean | true: SSE / false: JSON |
Request Examples โ
Chat Completions โ
{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Reply with exactly OK and nothing else."
}
],
"max_tokens": 512,
"stream": false
}Response โ
{
"id": "01a0de30-62c1-759a-a272-4c9750a9cebc",
"object": "chat.completion",
"model": "glm-5.1",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "OK",
"reasoning_content": "1. **Analyze the Request:**\n * Input: \"Reply with exactly OK and nothing else.\"\n * Constraint 1: Reply with \"OK\".\n * Constraint 2: Exactly that word, nothing else (no punctuation, no extra words, no formatting).\n\n2. **Formulate the Output:**\n * Target string: \"OK\"\n\n3. **Verify against constraints:**\n * Is it exactly \"OK\"? Yes.\n * Is there anything else? No.\n\n4. **Final Output Generation:**\n * OK"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
},
"prompt_cached_tokens_details": {
"audio_tokens": 0
},
"completion_tokens": 125,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0,
"rejected_prediction_tokens": 0
},
"total_tokens": 138
}
}Messages โ
{
"model": "glm-5.1",
"messages": [
{
"role": "user",
"content": "Reply with exactly OK and nothing else."
}
],
"max_tokens": 512,
"stream": false
}Response โ
{
"id": "01a0de33-76c0-751e-9056-bd61bd234513",
"model": "glm-5.1",
"type": "message",
"role": "assistant",
"content": [
{
"thinking": "1. **Analyze the Request:** The user is asking for a specific response: \"OK\" and nothing else.\n2. **Formulate the Output:** The output must strictly be the string \"OK\" without any additional text, punctuation (beyond what constitutes \"OK\"), or newlines if possible (though a standard single newline at the end is usually unavoidable/system-level, the raw text should just be \"OK\").\n3. **Verify Constraints:** Exactly \"OK\". No \"Sure\", no \"OK.\", no explanation.\n4. **Final Output Generation:** OK",
"type": "thinking"
},
{
"text": "OK",
"type": "text"
}
],
"stop_reason": "end_turn",
"usage": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 13,
"output_tokens": 121
}
}Special Settings โ
Pass conversation history in order in messages. In models that return reasoning, keep reasoning_content separate from the final answer. The generation limit also includes reasoning tokens, so specify a sufficiently large max_tokens for long reasoning tasks.