One of the following:
type BetaResponseOutputMessage struct{…}

An output message from the model.

ID string

The unique ID of the output message.

Content []BetaResponseOutputMessageContentUnion

The content of the output message.

One of the following:
type BetaResponseOutputText struct{…}

A text output from the model.

Annotations []BetaResponseOutputTextAnnotationUnion

The annotations of the text output.

One of the following:
type BetaResponseOutputTextAnnotationFileCitation struct{…}

A citation to a file.

FileID string

The ID of the file.

Filename string

The filename of the file cited.

Index int64

The index of the file in the list of files.

Type FileCitation

The type of the file citation. Always file_citation.

type BetaResponseOutputTextAnnotationURLCitation struct{…}

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

EndIndex int64

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

StartIndex int64

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

Title string

The title of the web resource.

Type URLCitation

The type of the URL citation. Always url_citation.

URL string

The URL of the web resource.

formaturi
type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}

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

ContainerID string

The ID of the container file.

EndIndex int64

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

FileID string

The ID of the file.

Filename string

The filename of the container file cited.

StartIndex int64

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

Type ContainerFileCitation

The type of the container file citation. Always container_file_citation.

type BetaResponseOutputTextAnnotationFilePath struct{…}

A path to a file.

FileID string

The ID of the file.

Index int64

The index of the file in the list of files.

Type FilePath

The type of the file path. Always file_path.

Text string

The text output from the model.

Type OutputText

The type of the output text. Always output_text.

Logprobs []BetaResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []BetaResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type BetaResponseOutputRefusal struct{…}

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 BetaResponseOutputMessageStatus

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:
const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"
const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"
const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"
Type Message

The type of the output message. Always message.

Agent BetaResponseOutputMessageAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

Phase BetaResponseOutputMessagePhaseOptional

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:
const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"
const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"
type BetaResponseFileSearchToolCall struct{…}

The results of a file search tool call. See the file search guide for more information.

ID string

The unique ID of the file search tool call.

Queries []string

The queries used to search for files.

Status BetaResponseFileSearchToolCallStatus

The status of the file search tool call. One of in_progress, searching, incomplete or failed,

One of the following:
const BetaResponseFileSearchToolCallStatusInProgress BetaResponseFileSearchToolCallStatus = "in_progress"
const BetaResponseFileSearchToolCallStatusSearching BetaResponseFileSearchToolCallStatus = "searching"
const BetaResponseFileSearchToolCallStatusCompleted BetaResponseFileSearchToolCallStatus = "completed"
const BetaResponseFileSearchToolCallStatusIncomplete BetaResponseFileSearchToolCallStatus = "incomplete"
const BetaResponseFileSearchToolCallStatusFailed BetaResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall

The type of the file search tool call. Always file_search_call.

Agent BetaResponseFileSearchToolCallAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

Results []BetaResponseFileSearchToolCallResultOptional

The results of the file search tool call.

Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]Optional

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, booleans, or numbers.

One of the following:
string
float64
bool
FileID stringOptional

The unique ID of the file.

Filename stringOptional

The name of the file.

Score float64Optional

The relevance score of the file - a value between 0 and 1.

formatfloat
Text stringOptional

The text that was retrieved from the file.

type BetaResponseFunctionToolCall struct{…}

A tool call to run a function. See the function calling guide for more information.

Arguments string

A JSON string of the arguments to pass to the function.

CallID string

The unique ID of the function tool call generated by the model.

Name string

The name of the function to run.

Type FunctionCall

The type of the function tool call. Always function_call.

ID stringOptional

The unique ID of the function tool call.

Agent BetaResponseFunctionToolCallAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

Async boolOptional

Whether the function tool call runs asynchronously.

Caller BetaResponseFunctionToolCallCallerUnionOptional

The execution context that produced this tool call.

One of the following:
type BetaResponseFunctionToolCallCallerDirect struct{…}
Type Direct
type BetaResponseFunctionToolCallCallerProgram struct{…}
CallerID string

The call ID of the program item that produced this tool call.

Type Program
Namespace stringOptional

The namespace of the function to run.

Status BetaResponseFunctionToolCallStatusOptional

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

One of the following:
const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"
const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"
const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"
type BetaResponseFunctionToolCallOutputItem struct{…}
ID string

The unique ID of the function call tool output.

