messagesarray<object>ОбязательноУпорядоченные реплики, старые первыми. Содержимое — строка или массив частей text, image_url и video_url. Видео отправляется как загруженный файл, а видео в одном запросе может занимать в сумме до 14 MB. Задача, форма вывода и словарь идут в системное сообщение, а в одном вызове уходит одна строка, один фрагмент или один документ.
- По умолчанию
- Не задано
- Ограничения
- minItems:1
messages[].rolestringОбязательно внутри объектаRole of the message author.
- По умолчанию
- Не задано
- Допустимые значения
"system""developer""user""assistant""tool"
messages[].namestringНеобязательноOptional name identifying the speaker within its role.
- По умолчанию
- Не задано
messages[].contentstring | array | nullНеобязательноMessage content, either plain text or a list of content parts.
- По умолчанию
- Не задано
{
"type": [
"string",
"array",
"null"
],
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"const": "text"
}
}
},
{
"type": "object",
"required": [
"type",
"image_url"
],
"properties": {
"type": {
"const": "image_url"
},
"image_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"video_url"
],
"properties": {
"type": {
"const": "video_url"
},
"video_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
}
]
},
"description": "Message content, either plain text or a list of content parts."
}messages[].tool_callsarray<object>НеобязательноTool calls the assistant requested in this message.
- По умолчанию
- Не задано
messages[].tool_call_idstringНеобязательноIdentifier of the tool call this message answers. Required on tool messages.
- По умолчанию
- Не задано
messages[].reasoning_contentstringНеобязательноReasoning text from a previous assistant reply, preserved when continuing a tool conversation.
- По умолчанию
- Не задано
{
"type": "array",
"x-ui": {
"order": 100,
"widget": "chat-messages",
"primary": true
},
"items": {
"type": "object",
"allOf": [
{
"if": {
"required": [
"reasoning_content"
]
},
"then": {
"properties": {
"role": {
"const": "assistant"
}
}
}
}
],
"required": [
"role"
],
"properties": {
"name": {
"type": "string",
"description": "Optional name identifying the speaker within its role."
},
"role": {
"enum": [
"system",
"developer",
"user",
"assistant",
"tool"
],
"type": "string",
"description": "Role of the message author."
},
"content": {
"type": [
"string",
"array",
"null"
],
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"const": "text"
}
}
},
{
"type": "object",
"required": [
"type",
"image_url"
],
"properties": {
"type": {
"const": "image_url"
},
"image_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"video_url"
],
"properties": {
"type": {
"const": "video_url"
},
"video_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
}
]
},
"description": "Message content, either plain text or a list of content parts."
},
"tool_calls": {
"type": "array",
"items": {
"type": "object"
},
"description": "Tool calls the assistant requested in this message."
},
"tool_call_id": {
"type": "string",
"description": "Identifier of the tool call this message answers. Required on tool messages."
},
"reasoning_content": {
"type": "string",
"description": "Reasoning text from a previous assistant reply, preserved when continuing a tool conversation."
}
},
"additionalProperties": false
},
"minItems": 1,
"description": "Ordered conversation turns. Text content only on this endpoint."
}