OpenAI API

Message delta object

object

Represents a message delta i.e. any changed fields on a message during streaming.

idstringrequired

The identifier of the message, which can be referenced in API endpoints.

objectstringrequired

The object type, which is always thread.message.delta.

Allowed values:thread.message.delta

deltaobjectrequired

The delta containing the fields that have changed on the Message.

Show Child Parameters
Example

The message object

object

Represents a message within a thread.

idstringrequired

The identifier, which can be referenced in API endpoints.

objectstringrequired

The object type, which is always thread.message.

Allowed values:thread.message

created_atintegerrequired

The Unix timestamp (in seconds) for when the message was created.

thread_idstringrequired

The thread ID that this message belongs to.

statusstringrequired

The status of the message, which can be either in_progress, incomplete, or completed.

Allowed values:in_progressincompletecompleted

incomplete_detailsobjectrequired

On an incomplete message, details about why the message is incomplete.

Show Child Parameters
completed_atintegerrequired

The Unix timestamp (in seconds) for when the message was completed.

incomplete_atintegerrequired

The Unix timestamp (in seconds) for when the message was marked as incomplete.

rolestringrequired

The entity that produced the message. One of user or assistant.

Allowed values:userassistant

contentOne Of
arrayrequired

The content of the message in array of text and/or images.

Image fileobject

References an image File in the content of a message.

Show Child Parameters
assistant_idstringrequired

If applicable, the ID of the assistant that authored this message.

run_idstringrequired

The ID of the run associated with the creation of this message. Value is null when messages are created manually using the create message or create thread endpoints.

attachmentsarray[object]required

A list of files attached to the message, and the tools they were added to.

Show Child Parameters
metadataobjectrequired

Set of 16 key-value pairs that can be attached to an object. This can be
useful for storing additional information about the object in a structured
format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings
with a maximum length of 512 characters.

Example

Text

object

The text content that is part of a message.

typestringrequired

Always text.

Allowed values:text

textstringrequired

Text content to be sent to the model

Example

MessageStreamEvent

One Of
eventstringrequired

Allowed values:thread.message.created

dataobjectrequired

Represents a message within a thread.

Show Child Parameters
Example

Metadata

object

Set of 16 key-value pairs that can be attached to an object. This can be
useful for storing additional information about the object in a structured
format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings
with a maximum length of 512 characters.