Output BetaResponseFunctionToolCallOutputItemOutputUnion

The output from the function call generated by your code. Can be a string or an list of output content.

One of the following:
string
type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion

Text, image, or file output of the function call.

One of the following:
type BetaResponseInputText struct{…}

A text input to the model.

Text string

The text input to the model.

Type InputText

The type of the input item. Always input_text.

PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpointOptional

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

Mode Explicit

The breakpoint mode. Always explicit.

type BetaResponseInputImage struct{…}

An image input to the model. Learn about image inputs.

Detail BetaResponseInputImageDetail

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

One of the following:
const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"
const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"
const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"
const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"
Type InputImage

The type of the input item. Always input_image.

FileID stringOptional

The ID of the file to be sent to the model.

ImageURL stringOptional

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

formaturi
PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpointOptional

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

Mode Explicit

The breakpoint mode. Always explicit.

type BetaResponseInputFile struct{…}

A file input to the model.

Type InputFile

The type of the input item. Always input_file.

Detail BetaResponseInputFileDetailOptional

The detail level of the file to be sent to the model. Use auto to let the system select the detail level; for GPT-5.6 and later models, auto uses high-quality rendering, which may increase input token usage. Use low for lower-cost rendering, or high to render the file at higher quality. Defaults to auto.

One of the following:
const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"
const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"
const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"
FileData stringOptional

The content of the file to be sent to the model.

FileID stringOptional

The ID of the file to be sent to the model.

FileURL stringOptional

The URL of the file to be sent to the model.

formaturi
Filename stringOptional

The name of the file to be sent to the model.

PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpointOptional

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

Mode Explicit

The breakpoint mode. Always explicit.

Status BetaResponseFunctionToolCallOutputItemStatus

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

One of the following:
const BetaResponseFunctionToolCallOutputItemStatusInProgress BetaResponseFunctionToolCallOutputItemStatus = "in_progress"
const BetaResponseFunctionToolCallOutputItemStatusCompleted BetaResponseFunctionToolCallOutputItemStatus = "completed"
const BetaResponseFunctionToolCallOutputItemStatusIncomplete BetaResponseFunctionToolCallOutputItemStatus = "incomplete"
Type FunctionCallOutput

The type of the function tool call output. Always function_call_output.

Agent BetaResponseFunctionToolCallOutputItemAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

CallID stringOptional

The unique ID of the function tool call generated by the model.

Caller BetaResponseFunctionToolCallOutputItemCallerUnionOptional

The execution context that produced this tool call.

One of the following:
type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}
Type Direct

The caller type. Always direct.

type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}
CallerID string

The call ID of the program item that produced this tool call.

minLength1
maxLength64
Type Program

The caller type. Always program.

CreatedBy stringOptional

The identifier of the actor that created the item.

Name stringOptional

The name of the tool that produced the output.

Namespace stringOptional

The namespace of the tool that produced the output.

type BetaResponseOutputItemAgentMessage struct{…}
ID string

The unique ID of the agent message.

Author string

The sending agent identity.

Content []BetaResponseOutputItemAgentMessageContentUnion

Encrypted content sent between agents.

One of the following:
type BetaResponseInputText struct{…}

A text input to the model.

Text string

The text input to the model.

Type InputText

The type of the input item. Always input_text.

PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpointOptional

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

Mode Explicit

The breakpoint mode. Always explicit.

type BetaResponseOutputText struct{…}

A text output from the model.

Annotations []BetaResponseOutputTextAnnotationUnion

The annotations of the text output.

One of the following:
type BetaResponseOutputTextAnnotationFileCitation struct{…}

A citation to a file.

FileID string

The ID of the file.

Filename string

The filename of the file cited.

Index int64

The index of the file in the list of files.

Type FileCitation

The type of the file citation. Always file_citation.

type BetaResponseOutputTextAnnotationURLCitation struct{…}

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

EndIndex int64

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

StartIndex int64

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

Title string

The title of the web resource.

Type URLCitation

The type of the URL citation. Always url_citation.

URL string

The URL of the web resource.

formaturi
type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}

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

ContainerID string

The ID of the container file.

EndIndex int64

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

FileID string

The ID of the file.

Filename string

The filename of the container file cited.

StartIndex int64

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

Type ContainerFileCitation

The type of the container file citation. Always container_file_citation.

