v1
latestOpenAPI 3.1.02026-07-224941145.6 KBChat Completion
Creates a model response for the given chat conversation.
post/v1/chat/completions
Request body
Example request
{
"model": "glm-5.2",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"temperature": 1
}Response
Completion generated successfully
Example response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "glm-5.2",
"choices": [
{
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
}
}
]
}