messagesarray<object>필수오래된 순서대로 놓은 턴입니다. 내용은 문자열이거나 text, image_url, video_url, audio_url, input_audio 파트의 배열입니다. 업로드한 동영상과 오디오는 요청 하나에 합계 14 MB까지 가능합니다. 계속 적용할 지시는 system에 두고 턴마다 한 번씩만 덧붙이세요.
- 기본값
- 지정되지 않음
- 제약 조건
- 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"
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"audio_url"
],
"properties": {
"type": {
"const": "audio_url"
},
"audio_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"input_audio"
],
"properties": {
"type": {
"const": "input_audio"
},
"input_audio": {
"type": "object",
"required": [
"data",
"format"
],
"properties": {
"data": {
"type": "string"
},
"format": {
"enum": [
"wav",
"mp3"
],
"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"
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"audio_url"
],
"properties": {
"type": {
"const": "audio_url"
},
"audio_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"input_audio"
],
"properties": {
"type": {
"const": "input_audio"
},
"input_audio": {
"type": "object",
"required": [
"data",
"format"
],
"properties": {
"data": {
"type": "string"
},
"format": {
"enum": [
"wav",
"mp3"
],
"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."
}