type BetaResponseOutputTextAnnotationFilePath struct{…}

A path to a file.

FileID string

The ID of the file.

Index int64

The index of the file in the list of files.

Type FilePath

The type of the file path. Always file_path.

Text string

The text output from the model.

Type OutputText

The type of the output text. Always output_text.

Logprobs []BetaResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []BetaResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type BetaResponseOutputItemAgentMessageContentText struct{…}

A text content.

Text string
Type Text
type BetaResponseOutputItemAgentMessageContentSummaryText struct{…}

A summary text from the model.

Text string

A summary of the reasoning output from the model so far.

Type SummaryText

The type of the object. Always summary_text.

type BetaResponseOutputItemAgentMessageContentReasoningText struct{…}

Reasoning text from the model.

Text string

The reasoning text from the model.

Type ReasoningText

The type of the reasoning text. Always reasoning_text.

type BetaResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string

The refusal explanation from the model.

Type Refusal

The type of the refusal. Always refusal.

type BetaResponseInputImage struct{…}

An image input to the model. Learn about image inputs.

Detail BetaResponseInputImageDetail

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

One of the following:
const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"
const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"
const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"
const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"
Type InputImage

The type of the input item. Always input_image.

FileID stringOptional

The ID of the file to be sent to the model.

ImageURL stringOptional

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

formaturi
PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpointOptional

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

Mode Explicit

The breakpoint mode. Always explicit.

type BetaResponseOutputItemAgentMessageContentComputerScreenshot struct{…}

A screenshot of a computer.

Detail string

The detail level of the screenshot image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

One of the following:
const BetaResponseOutputItemAgentMessageContentComputerScreenshotDetailLow BetaResponseOutputItemAgentMessageContentComputerScreenshotDetail = "low"
const BetaResponseOutputItemAgentMessageContentComputerScreenshotDetailHigh BetaResponseOutputItemAgentMessageContentComputerScreenshotDetail = "high"
const BetaResponseOutputItemAgentMessageContentComputerScreenshotDetailAuto BetaResponseOutputItemAgentMessageContentComputerScreenshotDetail = "auto"
const BetaResponseOutputItemAgentMessageContentComputerScreenshotDetailOriginal BetaResponseOutputItemAgentMessageContentComputerScreenshotDetail = "original"
FileID string

The identifier of an uploaded file that contains the screenshot.

ImageURL string

The URL of the screenshot image.

formaturi
Type ComputerScreenshot

Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpointOptional

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

Mode Explicit

The breakpoint mode. Always explicit.

type BetaResponseInputFile struct{…}

A file input to the model.

Type InputFile

The type of the input item. Always input_file.

Detail BetaResponseInputFileDetailOptional

The detail level of the file to be sent to the model. Use auto to let the system select the detail level; for GPT-5.6 and later models, auto uses high-quality rendering, which may increase input token usage. Use low for lower-cost rendering, or high to render the file at higher quality. Defaults to auto.

One of the following:
const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"
const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"
const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"
FileData stringOptional

The content of the file to be sent to the model.

FileID stringOptional

The ID of the file to be sent to the model.

FileURL stringOptional

The URL of the file to be sent to the model.

formaturi
Filename stringOptional

The name of the file to be sent to the model.

PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpointOptional

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

Mode Explicit

The breakpoint mode. Always explicit.

type BetaResponseOutputItemAgentMessageContentEncryptedContent struct{…}

Opaque encrypted content that Responses API decrypts inside trusted model execution.

EncryptedContent string

Opaque encrypted content.

Type EncryptedContent

The type of the input item. Always encrypted_content.

Recipient string

The destination agent identity.

Type AgentMessage

The type of the item. Always agent_message.

Agent BetaResponseOutputItemAgentMessageAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

type BetaResponseOutputItemMultiAgentCall struct{…}
ID string

The unique ID of the multi-agent call item.

Action string

The multi-agent action to execute.

