id: String

The unique ID of the output message.

content: Array[BetaResponseOutputText { annotations, text, type, logprobs } | BetaResponseOutputRefusal { refusal, type } ]

The content of the output message.

One of the following:
class BetaResponseOutputText { annotations, text, type, logprobs }

A text output from the model.

annotations: Array[FileCitation{ file_id, filename, index, type} | URLCitation{ end_index, start_index, title, 2 more} | ContainerFileCitation{ container_id, end_index, file_id, 3 more} | FilePath{ file_id, index, type}]

The annotations of the text output.

One of the following:
class FileCitation { file_id, filename, index, type }

A citation to a file.

file_id: String

The ID of the file.

filename: String

The filename of the file cited.

index: Integer

The index of the file in the list of files.

type: :file_citation

The type of the file citation. Always file_citation.

class URLCitation { end_index, start_index, title, 2 more }

A citation for a web resource used to generate a model response.

end_index: Integer

The index of the last character of the URL citation in the message.

start_index: Integer

The index of the first character of the URL citation in the message.

title: String

The title of the web resource.

type: :url_citation

The type of the URL citation. Always url_citation.

url: String

The URL of the web resource.

formaturi
class ContainerFileCitation { container_id, end_index, file_id, 3 more }

A citation for a container file used to generate a model response.

container_id: String

The ID of the container file.

end_index: Integer

The index of the last character of the container file citation in the message.

file_id: String

The ID of the file.

filename: String

The filename of the container file cited.

start_index: Integer

The index of the first character of the container file citation in the message.

type: :container_file_citation

The type of the container file citation. Always container_file_citation.

class FilePath { file_id, index, type }

A path to a file.

file_id: String

The ID of the file.

index: Integer

The index of the file in the list of files.

type: :file_path

The type of the file path. Always file_path.

text: String

The text output from the model.

type: :output_text

The type of the output text. Always output_text.

logprobs: Array[Logprob{ token, bytes, logprob, top_logprobs}]
token: String
bytes: Array[Integer]
logprob: Float
top_logprobs: Array[TopLogprob{ token, bytes, logprob}]
token: String
bytes: Array[Integer]
logprob: Float
class BetaResponseOutputRefusal { refusal, type }

A refusal from the model.

refusal: String

The refusal explanation from the model.

type: :refusal

The type of the refusal. Always refusal.

role: :assistant

The role of the output message. Always assistant.

status: :in_progress | :completed | :incomplete

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

One of the following:
:in_progress
:completed
:incomplete
type: :message

The type of the output message. Always message.

agent: Agent{ agent_name}

The agent that produced this item.

agent_name: String

The canonical name of the agent that produced this item.

phase: :commentary | :final_answer

Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). For models like gpt-5.3-codex and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.

One of the following:
:commentary
:final_answer