Skip to main content

userMessage

UserMessage Model​

Represents a message sent by the user in an existing chat, optionally accompanied by one or more files and additional metadata.


message (string, Optional)​

The content of the user's message. Either message or at least one file_{n} field must be provided. HTML content is not allowed.


file_{n} (file, Optional)​

One or more uploaded files using dynamic field names such as file_1, file_2, etc. This is available for multipart form requests.

Allowed content types include PDF, PNG, JPEG, DOCX, XLSX, plain text, Markdown, and TeX-related text formats.


metadata (object, Optional)​

Additional key-value metadata stored on the message.


metadata_{n} (object, Optional)​

Metadata for the matching uploaded file. For example, metadata_1 applies to file_1.


Example​

{
"message": "string",
"metadata": {
"source": "chat-ui"
}
}