One of the following:
const BetaResponseOutputItemMultiAgentCallActionSpawnAgent BetaResponseOutputItemMultiAgentCallAction = "spawn_agent"
const BetaResponseOutputItemMultiAgentCallActionInterruptAgent BetaResponseOutputItemMultiAgentCallAction = "interrupt_agent"
const BetaResponseOutputItemMultiAgentCallActionListAgents BetaResponseOutputItemMultiAgentCallAction = "list_agents"
const BetaResponseOutputItemMultiAgentCallActionSendMessage BetaResponseOutputItemMultiAgentCallAction = "send_message"
const BetaResponseOutputItemMultiAgentCallActionFollowupTask BetaResponseOutputItemMultiAgentCallAction = "followup_task"
const BetaResponseOutputItemMultiAgentCallActionWaitAgent BetaResponseOutputItemMultiAgentCallAction = "wait_agent"
Arguments string

The JSON string of arguments generated for the action.

CallID string

The unique ID linking this call to its output.

Type MultiAgentCall

The type of the multi-agent call. Always multi_agent_call.

Agent BetaResponseOutputItemMultiAgentCallAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

type BetaResponseOutputItemMultiAgentCallOutput struct{…}
ID string

The unique ID of the multi-agent call output item.

Action string

The multi-agent action that produced this result.

One of the following:
const BetaResponseOutputItemMultiAgentCallOutputActionSpawnAgent BetaResponseOutputItemMultiAgentCallOutputAction = "spawn_agent"
const BetaResponseOutputItemMultiAgentCallOutputActionInterruptAgent BetaResponseOutputItemMultiAgentCallOutputAction = "interrupt_agent"
const BetaResponseOutputItemMultiAgentCallOutputActionListAgents BetaResponseOutputItemMultiAgentCallOutputAction = "list_agents"
const BetaResponseOutputItemMultiAgentCallOutputActionSendMessage BetaResponseOutputItemMultiAgentCallOutputAction = "send_message"
const BetaResponseOutputItemMultiAgentCallOutputActionFollowupTask BetaResponseOutputItemMultiAgentCallOutputAction = "followup_task"
const BetaResponseOutputItemMultiAgentCallOutputActionWaitAgent BetaResponseOutputItemMultiAgentCallOutputAction = "wait_agent"
CallID string

The unique ID of the multi-agent call.

Text output returned by the multi-agent action.

Annotations []BetaResponseOutputTextAnnotationUnion

The annotations of the text output.

One of the following:
type BetaResponseOutputTextAnnotationFileCitation struct{…}

A citation to a file.

FileID string

The ID of the file.

Filename string

The filename of the file cited.

Index int64

The index of the file in the list of files.

Type FileCitation

The type of the file citation. Always file_citation.

type BetaResponseOutputTextAnnotationURLCitation struct{…}

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

EndIndex int64

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

StartIndex int64

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

Title string

The title of the web resource.

Type URLCitation

The type of the URL citation. Always url_citation.

URL string

The URL of the web resource.

formaturi
type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}

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

ContainerID string

The ID of the container file.

EndIndex int64

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

FileID string

The ID of the file.

Filename string

The filename of the container file cited.

StartIndex int64

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

Type ContainerFileCitation

The type of the container file citation. Always container_file_citation.

type BetaResponseOutputTextAnnotationFilePath struct{…}

A path to a file.

FileID string

The ID of the file.

Index int64

The index of the file in the list of files.

Type FilePath

The type of the file path. Always file_path.

Text string

The text output from the model.

Type OutputText

The type of the output text. Always output_text.

Logprobs []BetaResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []BetaResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
Type MultiAgentCallOutput

The type of the multi-agent result. Always multi_agent_call_output.

Agent BetaResponseOutputItemMultiAgentCallOutputAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

One of the following:
One of the following:
type BetaResponseComputerToolCall struct{…}

A tool call to a computer use tool. See the computer use guide for more information.

ID string

The unique ID of the computer call.

CallID string

An identifier used when responding to the tool call with output.

PendingSafetyChecks []BetaResponseComputerToolCallPendingSafetyCheck

The pending safety checks for the computer call.

ID string

The ID of the pending safety check.

Code stringOptional

The type of the pending safety check.

Message stringOptional

Details about the pending safety check.

Status BetaResponseComputerToolCallStatus

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

One of the following:
const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"
const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"
const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"
Type BetaResponseComputerToolCallType

The type of the computer call. Always computer_call.

A click action.

One of the following:
type BetaComputerActionClick struct{…}

A click action.

Button string

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

