Create message
Threads
Create message
Create a new message in a thread.
POST
Create message
Authorizations
Authorization Bearer Token
Headers
Path Parameters
Query Parameters
Body
application/json
Pydantic model for creating a thread message request.
Attributes: role (str): The role of the message sender. content (Union[str, list[InputMessage], list[OutputMessage]]): The content of the message. meta_data (Optional[dict[str, Any]]): Optional metadata dictionary.
Response
Successful Response
Thread message shape returned by the thread API.
parts are opt-in so existing clients keep the previous response shape by default.
parts
(MessageTextPart · object | MessageReasoningPart · object | MessageFilePart · object | MessageDataPart · object | MessageToolCallPart · object | MessageToolErrorPart · object | MessageToolResultPart · object)[] | null
A text part persisted alongside a thread message.
- MessageTextPart
- MessageReasoningPart
- MessageFilePart
- MessageDataPart
- MessageToolCallPart
- MessageToolErrorPart
- MessageToolResultPart
Last modified on June 18, 2026