Messages represent the content that is sent to / returned from LLMs. They contain the message text, any associated files with the content, the author of the content, and the role in which the content applies.

Annotations at the Message level directly apply to this specific message. For example, the annotation for “response formatting” will be at this level.

role
enum<string>
required

The role of the sender in the conversation (e.g., user, assistant).

Available options:
system,
user,
assistant,
function
content
object
required

The content of the message, including text and any attachments.

source_id
string
required

The ID of the source system or user that sent the message.

annotations
object[]
required

Annotations specific to this message.

Represents a generic annotation.

model_parameters
object