One of the following:
const BetaComputerActionClickButtonLeft BetaComputerActionClickButton = "left"
const BetaComputerActionClickButtonRight BetaComputerActionClickButton = "right"
const BetaComputerActionClickButtonWheel BetaComputerActionClickButton = "wheel"
const BetaComputerActionClickButtonBack BetaComputerActionClickButton = "back"
const BetaComputerActionClickButtonForward BetaComputerActionClickButton = "forward"
Type Click

Specifies the event type. For a click action, this property is always click.

X int64

The x-coordinate where the click occurred.

Y int64

The y-coordinate where the click occurred.

Keys []stringOptional

The keys being held while clicking.

type BetaComputerActionDoubleClick struct{…}

A double click action.

Keys []string

The keys being held while double-clicking.

Type DoubleClick

Specifies the event type. For a double click action, this property is always set to double_click.

X int64

The x-coordinate where the double click occurred.

Y int64

The y-coordinate where the double click occurred.

type BetaComputerActionDrag struct{…}

A drag action.

Path []BetaComputerActionDragPath

An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg

[
  { x: 100, y: 200 },
  { x: 200, y: 300 }
]
X int64

The x-coordinate.

Y int64

The y-coordinate.

Type Drag

Specifies the event type. For a drag action, this property is always set to drag.

Keys []stringOptional

The keys being held while dragging the mouse.

type BetaComputerActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string

The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.

Type Keypress

Specifies the event type. For a keypress action, this property is always set to keypress.

type BetaComputerActionMove struct{…}

A mouse move action.

Type Move

Specifies the event type. For a move action, this property is always set to move.

X int64

The x-coordinate to move to.

Y int64

The y-coordinate to move to.

Keys []stringOptional

The keys being held while moving the mouse.

type BetaComputerActionScreenshot struct{…}

A screenshot action.

Type Screenshot

Specifies the event type. For a screenshot action, this property is always set to screenshot.

type BetaComputerActionScroll struct{…}

A scroll action.

ScrollX int64

The horizontal scroll distance.

ScrollY int64

The vertical scroll distance.

Type Scroll

Specifies the event type. For a scroll action, this property is always set to scroll.

X int64

The x-coordinate where the scroll occurred.

Y int64

The y-coordinate where the scroll occurred.

Keys []stringOptional

The keys being held while scrolling.

type BetaComputerActionType struct{…}

An action to type in text.

Text string

The text to type.

Type Type

Specifies the event type. For a type action, this property is always set to type.

type BetaComputerActionWait struct{…}

A wait action.

Type Wait

Specifies the event type. For a wait action, this property is always set to wait.

Actions BetaComputerActionListOptional

Flattened batched actions for computer_use. Each action includes an type discriminator and action-specific fields.

One of the following:
type BetaComputerActionClick struct{…}

A click action.

Button string

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

One of the following:
const BetaComputerActionClickButtonLeft BetaComputerActionClickButton = "left"
const BetaComputerActionClickButtonRight BetaComputerActionClickButton = "right"
const BetaComputerActionClickButtonWheel BetaComputerActionClickButton = "wheel"
const BetaComputerActionClickButtonBack BetaComputerActionClickButton = "back"
const BetaComputerActionClickButtonForward BetaComputerActionClickButton = "forward"
Type Click

Specifies the event type. For a click action, this property is always click.

X int64

The x-coordinate where the click occurred.

Y int64

The y-coordinate where the click occurred.

Keys []stringOptional

The keys being held while clicking.

type BetaComputerActionDoubleClick struct{…}

A double click action.

Keys []string

The keys being held while double-clicking.

Type DoubleClick

Specifies the event type. For a double click action, this property is always set to double_click.

X int64

The x-coordinate where the double click occurred.

Y int64

The y-coordinate where the double click occurred.

type BetaComputerActionDrag struct{…}

A drag action.

Path []BetaComputerActionDragPath

An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg

[
  { x: 100, y: 200 },
  { x: 200, y: 300 }
]
X int64

The x-coordinate.

Y int64

The y-coordinate.

Type Drag

Specifies the event type. For a drag action, this property is always set to drag.

Keys []stringOptional

The keys being held while dragging the mouse.

type BetaComputerActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string

The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.

Type Keypress

Specifies the event type. For a keypress action, this property is always set to keypress.

type BetaComputerActionMove struct{…}

A mouse move action.

Type Move

Specifies the event type. For a move action, this property is always set to move.

X int64

The x-coordinate to move to.

