OptionalcontentPlain-text content of the message. Present for system, user, and assistant messages. null when the message body is expressed through content_parts or tool_calls.
Optionalcontent_Multimodal content parts for the message, used when the body includes images or mixed media. Each part is a map with a type key ("text", "image_url", or "image_data"). null when content is set.
Optionalresume_Opaque token that can be passed on a subsequent request to resume this conversation from the current state. null when the provider does not support conversation resumption.
The speaker role for this message. One of "system", "user", "assistant", or "tool".
Optionalstructured_Parsed structured data returned by the model when a JSON schema or structured-output mode was requested. Shape varies by the schema supplied at call time. null when structured output was not requested.
Optionaltool_Tool calls requested by the model in an assistant message. Present only on assistant messages that invoke one or more tools. null on all other message roles.
Optionaltool_Tool execution results provided in a tool message. Each entry corresponds to a prior tool call by its id. null on all other message roles.
A single message in an AI conversation, following the OpenAI-compatible chat format. Used in both request inputs and completion responses.