Y int64

The y-coordinate to move to.

Keys []stringOptional

The keys being held while moving the mouse.

type BetaComputerActionScreenshot struct{…}

A screenshot action.

Type Screenshot

Specifies the event type. For a screenshot action, this property is always set to screenshot.

type BetaComputerActionScroll struct{…}

A scroll action.

ScrollX int64

The horizontal scroll distance.

ScrollY int64

The vertical scroll distance.

Type Scroll

Specifies the event type. For a scroll action, this property is always set to scroll.

X int64

The x-coordinate where the scroll occurred.

Y int64

The y-coordinate where the scroll occurred.

Keys []stringOptional

The keys being held while scrolling.

type BetaComputerActionType struct{…}

An action to type in text.

Text string

The text to type.

Type Type

Specifies the event type. For a type action, this property is always set to type.

type BetaComputerActionWait struct{…}

A wait action.

Type Wait

Specifies the event type. For a wait action, this property is always set to wait.

Agent BetaResponseComputerToolCallAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

type BetaResponseComputerToolCallOutputItem struct{…}
ID string

The unique ID of the computer call tool output.

CallID string

The ID of the computer tool call that produced the output.

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot

Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

FileID stringOptional

The identifier of an uploaded file that contains the screenshot.

ImageURL stringOptional

The URL of the screenshot image.

formaturi
Status BetaResponseComputerToolCallOutputItemStatus

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:
const BetaResponseComputerToolCallOutputItemStatusCompleted BetaResponseComputerToolCallOutputItemStatus = "completed"
const BetaResponseComputerToolCallOutputItemStatusIncomplete BetaResponseComputerToolCallOutputItemStatus = "incomplete"
const BetaResponseComputerToolCallOutputItemStatusFailed BetaResponseComputerToolCallOutputItemStatus = "failed"
const BetaResponseComputerToolCallOutputItemStatusInProgress BetaResponseComputerToolCallOutputItemStatus = "in_progress"
Type ComputerCallOutput

The type of the computer tool call output. Always computer_call_output.

AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheckOptional

The safety checks reported by the API that have been acknowledged by the developer.

ID string

The ID of the pending safety check.

Code stringOptional

The type of the pending safety check.

Message stringOptional

Details about the pending safety check.

Agent BetaResponseComputerToolCallOutputItemAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

CreatedBy stringOptional

The identifier of the actor that created the item.

type BetaResponseReasoningItem struct{…}

A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context.

ID string

The unique identifier of the reasoning content.

Summary []BetaResponseReasoningItemSummary

Reasoning summary content.

Text string

A summary of the reasoning output from the model so far.

Type SummaryText

The type of the object. Always summary_text.

Type Reasoning

The type of the object. Always reasoning.

Agent BetaResponseReasoningItemAgentOptional

The agent that produced this item.

AgentName string

The canonical name of the agent that produced this item.

Content []BetaResponseReasoningItemContentOptional

Reasoning text content.

Text string

The reasoning text from the model.

Type ReasoningText

The type of the reasoning text. Always reasoning_text.

EncryptedContent stringOptional

The encrypted content of the reasoning item. This is populated by default for reasoning items returned by POST /v1/responses and WebSocket response.create requests.

When streaming, use the completed reasoning item and its encrypted_content from the response.output_item.done event in subsequent requests. The encrypted_content in response.output_item.added may be incomplete. This is especially important when store is false or when using Zero Data Retention.

Status BetaResponseReasoningItemStatusOptional

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

One of the following:
const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"
const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"
const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"
type BetaResponseOutputItemProgram struct{…}
type BetaResponseOutputItemProgramOutput struct{…}
type BetaResponseToolSearchCall struct{…}
type BetaResponseToolSearchOutputItem struct{…}
type BetaResponseOutputItemAdditionalTools struct{…}
type BetaResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

type BetaResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

type BetaResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

type BetaResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

type BetaResponseOutputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

type BetaResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

type BetaResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

type BetaResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

type BetaResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

type BetaResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

type BetaResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

type BetaResponseOutputItemMcpApprovalRequest struct{…}

A request for human approval of a tool invocation.

type BetaResponseOutputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

type BetaResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

type BetaResponseCustomToolCallOutputItem struct{…}

The output of a custom tool call from your code, being sent back to the model.