# Responses

## Create a model response

`client.Beta.Responses.New(ctx, params) (*BetaResponse, error)`

**post** `/responses?beta=true`

Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or
[image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text)
or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call
your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in
[tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search)
or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data
as input for the model's response.

### Parameters

- `params BetaResponseNewParams`

  - `Background param.Field[bool]`

    Body param: Whether to run the model response in the background.
    [Learn more](https://platform.openai.com/docs/guides/background).

  - `ContextManagement param.Field[[]BetaResponseNewParamsContextManagement]`

    Body param: Context management configuration for this request.

    - `Type string`

      The context management entry type. Currently only 'compaction' is supported.

    - `CompactThreshold int64`

      Token threshold at which compaction should be triggered for this entry.

  - `Conversation param.Field[BetaResponseNewParamsConversationUnion]`

    Body param: The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.
    Input items and output items from this response are automatically added to this conversation after this response completes.

    - `string`

    - `type BetaResponseConversationParamResp struct{…}`

      The conversation that this response belongs to.

      - `ID string`

        The unique ID of the conversation.

  - `Include param.Field[[]BetaResponseIncludable]`

    Body param: Specify additional output data to include in the model response. Currently supported values are:

    - `web_search_call.action.sources`: Include the sources of the web search tool call.
    - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.
    - `computer_call_output.output.image_url`: Include image urls from the computer call output.
    - `file_search_call.results`: Include the search results of the file search tool call.
    - `message.input_image.image_url`: Include image urls from the input message.
    - `message.output_text.logprobs`: Include logprobs with assistant messages.
    - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).

    - `const BetaResponseIncludableFileSearchCallResults BetaResponseIncludable = "file_search_call.results"`

    - `const BetaResponseIncludableWebSearchCallResults BetaResponseIncludable = "web_search_call.results"`

    - `const BetaResponseIncludableWebSearchCallActionSources BetaResponseIncludable = "web_search_call.action.sources"`

    - `const BetaResponseIncludableMessageInputImageImageURL BetaResponseIncludable = "message.input_image.image_url"`

    - `const BetaResponseIncludableComputerCallOutputOutputImageURL BetaResponseIncludable = "computer_call_output.output.image_url"`

    - `const BetaResponseIncludableCodeInterpreterCallOutputs BetaResponseIncludable = "code_interpreter_call.outputs"`

    - `const BetaResponseIncludableReasoningEncryptedContent BetaResponseIncludable = "reasoning.encrypted_content"`

    - `const BetaResponseIncludableMessageOutputTextLogprobs BetaResponseIncludable = "message.output_text.logprobs"`

  - `Input param.Field[BetaResponseNewParamsInputUnion]`

    Body param: Text, image, or file inputs to the model, used to generate a response.

    Learn more:

    - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
    - [Image inputs](https://platform.openai.com/docs/guides/images)
    - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
    - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
    - [Function calling](https://platform.openai.com/docs/guides/function-calling)

    - `string`

    - `type BetaResponseInput []BetaResponseInputItemUnion`

      A list of one or many input items to the model, containing
      different content types.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

        - `Content BetaEasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail BetaResponseInputImageDetail`

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

                - `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`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileDetail`

                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`.

                - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

              - `FileData string`

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

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Role BetaEasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

          - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

          - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

          - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

        - `Phase BetaEasyInputMessagePhase`

          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.

          - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

          - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

        - `Type BetaEasyInputMessageType`

          The type of the message input. Always `message`.

          - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

        - `Content BetaResponseInputMessageContentList`

          A list of one or many input items to the model, containing different content
          types.

        - `Role string`

          The role of the message input. One of `user`, `system`, or `developer`.

          - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

          - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

          - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

        - `Agent BetaResponseInputItemMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

          - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

          - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

      - `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.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `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`.

                  - `const FileCitationFileCitation FileCitation = "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`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the web resource.

              - `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`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []BetaResponseOutputTextLogprob`

              - `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`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          The role of the output message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status BetaResponseOutputMessageStatus`

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

          - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

          - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

          - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Agent BetaResponseOutputMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Phase BetaResponseOutputMessagePhase`

          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.

          - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

          - `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`.

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Agent BetaResponseFileSearchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Results []BetaResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

            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.

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

            The unique ID of the file.

          - `Filename string`

            The name of the file.

          - `Score float64`

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

          - `Text string`

            The text that was retrieved from the file.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

            The type of the pending safety check.

          - `Message string`

            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.

          - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

          - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

          - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

        - `Type BetaResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

        - `Action BetaComputerActionUnion`

          A click action.

          - `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`.

              - `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`.

              - `const ClickClick Click = "click"`

            - `X int64`

              The x-coordinate where the click occurred.

            - `Y int64`

              The y-coordinate where the click occurred.

            - `Keys []string`

              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`.

              - `const DoubleClickDoubleClick DoubleClick = "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`.

              - `const DragDrag Drag = "drag"`

            - `Keys []string`

              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`.

              - `const KeypressKeypress Keypress = "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`.

              - `const MoveMove Move = "move"`

            - `X int64`

              The x-coordinate to move to.

            - `Y int64`

              The y-coordinate to move to.

            - `Keys []string`

              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`.

              - `const ScreenshotScreenshot Screenshot = "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`.

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

              The x-coordinate where the scroll occurred.

            - `Y int64`

              The y-coordinate where the scroll occurred.

            - `Keys []string`

              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`.

              - `const TypeType Type = "type"`

          - `type BetaComputerActionWait struct{…}`

            A wait action.

            - `Type Wait`

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

              - `const WaitWait Wait = "wait"`

        - `Actions BetaComputerActionList`

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

          - `type BetaComputerActionClick struct{…}`

            A click action.

          - `type BetaComputerActionDoubleClick struct{…}`

            A double click action.

          - `type BetaComputerActionDrag struct{…}`

            A drag action.

          - `type BetaComputerActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

          - `type BetaComputerActionMove struct{…}`

            A mouse move action.

          - `type BetaComputerActionScreenshot struct{…}`

            A screenshot action.

          - `type BetaComputerActionScroll struct{…}`

            A scroll action.

          - `type BetaComputerActionType struct{…}`

            An action to type in text.

          - `type BetaComputerActionWait struct{…}`

            A wait action.

        - `Agent BetaResponseComputerToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

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

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          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`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

        - `Type ComputerCallOutput`

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

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

          The ID of the computer tool call output.

        - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseInputItemComputerCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

          - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action BetaResponseFunctionWebSearchActionUnion`

          An object describing the specific action taken in this web search call.
          Includes details on how the model used the web (search, open_page, find_in_page).

          - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

            Action type "search" - Performs a web search query.

            - `Type Search`

              The action type.

              - `const SearchSearch Search = "search"`

            - `Queries []string`

              The search queries.

            - `Query string`

              The search query.

            - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

              The sources used in the search.

              - `Type URL`

                The type of source. Always `url`.

                - `const URLURL URL = "url"`

              - `URL string`

                The URL of the source.

          - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

            Action type "open_page" - Opens a specific URL from search results.

            - `Type OpenPage`

              The action type.

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

              The URL opened by the model.

          - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

            Action type "find_in_page": Searches for a pattern within a loaded page.

            - `Pattern string`

              The pattern or text to search for within the page.

            - `Type FindInPage`

              The action type.

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

              The URL of the page searched for the pattern.

        - `Status BetaResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

          - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

          - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

          - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          The type of the web search tool call. Always `web_search_call`.

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

        - `Agent BetaResponseFunctionWebSearchAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

          The unique ID of the function tool call.

        - `Agent BetaResponseFunctionToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the function to run.

        - `Status BetaResponseFunctionToolCallStatus`

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

          - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

          - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

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

        - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type BetaResponseInputTextContent 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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail BetaResponseInputImageContentDetail`

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

                - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileContentDetail`

                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`.

                - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Type FunctionCallOutput`

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

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

          The unique ID of the function tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemFunctionCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Status string`

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

          - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

        - `Author string`

          The sending agent identity.

        - `Content []BetaResponseInputItemAgentMessageContentUnion`

          Plaintext, image, or encrypted content sent between agents.

          - `type BetaResponseInputTextContent struct{…}`

            A text input to the model.

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The item type. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `ID string`

          The unique ID of this agent message item.

        - `Agent BetaResponseInputItemAgentMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

        - `Action string`

          The multi-agent action that was executed.

          - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

        - `Arguments string`

          The action arguments as a JSON string.

        - `CallID string`

          The unique ID linking this call to its output.

        - `Type MultiAgentCall`

          The item type. Always `multi_agent_call`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `ID string`

          The unique ID of this multi-agent call.

        - `Agent BetaResponseInputItemMultiAgentCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

        - `Action string`

          The multi-agent action that produced this result.

          - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

        - `CallID string`

          The unique ID of the multi-agent call.

        - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

          Text output returned by the multi-agent action.

          - `Text string`

            The text content.

          - `Type OutputText`

            The content type. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

            Citations associated with the text content.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

              - `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 citation type. Always `file_citation`.

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

              - `EndIndex int64`

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

              - `StartIndex int64`

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

              - `Title string`

                The title of the cited resource.

              - `Type URLCitation`

                The citation type. Always `url_citation`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the cited resource.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

              - `ContainerID string`

                The ID of the container.

              - `EndIndex int64`

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

              - `FileID string`

                The ID of the container file.

              - `Filename string`

                The filename of the container file cited.

              - `StartIndex int64`

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

              - `Type ContainerFileCitation`

                The citation type. Always `container_file_citation`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `Type MultiAgentCallOutput`

          The item type. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `ID string`

          The unique ID of this multi-agent call output.

        - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemToolSearchCall struct{…}`

        - `Arguments any`

          The arguments supplied to the tool search call.

        - `Type ToolSearchCall`

          The item type. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `ID string`

          The unique ID of this tool search call.

        - `Agent BetaResponseInputItemToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

          - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

          - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by the tool search output.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `Name string`

              The name of the function to call.

            - `Parameters map[string, any]`

              A JSON schema object describing the parameters of the function.

            - `Strict bool`

              Whether strict parameter validation is enforced for this function tool.

            - `Type Function`

              The type of the function tool. Always `function`.

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

              - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function is deferred and loaded via tool search.

            - `Description string`

              A description of the function. Used by the model to determine whether or not to call the function.

            - `OutputSchema map[string, any]`

              A JSON schema object describing the JSON value encoded in string outputs for this function.

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `Type FileSearch`

              The type of the file search tool. Always `file_search`.

              - `const FileSearchFileSearch FileSearch = "file_search"`

            - `VectorStoreIDs []string`

              The IDs of the vector stores to search.

            - `Filters BetaFileSearchToolFiltersUnion`

              A filter to apply.

              - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                - `Type string`

                  Type of operation: `and` or `or`.

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions BetaFileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                - `EmbeddingWeight float64`

                  The weight of the embedding in the reciprocal ranking fusion.

                - `TextWeight float64`

                  The weight of the text in the reciprocal ranking fusion.

              - `Ranker string`

                The ranker to use for the file search.

                - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

              - `ScoreThreshold float64`

                The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment BetaComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

              - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

              - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

              - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

              - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

            - `Filters BetaWebSearchToolFilters`

              Filters for the search.

              - `AllowedDomains []string`

                Allowed domains for the search. If not provided, all domains are allowed.
                Subdomains of the provided domains are allowed as well.

                Example: `["pubmed.ncbi.nlm.nih.gov"]`

            - `SearchContextSize BetaWebSearchToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

              - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

              - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchToolUserLocation`

              The approximate location of the user.

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `Type string`

                The type of location approximation. Always `approximate`.

                - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `ServerLabel string`

              A label for this MCP server, used to identify it in tool calls.

            - `Type Mcp`

              The type of the MCP tool. Always `mcp`.

              - `const McpMcp Mcp = "mcp"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

              - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools BetaToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `Authorization string`

              An OAuth access token that can be used with a remote MCP server, either
              with a custom MCP server URL or a service connector. Your application
              must handle the OAuth authorization flow and provide the token here.

            - `ConnectorID string`

              Identifier for service connectors, like those available in ChatGPT. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
              about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

              Currently supported `connector_id` values are:

              - Dropbox: `connector_dropbox`
              - Gmail: `connector_gmail`
              - Google Calendar: `connector_googlecalendar`
              - Google Drive: `connector_googledrive`
              - Microsoft Teams: `connector_microsoftteams`
              - Outlook Calendar: `connector_outlookcalendar`
              - Outlook Email: `connector_outlookemail`
              - SharePoint: `connector_sharepoint`

              - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

              - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

              - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

              - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

              - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

              - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

              - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

              - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

            - `DeferLoading bool`

              Whether this MCP tool is deferred and discovered via tool search.

            - `Headers map[string, string]`

              Optional HTTP headers to send to the MCP server. Use for authentication
              or other purposes.

            - `RequireApproval BetaToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                Specify which of the MCP server's tools require approval. Can be
                `always`, `never`, or a filter object associated with tools
                that require approval.

                - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

                - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                Specify a single approval policy for all tools. One of `always` or
                `never`. When set to `always`, all tools will require approval. When
                set to `never`, all tools will not require approval.

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

            - `ServerDescription string`

              Optional description of the MCP server, used to provide more context.

            - `ServerURL string`

              The URL for the MCP server. One of `server_url`, `connector_id`, or
              `tunnel_id` must be provided.

            - `TunnelID string`

              The Secure MCP Tunnel ID to use instead of a direct server URL. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided.

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container BetaToolCodeInterpreterContainerUnion`

              The code interpreter container. Can be a container ID or an object that
              specifies uploaded file IDs to make available to your code, along with an
              optional `memory_limit` setting.

              - `string`

              - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                - `Type Auto`

                  Always `auto`.

                  - `const AutoAuto Auto = "auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      - `Domain string`

                        The domain associated with the secret.

                      - `Name string`

                        The name of the secret to inject for the domain.

                      - `Value string`

                        The secret value to inject for the domain.

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

              - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type BetaToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

            - `Type ImageGeneration`

              The type of the image generation tool. Always `image_generation`.

              - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

            - `Action string`

              Whether to generate a new image or edit an existing image. Default: `auto`.

              - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

              - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

              - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s).
              This parameter is only supported for GPT image models that support
              transparent backgrounds. Must be one of `transparent`, `opaque`, or
              `auto` (default value). When `auto` is used, the model will
              automatically determine the best background for the image.

              `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
              transparent backgrounds. Requests with `background` set to
              `transparent` will return an error for these models; use `opaque` or
              `auto` instead.

              If `transparent`, the output format needs to support transparency,
              so it should be set to either `png` (default value) or `webp`.

              - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

              - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

              - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

              - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

              - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

            - `InputImageMask BetaToolImageGenerationInputImageMask`

              Optional mask for inpainting. Contains `image_url`
              (string, optional) and `file_id` (string, optional).

              - `FileID string`

                File ID for the mask image.

              - `ImageURL string`

                Base64-encoded mask image.

            - `Model string`

              The image generation model to use. Default: `gpt-image-1`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

              - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

              - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

              - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

            - `Quality string`

              The quality of the generated image. One of `low`, `medium`, `high`,
              or `auto`. Default: `auto`.

              - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

              - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

              - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

              - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

            - `Type LocalShell`

              The type of the local shell tool. Always `local_shell`.

              - `const LocalShellLocalShell LocalShell = "local_shell"`

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

            - `Type Shell`

              The type of the shell tool. Always `shell`.

              - `const ShellShell Shell = "shell"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

              - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

            - `Environment BetaFunctionShellToolEnvironmentUnion`

              - `type BetaContainerAuto struct{…}`

                - `Type ContainerAuto`

                  Automatically creates a container for this request

                  - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit BetaContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                  - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                  - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                  - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []BetaContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  - `type BetaSkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                    - `Type SkillReference`

                      References a skill created with the /v1/skills endpoint.

                      - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                    - `Version string`

                      Optional skill version. Use a positive integer or 'latest'. Omit for default.

                  - `type BetaInlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source BetaInlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                      - `MediaType ApplicationZip`

                        The media type of the inline skill payload. Must be `application/zip`.

                        - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                      - `Type Base64`

                        The type of the inline skill source. Must be `base64`.

                        - `const Base64Base64 Base64 = "base64"`

                    - `Type Inline`

                      Defines an inline skill for this request.

                      - `const InlineInline Inline = "inline"`

              - `type BetaLocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []BetaLocalSkill`

                  An optional list of skills.

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Path string`

                    The path to the directory containing the skill.

              - `type BetaContainerReference struct{…}`

                - `ContainerID string`

                  The ID of the referenced container.

                - `Type ContainerReference`

                  References a container created with the /v1/containers endpoint

                  - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Name string`

              The name of the custom tool, used to identify it in tool calls.

            - `Type Custom`

              The type of the custom tool. Always `custom`.

              - `const CustomCustom Custom = "custom"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

              - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this tool should be deferred and discovered via tool search.

            - `Description string`

              Optional description of the custom tool, used to provide more context.

            - `Format BetaCustomToolFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type BetaCustomToolFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type BetaCustomToolFormatGrammar struct{…}`

                A grammar defined by the user.

                - `Definition string`

                  The grammar definition.

                - `Syntax string`

                  The syntax of the grammar definition. One of `lark` or `regex`.

                  - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                  - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

            - `Description string`

              A description of the namespace shown to the model.

            - `Name string`

              The namespace name used in tool calls (for example, `crm`).

            - `Tools []BetaNamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              - `type BetaNamespaceToolToolFunction struct{…}`

                - `Name string`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function should be deferred and discovered via tool search.

                - `Description string`

                - `OutputSchema map[string, any]`

                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                - `Parameters any`

                - `Strict bool`

                  Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

            - `Type ToolSearch`

              The type of the tool. Always `tool_search`.

              - `const ToolSearchToolSearch ToolSearch = "tool_search"`

            - `Description string`

              Description shown to the model for a client-executed tool search tool.

            - `Execution BetaToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

              - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

              - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

              - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

              - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchPreviewToolUserLocation`

              The user's location.

              - `Type Approximate`

                The type of location approximation. Always `approximate`.

                - `const ApproximateApproximate Approximate = "approximate"`

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

            - `Type ApplyPatch`

              The type of the tool. Always `apply_patch`.

              - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

              - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

        - `Type ToolSearchOutput`

          The item type. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `ID string`

          The unique ID of this tool search output.

        - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

          - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []BetaToolUnion`

          A list of additional tools made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The item type. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `ID string`

          The unique ID of this additional tools item.

        - `Agent BetaResponseInputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

        - `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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          The type of the object. Always `reasoning`.

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Agent BetaResponseReasoningItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Content []BetaResponseReasoningItemContent`

          Reasoning text content.

          - `Text string`

            The reasoning text from the model.

          - `Type ReasoningText`

            The type of the reasoning text. Always `reasoning_text`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

          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.

        - `Status BetaResponseReasoningItemStatus`

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

          - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

          - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

          - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

        - `Agent BetaResponseCompactionItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseInputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

          The unique ID of the code interpreter tool call.

        - `Code string`

          The code to run, or null if not available.

        - `ContainerID string`

          The ID of the container used to run the code.

        - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

              The logs output from the code interpreter.

            - `Type Logs`

              The type of the output. Always `logs`.

              - `const LogsLogs Logs = "logs"`

          - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              The type of the output. Always `image`.

              - `const ImageImage Image = "image"`

            - `URL string`

              The URL of the image output from the code interpreter.

        - `Status BetaResponseCodeInterpreterToolCallStatus`

          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

          - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

          - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          The type of the code interpreter tool call. Always `code_interpreter_call`.

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Agent BetaResponseCodeInterpreterToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseInputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action BetaResponseInputItemShellCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

            Ordered shell commands for the execution environment to run.

          - `MaxOutputLength int64`

            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

          - `TimeoutMs int64`

            Maximum wall-clock time in milliseconds to allow the shell commands to run.

        - `CallID string`

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

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type BetaLocalEnvironment struct{…}`

          - `type BetaContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

          - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

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

        - `Output []BetaResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                The exit code returned by the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            Captured stderr output for the shell call.

          - `Stdout string`

            Captured stdout output for the shell call.

        - `Type ShellCallOutput`

          The type of the item. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

          The unique ID of the shell tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `MaxOutputLength int64`

          The maximum number of UTF-8 characters captured for this shell call's combined output.

        - `Status string`

          The status of the shell call output.

          - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

            - `Path string`

              Path of the file to create relative to the workspace root.

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

              Path of the file to delete relative to the workspace root.

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

            - `Path string`

              Path of the file to update relative to the workspace root.

            - `Type UpdateFile`

              The operation type. Always `update_file`.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Output string`

          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseInputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseInputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

          The unique ID of the approval response

        - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseInputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

          - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

          - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

      - `type BetaResponseCustomToolCallOutput struct{…}`

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

        - `CallID string`

          The call ID, used to map this custom tool call output to a custom tool call.

        - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          The type of the custom tool call output. Always `custom_tool_call_output`.

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

          The unique ID of the custom tool call output in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

          An identifier used to map this custom tool call to a tool call output.

        - `Input string`

          The input for the custom tool call generated by the model.

        - `Name string`

          The name of the custom tool being called.

        - `Type CustomToolCall`

          The type of the custom tool call. Always `custom_tool_call`.

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

          The unique ID of the custom tool call in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the custom tool being called.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

        - `Type CompactionTrigger`

          The type of the item. Always `compaction_trigger`.

          - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

        - `Agent BetaResponseInputItemCompactionTriggerAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Agent BetaResponseInputItemItemReferenceAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

      - `type BetaResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseInputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output.

          - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

          - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseInputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

  - `Instructions param.Field[string]`

    Body param: A system (or developer) message inserted into the model's context.

    When using along with `previous_response_id`, the instructions from a previous
    response will not be carried over to the next response. This makes it simple
    to swap out system (or developer) messages in new responses.

  - `MaxOutputTokens param.Field[int64]`

    Body param: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

  - `MaxToolCalls param.Field[int64]`

    Body param: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

  - `Metadata param.Field[map[string, string]]`

    Body param: 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.

  - `Model param.Field[BetaResponseNewParamsModel]`

    Body param: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
    offers a wide range of models with different capabilities, performance
    characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
    to browse and compare available models.

    - `BetaResponseNewParamsModel`

      - `const BetaResponseNewParamsModelGPT5_6Sol BetaResponseNewParamsModel = "gpt-5.6-sol"`

      - `const BetaResponseNewParamsModelGPT5_6Terra BetaResponseNewParamsModel = "gpt-5.6-terra"`

      - `const BetaResponseNewParamsModelGPT5_6Luna BetaResponseNewParamsModel = "gpt-5.6-luna"`

      - `const BetaResponseNewParamsModelGPT5_4 BetaResponseNewParamsModel = "gpt-5.4"`

      - `const BetaResponseNewParamsModelGPT5_4Mini BetaResponseNewParamsModel = "gpt-5.4-mini"`

      - `const BetaResponseNewParamsModelGPT5_4Nano BetaResponseNewParamsModel = "gpt-5.4-nano"`

      - `const BetaResponseNewParamsModelGPT5_4Mini2026_03_17 BetaResponseNewParamsModel = "gpt-5.4-mini-2026-03-17"`

      - `const BetaResponseNewParamsModelGPT5_4Nano2026_03_17 BetaResponseNewParamsModel = "gpt-5.4-nano-2026-03-17"`

      - `const BetaResponseNewParamsModelGPT5_3ChatLatest BetaResponseNewParamsModel = "gpt-5.3-chat-latest"`

      - `const BetaResponseNewParamsModelGPT5_2 BetaResponseNewParamsModel = "gpt-5.2"`

      - `const BetaResponseNewParamsModelGPT5_2_2025_12_11 BetaResponseNewParamsModel = "gpt-5.2-2025-12-11"`

      - `const BetaResponseNewParamsModelGPT5_2ChatLatest BetaResponseNewParamsModel = "gpt-5.2-chat-latest"`

      - `const BetaResponseNewParamsModelGPT5_2Pro BetaResponseNewParamsModel = "gpt-5.2-pro"`

      - `const BetaResponseNewParamsModelGPT5_2Pro2025_12_11 BetaResponseNewParamsModel = "gpt-5.2-pro-2025-12-11"`

      - `const BetaResponseNewParamsModelGPT5_1 BetaResponseNewParamsModel = "gpt-5.1"`

      - `const BetaResponseNewParamsModelGPT5_1_2025_11_13 BetaResponseNewParamsModel = "gpt-5.1-2025-11-13"`

      - `const BetaResponseNewParamsModelGPT5_1Codex BetaResponseNewParamsModel = "gpt-5.1-codex"`

      - `const BetaResponseNewParamsModelGPT5_1Mini BetaResponseNewParamsModel = "gpt-5.1-mini"`

      - `const BetaResponseNewParamsModelGPT5_1ChatLatest BetaResponseNewParamsModel = "gpt-5.1-chat-latest"`

      - `const BetaResponseNewParamsModelGPT5 BetaResponseNewParamsModel = "gpt-5"`

      - `const BetaResponseNewParamsModelGPT5Mini BetaResponseNewParamsModel = "gpt-5-mini"`

      - `const BetaResponseNewParamsModelGPT5Nano BetaResponseNewParamsModel = "gpt-5-nano"`

      - `const BetaResponseNewParamsModelGPT5_2025_08_07 BetaResponseNewParamsModel = "gpt-5-2025-08-07"`

      - `const BetaResponseNewParamsModelGPT5Mini2025_08_07 BetaResponseNewParamsModel = "gpt-5-mini-2025-08-07"`

      - `const BetaResponseNewParamsModelGPT5Nano2025_08_07 BetaResponseNewParamsModel = "gpt-5-nano-2025-08-07"`

      - `const BetaResponseNewParamsModelGPT5ChatLatest BetaResponseNewParamsModel = "gpt-5-chat-latest"`

      - `const BetaResponseNewParamsModelGPT4_1 BetaResponseNewParamsModel = "gpt-4.1"`

      - `const BetaResponseNewParamsModelGPT4_1Mini BetaResponseNewParamsModel = "gpt-4.1-mini"`

      - `const BetaResponseNewParamsModelGPT4_1Nano BetaResponseNewParamsModel = "gpt-4.1-nano"`

      - `const BetaResponseNewParamsModelGPT4_1_2025_04_14 BetaResponseNewParamsModel = "gpt-4.1-2025-04-14"`

      - `const BetaResponseNewParamsModelGPT4_1Mini2025_04_14 BetaResponseNewParamsModel = "gpt-4.1-mini-2025-04-14"`

      - `const BetaResponseNewParamsModelGPT4_1Nano2025_04_14 BetaResponseNewParamsModel = "gpt-4.1-nano-2025-04-14"`

      - `const BetaResponseNewParamsModelO4Mini BetaResponseNewParamsModel = "o4-mini"`

      - `const BetaResponseNewParamsModelO4Mini2025_04_16 BetaResponseNewParamsModel = "o4-mini-2025-04-16"`

      - `const BetaResponseNewParamsModelO3 BetaResponseNewParamsModel = "o3"`

      - `const BetaResponseNewParamsModelO3_2025_04_16 BetaResponseNewParamsModel = "o3-2025-04-16"`

      - `const BetaResponseNewParamsModelO3Mini BetaResponseNewParamsModel = "o3-mini"`

      - `const BetaResponseNewParamsModelO3Mini2025_01_31 BetaResponseNewParamsModel = "o3-mini-2025-01-31"`

      - `const BetaResponseNewParamsModelO1 BetaResponseNewParamsModel = "o1"`

      - `const BetaResponseNewParamsModelO1_2024_12_17 BetaResponseNewParamsModel = "o1-2024-12-17"`

      - `const BetaResponseNewParamsModelO1Preview BetaResponseNewParamsModel = "o1-preview"`

      - `const BetaResponseNewParamsModelO1Preview2024_09_12 BetaResponseNewParamsModel = "o1-preview-2024-09-12"`

      - `const BetaResponseNewParamsModelO1Mini BetaResponseNewParamsModel = "o1-mini"`

      - `const BetaResponseNewParamsModelO1Mini2024_09_12 BetaResponseNewParamsModel = "o1-mini-2024-09-12"`

      - `const BetaResponseNewParamsModelGPT4o BetaResponseNewParamsModel = "gpt-4o"`

      - `const BetaResponseNewParamsModelGPT4o2024_11_20 BetaResponseNewParamsModel = "gpt-4o-2024-11-20"`

      - `const BetaResponseNewParamsModelGPT4o2024_08_06 BetaResponseNewParamsModel = "gpt-4o-2024-08-06"`

      - `const BetaResponseNewParamsModelGPT4o2024_05_13 BetaResponseNewParamsModel = "gpt-4o-2024-05-13"`

      - `const BetaResponseNewParamsModelGPT4oAudioPreview BetaResponseNewParamsModel = "gpt-4o-audio-preview"`

      - `const BetaResponseNewParamsModelGPT4oAudioPreview2024_10_01 BetaResponseNewParamsModel = "gpt-4o-audio-preview-2024-10-01"`

      - `const BetaResponseNewParamsModelGPT4oAudioPreview2024_12_17 BetaResponseNewParamsModel = "gpt-4o-audio-preview-2024-12-17"`

      - `const BetaResponseNewParamsModelGPT4oAudioPreview2025_06_03 BetaResponseNewParamsModel = "gpt-4o-audio-preview-2025-06-03"`

      - `const BetaResponseNewParamsModelGPT4oMiniAudioPreview BetaResponseNewParamsModel = "gpt-4o-mini-audio-preview"`

      - `const BetaResponseNewParamsModelGPT4oMiniAudioPreview2024_12_17 BetaResponseNewParamsModel = "gpt-4o-mini-audio-preview-2024-12-17"`

      - `const BetaResponseNewParamsModelGPT4oSearchPreview BetaResponseNewParamsModel = "gpt-4o-search-preview"`

      - `const BetaResponseNewParamsModelGPT4oMiniSearchPreview BetaResponseNewParamsModel = "gpt-4o-mini-search-preview"`

      - `const BetaResponseNewParamsModelGPT4oSearchPreview2025_03_11 BetaResponseNewParamsModel = "gpt-4o-search-preview-2025-03-11"`

      - `const BetaResponseNewParamsModelGPT4oMiniSearchPreview2025_03_11 BetaResponseNewParamsModel = "gpt-4o-mini-search-preview-2025-03-11"`

      - `const BetaResponseNewParamsModelChatgpt4oLatest BetaResponseNewParamsModel = "chatgpt-4o-latest"`

      - `const BetaResponseNewParamsModelCodexMiniLatest BetaResponseNewParamsModel = "codex-mini-latest"`

      - `const BetaResponseNewParamsModelGPT4oMini BetaResponseNewParamsModel = "gpt-4o-mini"`

      - `const BetaResponseNewParamsModelGPT4oMini2024_07_18 BetaResponseNewParamsModel = "gpt-4o-mini-2024-07-18"`

      - `const BetaResponseNewParamsModelGPT4Turbo BetaResponseNewParamsModel = "gpt-4-turbo"`

      - `const BetaResponseNewParamsModelGPT4Turbo2024_04_09 BetaResponseNewParamsModel = "gpt-4-turbo-2024-04-09"`

      - `const BetaResponseNewParamsModelGPT4_0125Preview BetaResponseNewParamsModel = "gpt-4-0125-preview"`

      - `const BetaResponseNewParamsModelGPT4TurboPreview BetaResponseNewParamsModel = "gpt-4-turbo-preview"`

      - `const BetaResponseNewParamsModelGPT4_1106Preview BetaResponseNewParamsModel = "gpt-4-1106-preview"`

      - `const BetaResponseNewParamsModelGPT4VisionPreview BetaResponseNewParamsModel = "gpt-4-vision-preview"`

      - `const BetaResponseNewParamsModelGPT4 BetaResponseNewParamsModel = "gpt-4"`

      - `const BetaResponseNewParamsModelGPT4_0314 BetaResponseNewParamsModel = "gpt-4-0314"`

      - `const BetaResponseNewParamsModelGPT4_0613 BetaResponseNewParamsModel = "gpt-4-0613"`

      - `const BetaResponseNewParamsModelGPT4_32k BetaResponseNewParamsModel = "gpt-4-32k"`

      - `const BetaResponseNewParamsModelGPT4_32k0314 BetaResponseNewParamsModel = "gpt-4-32k-0314"`

      - `const BetaResponseNewParamsModelGPT4_32k0613 BetaResponseNewParamsModel = "gpt-4-32k-0613"`

      - `const BetaResponseNewParamsModelGPT3_5Turbo BetaResponseNewParamsModel = "gpt-3.5-turbo"`

      - `const BetaResponseNewParamsModelGPT3_5Turbo16k BetaResponseNewParamsModel = "gpt-3.5-turbo-16k"`

      - `const BetaResponseNewParamsModelGPT3_5Turbo0301 BetaResponseNewParamsModel = "gpt-3.5-turbo-0301"`

      - `const BetaResponseNewParamsModelGPT3_5Turbo0613 BetaResponseNewParamsModel = "gpt-3.5-turbo-0613"`

      - `const BetaResponseNewParamsModelGPT3_5Turbo1106 BetaResponseNewParamsModel = "gpt-3.5-turbo-1106"`

      - `const BetaResponseNewParamsModelGPT3_5Turbo0125 BetaResponseNewParamsModel = "gpt-3.5-turbo-0125"`

      - `const BetaResponseNewParamsModelGPT3_5Turbo16k0613 BetaResponseNewParamsModel = "gpt-3.5-turbo-16k-0613"`

      - `const BetaResponseNewParamsModelO1Pro BetaResponseNewParamsModel = "o1-pro"`

      - `const BetaResponseNewParamsModelO1Pro2025_03_19 BetaResponseNewParamsModel = "o1-pro-2025-03-19"`

      - `const BetaResponseNewParamsModelO3Pro BetaResponseNewParamsModel = "o3-pro"`

      - `const BetaResponseNewParamsModelO3Pro2025_06_10 BetaResponseNewParamsModel = "o3-pro-2025-06-10"`

      - `const BetaResponseNewParamsModelO3DeepResearch BetaResponseNewParamsModel = "o3-deep-research"`

      - `const BetaResponseNewParamsModelO3DeepResearch2025_06_26 BetaResponseNewParamsModel = "o3-deep-research-2025-06-26"`

      - `const BetaResponseNewParamsModelO4MiniDeepResearch BetaResponseNewParamsModel = "o4-mini-deep-research"`

      - `const BetaResponseNewParamsModelO4MiniDeepResearch2025_06_26 BetaResponseNewParamsModel = "o4-mini-deep-research-2025-06-26"`

      - `const BetaResponseNewParamsModelComputerUsePreview BetaResponseNewParamsModel = "computer-use-preview"`

      - `const BetaResponseNewParamsModelComputerUsePreview2025_03_11 BetaResponseNewParamsModel = "computer-use-preview-2025-03-11"`

      - `const BetaResponseNewParamsModelGPT5Codex BetaResponseNewParamsModel = "gpt-5-codex"`

      - `const BetaResponseNewParamsModelGPT5Pro BetaResponseNewParamsModel = "gpt-5-pro"`

      - `const BetaResponseNewParamsModelGPT5Pro2025_10_06 BetaResponseNewParamsModel = "gpt-5-pro-2025-10-06"`

      - `const BetaResponseNewParamsModelGPT5_1CodexMax BetaResponseNewParamsModel = "gpt-5.1-codex-max"`

    - `string`

  - `Moderation param.Field[BetaResponseNewParamsModeration]`

    Body param: Configuration for running moderation on the input and output of this response.

    - `Model string`

      The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'.

    - `Policy BetaResponseNewParamsModerationPolicy`

      The policy to apply to moderated response input and output.

      - `Input BetaResponseNewParamsModerationPolicyInput`

        The moderation policy for the response input.

        - `Mode string`

          - `const BetaResponseNewParamsModerationPolicyInputModeScore BetaResponseNewParamsModerationPolicyInputMode = "score"`

          - `const BetaResponseNewParamsModerationPolicyInputModeBlock BetaResponseNewParamsModerationPolicyInputMode = "block"`

      - `Output BetaResponseNewParamsModerationPolicyOutput`

        The moderation policy for the response output.

        - `Mode string`

          - `const BetaResponseNewParamsModerationPolicyOutputModeScore BetaResponseNewParamsModerationPolicyOutputMode = "score"`

          - `const BetaResponseNewParamsModerationPolicyOutputModeBlock BetaResponseNewParamsModerationPolicyOutputMode = "block"`

  - `MultiAgent param.Field[BetaResponseNewParamsMultiAgent]`

    Body param: Configuration for server-hosted multi-agent execution.

    - `Enabled bool`

      Whether to enable server-hosted multi-agent execution for this response.

    - `MaxConcurrentSubagents int64`

      `max_concurrent_subagents` sets the maximum number of subagents that can be active simultaneously across the entire agent tree. It includes all descendants—children, grandchildren, and deeper subagents—but excludes the root agent.
      The API does not impose a fixed upper bound on this setting. The default is `3`, which is recommended for most workloads. Multi-agent runs also have no fixed limit on tree depth or the total number of subagents created during a run.

  - `ParallelToolCalls param.Field[bool]`

    Body param: Whether to allow the model to run tool calls in parallel.

  - `PreviousResponseID param.Field[string]`

    Body param: The unique ID of the previous response to the model. Use this to
    create multi-turn conversations. Learn more about
    [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

  - `Prompt param.Field[BetaResponsePrompt]`

    Body param: Reference to a prompt template and its variables.
    [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

  - `PromptCacheKey param.Field[string]`

    Body param: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

  - `PromptCacheOptions param.Field[BetaResponseNewParamsPromptCacheOptions]`

    Body param: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details.

    - `Mode string`

      Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.

      - `const BetaResponseNewParamsPromptCacheOptionsModeImplicit BetaResponseNewParamsPromptCacheOptionsMode = "implicit"`

      - `const BetaResponseNewParamsPromptCacheOptionsModeExplicit BetaResponseNewParamsPromptCacheOptionsMode = "explicit"`

    - `Ttl string`

      The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.

      - `const BetaResponseNewParamsPromptCacheOptionsTtl30m BetaResponseNewParamsPromptCacheOptionsTtl = "30m"`

  - `PromptCacheRetention param.Field[BetaResponseNewParamsPromptCacheRetention]`

    Body param: Deprecated. Use `prompt_cache_options.ttl` instead.

    The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
    This field expresses a maximum retention policy, while
    `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
    fields are independent and do not interact.
    For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

    For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

    - Organizations without ZDR enabled default to `24h`.
    - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

    - `const BetaResponseNewParamsPromptCacheRetentionInMemory BetaResponseNewParamsPromptCacheRetention = "in_memory"`

    - `const BetaResponseNewParamsPromptCacheRetention24h BetaResponseNewParamsPromptCacheRetention = "24h"`

  - `Reasoning param.Field[BetaResponseNewParamsReasoning]`

    Body param: **gpt-5 and o-series models only**

    Configuration options for
    [reasoning models](https://platform.openai.com/docs/guides/reasoning).

    - `Context string`

      Controls which reasoning items are rendered back to the model on later turns.
      If omitted or set to `auto`, the model determines the context mode. The
      `gpt-5.6` model family defaults to `all_turns`; earlier models default to
      `current_turn`.

      When returned on a response, this is the effective reasoning context mode
      used for the response.

      - `const BetaResponseNewParamsReasoningContextAuto BetaResponseNewParamsReasoningContext = "auto"`

      - `const BetaResponseNewParamsReasoningContextCurrentTurn BetaResponseNewParamsReasoningContext = "current_turn"`

      - `const BetaResponseNewParamsReasoningContextAllTurns BetaResponseNewParamsReasoningContext = "all_turns"`

    - `Effort string`

      Constrains effort on reasoning for reasoning models. Currently supported
      values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
      Reducing reasoning effort can result in faster responses and fewer tokens
      used on reasoning in a response. Not all reasoning models support every
      value. See the
      [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
      for model-specific support.

      - `const BetaResponseNewParamsReasoningEffortNone BetaResponseNewParamsReasoningEffort = "none"`

      - `const BetaResponseNewParamsReasoningEffortMinimal BetaResponseNewParamsReasoningEffort = "minimal"`

      - `const BetaResponseNewParamsReasoningEffortLow BetaResponseNewParamsReasoningEffort = "low"`

      - `const BetaResponseNewParamsReasoningEffortMedium BetaResponseNewParamsReasoningEffort = "medium"`

      - `const BetaResponseNewParamsReasoningEffortHigh BetaResponseNewParamsReasoningEffort = "high"`

      - `const BetaResponseNewParamsReasoningEffortXhigh BetaResponseNewParamsReasoningEffort = "xhigh"`

      - `const BetaResponseNewParamsReasoningEffortMax BetaResponseNewParamsReasoningEffort = "max"`

    - `GenerateSummary string`

      **Deprecated:** use `summary` instead.

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      - `const BetaResponseNewParamsReasoningGenerateSummaryAuto BetaResponseNewParamsReasoningGenerateSummary = "auto"`

      - `const BetaResponseNewParamsReasoningGenerateSummaryConcise BetaResponseNewParamsReasoningGenerateSummary = "concise"`

      - `const BetaResponseNewParamsReasoningGenerateSummaryDetailed BetaResponseNewParamsReasoningGenerateSummary = "detailed"`

    - `Mode string`

      Controls the reasoning execution mode for the request.

      When returned on a response, this is the effective execution mode.

      - `string`

      - `string`

        - `const BetaResponseNewParamsReasoningModeStandard BetaResponseNewParamsReasoningMode = "standard"`

        - `const BetaResponseNewParamsReasoningModePro BetaResponseNewParamsReasoningMode = "pro"`

    - `Summary string`

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

      - `const BetaResponseNewParamsReasoningSummaryAuto BetaResponseNewParamsReasoningSummary = "auto"`

      - `const BetaResponseNewParamsReasoningSummaryConcise BetaResponseNewParamsReasoningSummary = "concise"`

      - `const BetaResponseNewParamsReasoningSummaryDetailed BetaResponseNewParamsReasoningSummary = "detailed"`

  - `SafetyIdentifier param.Field[string]`

    Body param: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
    The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `ServiceTier param.Field[BetaResponseNewParamsServiceTier]`

    Body param: Specifies the processing type used for serving the request.

    - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
    - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
    - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
    - When not set, the default behavior is 'auto'.

    When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

    - `const BetaResponseNewParamsServiceTierAuto BetaResponseNewParamsServiceTier = "auto"`

    - `const BetaResponseNewParamsServiceTierDefault BetaResponseNewParamsServiceTier = "default"`

    - `const BetaResponseNewParamsServiceTierFlex BetaResponseNewParamsServiceTier = "flex"`

    - `const BetaResponseNewParamsServiceTierScale BetaResponseNewParamsServiceTier = "scale"`

    - `const BetaResponseNewParamsServiceTierPriority BetaResponseNewParamsServiceTier = "priority"`

  - `Store param.Field[bool]`

    Body param: Whether to store the generated model response for later retrieval via
    API.

  - ``

  - `StreamOptions param.Field[BetaResponseNewParamsStreamOptions]`

    Body param: Options for streaming responses. Only set this when you set `stream: true`.

    - `IncludeObfuscation bool`

      When true, stream obfuscation will be enabled. Stream obfuscation adds
      random characters to an `obfuscation` field on streaming delta events to
      normalize payload sizes as a mitigation to certain side-channel attacks.
      These obfuscation fields are included by default, but add a small amount
      of overhead to the data stream. You can set `include_obfuscation` to
      false to optimize for bandwidth if you trust the network links between
      your application and the OpenAI API.

  - `Temperature param.Field[float64]`

    Body param: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
    We generally recommend altering this or `top_p` but not both.

  - `Text param.Field[BetaResponseTextConfig]`

    Body param: Configuration options for a text response from the model. Can be plain
    text or structured JSON data. Learn more:

    - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
    - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

  - `ToolChoice param.Field[BetaResponseNewParamsToolChoiceUnion]`

    Body param: How the model should select which tool (or tools) to use when generating
    a response. See the `tools` parameter to see how to specify which tools
    the model can call.

    - `type BetaToolChoiceOptions string`

      Controls which (if any) tool is called by the model.

      `none` means the model will not call any tool and instead generates a message.

      `auto` means the model can pick between generating a message or calling one or
      more tools.

      `required` means the model must call one or more tools.

      - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

      - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

      - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

    - `type BetaToolChoiceAllowed struct{…}`

      Constrains the tools available to the model to a pre-defined set.

      - `Mode BetaToolChoiceAllowedMode`

        Constrains the tools available to the model to a pre-defined set.

        `auto` allows the model to pick from among the allowed tools and generate a
        message.

        `required` requires the model to call one or more of the allowed tools.

        - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

        - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

      - `Tools []map[string, any]`

        A list of tool definitions that the model should be allowed to call.

        For the Responses API, the list of tool definitions might look like:

        ```json
        [
          { "type": "function", "name": "get_weather" },
          { "type": "mcp", "server_label": "deepwiki" },
          { "type": "image_generation" }
        ]
        ```

      - `Type AllowedTools`

        Allowed tool configuration type. Always `allowed_tools`.

        - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

    - `type BetaToolChoiceTypes struct{…}`

      Indicates that the model should use a built-in tool to generate a response.
      [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

      - `Type BetaToolChoiceTypesType`

        The type of hosted tool the model should to use. Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).

        Allowed values are:

        - `file_search`
        - `web_search_preview`
        - `computer`
        - `computer_use_preview`
        - `computer_use`
        - `code_interpreter`
        - `image_generation`

        - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

        - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

        - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

        - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

        - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

        - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

    - `type BetaToolChoiceFunction struct{…}`

      Use this option to force the model to call a specific function.

      - `Name string`

        The name of the function to call.

      - `Type Function`

        For function calling, the type is always `function`.

        - `const FunctionFunction Function = "function"`

    - `type BetaToolChoiceMcp struct{…}`

      Use this option to force the model to call a specific tool on a remote MCP server.

      - `ServerLabel string`

        The label of the MCP server to use.

      - `Type Mcp`

        For MCP tools, the type is always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `Name string`

        The name of the tool to call on the server.

    - `type BetaToolChoiceCustom struct{…}`

      Use this option to force the model to call a specific custom tool.

      - `Name string`

        The name of the custom tool to call.

      - `Type Custom`

        For custom tool calling, the type is always `custom`.

        - `const CustomCustom Custom = "custom"`

    - `BetaResponseNewParamsToolChoiceBetaSpecificProgrammaticToolCallingParam`

      - `Type ProgrammaticToolCalling`

        The tool to call. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolChoiceApplyPatch struct{…}`

      Forces the model to call the apply_patch tool when executing a tool call.

      - `Type ApplyPatch`

        The tool to call. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `type BetaToolChoiceShell struct{…}`

      Forces the model to call the shell tool when a tool call is required.

      - `Type Shell`

        The tool to call. Always `shell`.

        - `const ShellShell Shell = "shell"`

  - `Tools param.Field[[]BetaToolUnion]`

    Body param: An array of tools the model may call while generating a response. You
    can specify which tool to use by setting the `tool_choice` parameter.

    We support the following categories of tools:

    - **Built-in tools**: Tools that are provided by OpenAI that extend the
      model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
      or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
      [built-in tools](https://platform.openai.com/docs/guides/tools).
    - **MCP Tools**: Integrations with third-party systems via custom MCP servers
      or predefined connectors such as Google Drive and SharePoint. Learn more about
      [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
    - **Function calls (custom tools)**: Functions that are defined by you,
      enabling the model to call your own code with strongly typed arguments
      and outputs. Learn more about
      [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
      custom tools to call your own code.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

    - `type BetaToolProgrammaticToolCalling struct{…}`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

  - `TopLogprobs param.Field[int64]`

    Body param: An integer between 0 and 20 specifying the maximum number of most likely
    tokens to return at each token position, each with an associated log
    probability. In some cases, the number of returned tokens may be fewer than
    requested.

  - `TopP param.Field[float64]`

    Body param: An alternative to sampling with temperature, called nucleus sampling,
    where the model considers the results of the tokens with top_p probability
    mass. So 0.1 means only the tokens comprising the top 10% probability mass
    are considered.

    We generally recommend altering this or `temperature` but not both.

  - `Truncation param.Field[BetaResponseNewParamsTruncation]`

    Body param: The truncation strategy to use for the model response.

    - `auto`: If the input to this Response exceeds
      the model's context window size, the model will truncate the
      response to fit the context window by dropping items from the beginning of the conversation.
    - `disabled` (default): If the input size will exceed the context window
      size for a model, the request will fail with a 400 error.

    - `const BetaResponseNewParamsTruncationAuto BetaResponseNewParamsTruncation = "auto"`

    - `const BetaResponseNewParamsTruncationDisabled BetaResponseNewParamsTruncation = "disabled"`

  - `User param.Field[string]`

    Body param: This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
    A stable identifier for your end-users.
    Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `Betas param.Field[[]string]`

    Header param: Optional beta features to enable for this request.

    - `const BetaResponseNewParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseNewParamsOpenAIBeta = "responses_multi_agent=v1"`

### Returns

- `type BetaResponse struct{…}`

  - `ID string`

    Unique identifier for this Response.

  - `CreatedAt float64`

    Unix timestamp (in seconds) of when this Response was created.

  - `Error BetaResponseError`

    An error object returned when the model fails to generate a Response.

    - `Code BetaResponseErrorCode`

      The error code for the response.

      - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

      - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

      - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

      - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

      - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

      - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

      - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

      - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

      - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

      - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

      - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

      - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

      - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

      - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

      - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

      - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

      - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

      - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

      - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

      - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

    - `Message string`

      A human-readable description of the error.

  - `IncompleteDetails BetaResponseIncompleteDetails`

    Details about why the response is incomplete.

    - `Reason string`

      The reason why the response is incomplete.

      - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

      - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

  - `Instructions BetaResponseInstructionsUnion`

    A system (or developer) message inserted into the model's context.

    When using along with `previous_response_id`, the instructions from a previous
    response will not be carried over to the next response. This makes it simple
    to swap out system (or developer) messages in new responses.

    - `string`

    - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

      A list of one or many input items to the model, containing
      different content types.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

        - `Content BetaEasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail BetaResponseInputImageDetail`

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

                - `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`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileDetail`

                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`.

                - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

              - `FileData string`

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

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Role BetaEasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

          - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

          - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

          - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

        - `Phase BetaEasyInputMessagePhase`

          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.

          - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

          - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

        - `Type BetaEasyInputMessageType`

          The type of the message input. Always `message`.

          - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

        - `Content BetaResponseInputMessageContentList`

          A list of one or many input items to the model, containing different content
          types.

        - `Role string`

          The role of the message input. One of `user`, `system`, or `developer`.

          - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

          - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

          - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

        - `Agent BetaResponseInputItemMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

          - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

          - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

      - `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.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `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`.

                  - `const FileCitationFileCitation FileCitation = "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`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the web resource.

              - `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`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []BetaResponseOutputTextLogprob`

              - `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`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          The role of the output message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status BetaResponseOutputMessageStatus`

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

          - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

          - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

          - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Agent BetaResponseOutputMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Phase BetaResponseOutputMessagePhase`

          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.

          - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

          - `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`.

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Agent BetaResponseFileSearchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Results []BetaResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

            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.

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

            The unique ID of the file.

          - `Filename string`

            The name of the file.

          - `Score float64`

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

          - `Text string`

            The text that was retrieved from the file.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

            The type of the pending safety check.

          - `Message string`

            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.

          - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

          - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

          - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

        - `Type BetaResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

        - `Action BetaComputerActionUnion`

          A click action.

          - `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`.

              - `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`.

              - `const ClickClick Click = "click"`

            - `X int64`

              The x-coordinate where the click occurred.

            - `Y int64`

              The y-coordinate where the click occurred.

            - `Keys []string`

              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`.

              - `const DoubleClickDoubleClick DoubleClick = "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`.

              - `const DragDrag Drag = "drag"`

            - `Keys []string`

              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`.

              - `const KeypressKeypress Keypress = "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`.

              - `const MoveMove Move = "move"`

            - `X int64`

              The x-coordinate to move to.

            - `Y int64`

              The y-coordinate to move to.

            - `Keys []string`

              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`.

              - `const ScreenshotScreenshot Screenshot = "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`.

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

              The x-coordinate where the scroll occurred.

            - `Y int64`

              The y-coordinate where the scroll occurred.

            - `Keys []string`

              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`.

              - `const TypeType Type = "type"`

          - `type BetaComputerActionWait struct{…}`

            A wait action.

            - `Type Wait`

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

              - `const WaitWait Wait = "wait"`

        - `Actions BetaComputerActionList`

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

          - `type BetaComputerActionClick struct{…}`

            A click action.

          - `type BetaComputerActionDoubleClick struct{…}`

            A double click action.

          - `type BetaComputerActionDrag struct{…}`

            A drag action.

          - `type BetaComputerActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

          - `type BetaComputerActionMove struct{…}`

            A mouse move action.

          - `type BetaComputerActionScreenshot struct{…}`

            A screenshot action.

          - `type BetaComputerActionScroll struct{…}`

            A scroll action.

          - `type BetaComputerActionType struct{…}`

            An action to type in text.

          - `type BetaComputerActionWait struct{…}`

            A wait action.

        - `Agent BetaResponseComputerToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

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

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          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`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

        - `Type ComputerCallOutput`

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

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

          The ID of the computer tool call output.

        - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseInputItemComputerCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

          - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action BetaResponseFunctionWebSearchActionUnion`

          An object describing the specific action taken in this web search call.
          Includes details on how the model used the web (search, open_page, find_in_page).

          - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

            Action type "search" - Performs a web search query.

            - `Type Search`

              The action type.

              - `const SearchSearch Search = "search"`

            - `Queries []string`

              The search queries.

            - `Query string`

              The search query.

            - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

              The sources used in the search.

              - `Type URL`

                The type of source. Always `url`.

                - `const URLURL URL = "url"`

              - `URL string`

                The URL of the source.

          - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

            Action type "open_page" - Opens a specific URL from search results.

            - `Type OpenPage`

              The action type.

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

              The URL opened by the model.

          - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

            Action type "find_in_page": Searches for a pattern within a loaded page.

            - `Pattern string`

              The pattern or text to search for within the page.

            - `Type FindInPage`

              The action type.

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

              The URL of the page searched for the pattern.

        - `Status BetaResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

          - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

          - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

          - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          The type of the web search tool call. Always `web_search_call`.

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

        - `Agent BetaResponseFunctionWebSearchAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

          The unique ID of the function tool call.

        - `Agent BetaResponseFunctionToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the function to run.

        - `Status BetaResponseFunctionToolCallStatus`

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

          - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

          - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

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

        - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type BetaResponseInputTextContent 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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail BetaResponseInputImageContentDetail`

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

                - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileContentDetail`

                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`.

                - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Type FunctionCallOutput`

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

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

          The unique ID of the function tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemFunctionCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Status string`

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

          - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

        - `Author string`

          The sending agent identity.

        - `Content []BetaResponseInputItemAgentMessageContentUnion`

          Plaintext, image, or encrypted content sent between agents.

          - `type BetaResponseInputTextContent struct{…}`

            A text input to the model.

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The item type. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `ID string`

          The unique ID of this agent message item.

        - `Agent BetaResponseInputItemAgentMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

        - `Action string`

          The multi-agent action that was executed.

          - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

        - `Arguments string`

          The action arguments as a JSON string.

        - `CallID string`

          The unique ID linking this call to its output.

        - `Type MultiAgentCall`

          The item type. Always `multi_agent_call`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `ID string`

          The unique ID of this multi-agent call.

        - `Agent BetaResponseInputItemMultiAgentCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

        - `Action string`

          The multi-agent action that produced this result.

          - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

        - `CallID string`

          The unique ID of the multi-agent call.

        - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

          Text output returned by the multi-agent action.

          - `Text string`

            The text content.

          - `Type OutputText`

            The content type. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

            Citations associated with the text content.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

              - `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 citation type. Always `file_citation`.

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

              - `EndIndex int64`

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

              - `StartIndex int64`

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

              - `Title string`

                The title of the cited resource.

              - `Type URLCitation`

                The citation type. Always `url_citation`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the cited resource.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

              - `ContainerID string`

                The ID of the container.

              - `EndIndex int64`

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

              - `FileID string`

                The ID of the container file.

              - `Filename string`

                The filename of the container file cited.

              - `StartIndex int64`

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

              - `Type ContainerFileCitation`

                The citation type. Always `container_file_citation`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `Type MultiAgentCallOutput`

          The item type. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `ID string`

          The unique ID of this multi-agent call output.

        - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemToolSearchCall struct{…}`

        - `Arguments any`

          The arguments supplied to the tool search call.

        - `Type ToolSearchCall`

          The item type. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `ID string`

          The unique ID of this tool search call.

        - `Agent BetaResponseInputItemToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

          - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

          - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by the tool search output.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `Name string`

              The name of the function to call.

            - `Parameters map[string, any]`

              A JSON schema object describing the parameters of the function.

            - `Strict bool`

              Whether strict parameter validation is enforced for this function tool.

            - `Type Function`

              The type of the function tool. Always `function`.

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

              - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function is deferred and loaded via tool search.

            - `Description string`

              A description of the function. Used by the model to determine whether or not to call the function.

            - `OutputSchema map[string, any]`

              A JSON schema object describing the JSON value encoded in string outputs for this function.

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `Type FileSearch`

              The type of the file search tool. Always `file_search`.

              - `const FileSearchFileSearch FileSearch = "file_search"`

            - `VectorStoreIDs []string`

              The IDs of the vector stores to search.

            - `Filters BetaFileSearchToolFiltersUnion`

              A filter to apply.

              - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                - `Type string`

                  Type of operation: `and` or `or`.

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions BetaFileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                - `EmbeddingWeight float64`

                  The weight of the embedding in the reciprocal ranking fusion.

                - `TextWeight float64`

                  The weight of the text in the reciprocal ranking fusion.

              - `Ranker string`

                The ranker to use for the file search.

                - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

              - `ScoreThreshold float64`

                The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment BetaComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

              - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

              - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

              - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

              - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

            - `Filters BetaWebSearchToolFilters`

              Filters for the search.

              - `AllowedDomains []string`

                Allowed domains for the search. If not provided, all domains are allowed.
                Subdomains of the provided domains are allowed as well.

                Example: `["pubmed.ncbi.nlm.nih.gov"]`

            - `SearchContextSize BetaWebSearchToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

              - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

              - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchToolUserLocation`

              The approximate location of the user.

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `Type string`

                The type of location approximation. Always `approximate`.

                - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `ServerLabel string`

              A label for this MCP server, used to identify it in tool calls.

            - `Type Mcp`

              The type of the MCP tool. Always `mcp`.

              - `const McpMcp Mcp = "mcp"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

              - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools BetaToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `Authorization string`

              An OAuth access token that can be used with a remote MCP server, either
              with a custom MCP server URL or a service connector. Your application
              must handle the OAuth authorization flow and provide the token here.

            - `ConnectorID string`

              Identifier for service connectors, like those available in ChatGPT. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
              about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

              Currently supported `connector_id` values are:

              - Dropbox: `connector_dropbox`
              - Gmail: `connector_gmail`
              - Google Calendar: `connector_googlecalendar`
              - Google Drive: `connector_googledrive`
              - Microsoft Teams: `connector_microsoftteams`
              - Outlook Calendar: `connector_outlookcalendar`
              - Outlook Email: `connector_outlookemail`
              - SharePoint: `connector_sharepoint`

              - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

              - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

              - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

              - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

              - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

              - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

              - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

              - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

            - `DeferLoading bool`

              Whether this MCP tool is deferred and discovered via tool search.

            - `Headers map[string, string]`

              Optional HTTP headers to send to the MCP server. Use for authentication
              or other purposes.

            - `RequireApproval BetaToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                Specify which of the MCP server's tools require approval. Can be
                `always`, `never`, or a filter object associated with tools
                that require approval.

                - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

                - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                Specify a single approval policy for all tools. One of `always` or
                `never`. When set to `always`, all tools will require approval. When
                set to `never`, all tools will not require approval.

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

            - `ServerDescription string`

              Optional description of the MCP server, used to provide more context.

            - `ServerURL string`

              The URL for the MCP server. One of `server_url`, `connector_id`, or
              `tunnel_id` must be provided.

            - `TunnelID string`

              The Secure MCP Tunnel ID to use instead of a direct server URL. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided.

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container BetaToolCodeInterpreterContainerUnion`

              The code interpreter container. Can be a container ID or an object that
              specifies uploaded file IDs to make available to your code, along with an
              optional `memory_limit` setting.

              - `string`

              - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                - `Type Auto`

                  Always `auto`.

                  - `const AutoAuto Auto = "auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      - `Domain string`

                        The domain associated with the secret.

                      - `Name string`

                        The name of the secret to inject for the domain.

                      - `Value string`

                        The secret value to inject for the domain.

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

              - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type BetaToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

            - `Type ImageGeneration`

              The type of the image generation tool. Always `image_generation`.

              - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

            - `Action string`

              Whether to generate a new image or edit an existing image. Default: `auto`.

              - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

              - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

              - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s).
              This parameter is only supported for GPT image models that support
              transparent backgrounds. Must be one of `transparent`, `opaque`, or
              `auto` (default value). When `auto` is used, the model will
              automatically determine the best background for the image.

              `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
              transparent backgrounds. Requests with `background` set to
              `transparent` will return an error for these models; use `opaque` or
              `auto` instead.

              If `transparent`, the output format needs to support transparency,
              so it should be set to either `png` (default value) or `webp`.

              - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

              - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

              - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

              - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

              - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

            - `InputImageMask BetaToolImageGenerationInputImageMask`

              Optional mask for inpainting. Contains `image_url`
              (string, optional) and `file_id` (string, optional).

              - `FileID string`

                File ID for the mask image.

              - `ImageURL string`

                Base64-encoded mask image.

            - `Model string`

              The image generation model to use. Default: `gpt-image-1`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

              - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

              - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

              - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

            - `Quality string`

              The quality of the generated image. One of `low`, `medium`, `high`,
              or `auto`. Default: `auto`.

              - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

              - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

              - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

              - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

            - `Type LocalShell`

              The type of the local shell tool. Always `local_shell`.

              - `const LocalShellLocalShell LocalShell = "local_shell"`

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

            - `Type Shell`

              The type of the shell tool. Always `shell`.

              - `const ShellShell Shell = "shell"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

              - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

            - `Environment BetaFunctionShellToolEnvironmentUnion`

              - `type BetaContainerAuto struct{…}`

                - `Type ContainerAuto`

                  Automatically creates a container for this request

                  - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit BetaContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                  - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                  - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                  - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []BetaContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  - `type BetaSkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                    - `Type SkillReference`

                      References a skill created with the /v1/skills endpoint.

                      - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                    - `Version string`

                      Optional skill version. Use a positive integer or 'latest'. Omit for default.

                  - `type BetaInlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source BetaInlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                      - `MediaType ApplicationZip`

                        The media type of the inline skill payload. Must be `application/zip`.

                        - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                      - `Type Base64`

                        The type of the inline skill source. Must be `base64`.

                        - `const Base64Base64 Base64 = "base64"`

                    - `Type Inline`

                      Defines an inline skill for this request.

                      - `const InlineInline Inline = "inline"`

              - `type BetaLocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []BetaLocalSkill`

                  An optional list of skills.

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Path string`

                    The path to the directory containing the skill.

              - `type BetaContainerReference struct{…}`

                - `ContainerID string`

                  The ID of the referenced container.

                - `Type ContainerReference`

                  References a container created with the /v1/containers endpoint

                  - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Name string`

              The name of the custom tool, used to identify it in tool calls.

            - `Type Custom`

              The type of the custom tool. Always `custom`.

              - `const CustomCustom Custom = "custom"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

              - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this tool should be deferred and discovered via tool search.

            - `Description string`

              Optional description of the custom tool, used to provide more context.

            - `Format BetaCustomToolFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type BetaCustomToolFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type BetaCustomToolFormatGrammar struct{…}`

                A grammar defined by the user.

                - `Definition string`

                  The grammar definition.

                - `Syntax string`

                  The syntax of the grammar definition. One of `lark` or `regex`.

                  - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                  - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

            - `Description string`

              A description of the namespace shown to the model.

            - `Name string`

              The namespace name used in tool calls (for example, `crm`).

            - `Tools []BetaNamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              - `type BetaNamespaceToolToolFunction struct{…}`

                - `Name string`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function should be deferred and discovered via tool search.

                - `Description string`

                - `OutputSchema map[string, any]`

                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                - `Parameters any`

                - `Strict bool`

                  Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

            - `Type ToolSearch`

              The type of the tool. Always `tool_search`.

              - `const ToolSearchToolSearch ToolSearch = "tool_search"`

            - `Description string`

              Description shown to the model for a client-executed tool search tool.

            - `Execution BetaToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

              - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

              - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

              - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

              - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchPreviewToolUserLocation`

              The user's location.

              - `Type Approximate`

                The type of location approximation. Always `approximate`.

                - `const ApproximateApproximate Approximate = "approximate"`

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

            - `Type ApplyPatch`

              The type of the tool. Always `apply_patch`.

              - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

              - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

        - `Type ToolSearchOutput`

          The item type. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `ID string`

          The unique ID of this tool search output.

        - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

          - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []BetaToolUnion`

          A list of additional tools made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The item type. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `ID string`

          The unique ID of this additional tools item.

        - `Agent BetaResponseInputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

        - `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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          The type of the object. Always `reasoning`.

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Agent BetaResponseReasoningItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Content []BetaResponseReasoningItemContent`

          Reasoning text content.

          - `Text string`

            The reasoning text from the model.

          - `Type ReasoningText`

            The type of the reasoning text. Always `reasoning_text`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

          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.

        - `Status BetaResponseReasoningItemStatus`

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

          - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

          - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

          - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

        - `Agent BetaResponseCompactionItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseInputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

          The unique ID of the code interpreter tool call.

        - `Code string`

          The code to run, or null if not available.

        - `ContainerID string`

          The ID of the container used to run the code.

        - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

              The logs output from the code interpreter.

            - `Type Logs`

              The type of the output. Always `logs`.

              - `const LogsLogs Logs = "logs"`

          - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              The type of the output. Always `image`.

              - `const ImageImage Image = "image"`

            - `URL string`

              The URL of the image output from the code interpreter.

        - `Status BetaResponseCodeInterpreterToolCallStatus`

          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

          - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

          - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          The type of the code interpreter tool call. Always `code_interpreter_call`.

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Agent BetaResponseCodeInterpreterToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseInputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action BetaResponseInputItemShellCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

            Ordered shell commands for the execution environment to run.

          - `MaxOutputLength int64`

            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

          - `TimeoutMs int64`

            Maximum wall-clock time in milliseconds to allow the shell commands to run.

        - `CallID string`

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

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type BetaLocalEnvironment struct{…}`

          - `type BetaContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

          - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

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

        - `Output []BetaResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                The exit code returned by the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            Captured stderr output for the shell call.

          - `Stdout string`

            Captured stdout output for the shell call.

        - `Type ShellCallOutput`

          The type of the item. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

          The unique ID of the shell tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `MaxOutputLength int64`

          The maximum number of UTF-8 characters captured for this shell call's combined output.

        - `Status string`

          The status of the shell call output.

          - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

            - `Path string`

              Path of the file to create relative to the workspace root.

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

              Path of the file to delete relative to the workspace root.

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

            - `Path string`

              Path of the file to update relative to the workspace root.

            - `Type UpdateFile`

              The operation type. Always `update_file`.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Output string`

          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseInputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseInputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

          The unique ID of the approval response

        - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseInputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

          - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

          - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

      - `type BetaResponseCustomToolCallOutput struct{…}`

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

        - `CallID string`

          The call ID, used to map this custom tool call output to a custom tool call.

        - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          The type of the custom tool call output. Always `custom_tool_call_output`.

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

          The unique ID of the custom tool call output in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

          An identifier used to map this custom tool call to a tool call output.

        - `Input string`

          The input for the custom tool call generated by the model.

        - `Name string`

          The name of the custom tool being called.

        - `Type CustomToolCall`

          The type of the custom tool call. Always `custom_tool_call`.

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

          The unique ID of the custom tool call in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the custom tool being called.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

        - `Type CompactionTrigger`

          The type of the item. Always `compaction_trigger`.

          - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

        - `Agent BetaResponseInputItemCompactionTriggerAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Agent BetaResponseInputItemItemReferenceAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

      - `type BetaResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseInputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output.

          - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

          - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseInputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

  - `Metadata map[string, string]`

    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.

  - `Model BetaResponseModel`

    Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
    offers a wide range of models with different capabilities, performance
    characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
    to browse and compare available models.

    - `type BetaResponseModel string`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

      - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

      - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

      - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

      - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

      - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

      - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

      - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

      - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

      - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

      - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

      - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

      - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

      - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

      - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

      - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

      - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

      - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

      - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

      - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

      - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

      - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

      - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

      - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

      - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

      - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

      - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

      - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

      - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

      - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

      - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

      - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

      - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

      - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

      - `const BetaResponseModelO3 BetaResponseModel = "o3"`

      - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

      - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

      - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

      - `const BetaResponseModelO1 BetaResponseModel = "o1"`

      - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

      - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

      - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

      - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

      - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

      - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

      - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

      - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

      - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

      - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

      - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

      - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

      - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

      - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

      - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

      - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

      - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

      - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

      - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

      - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

      - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

      - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

      - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

      - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

      - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

      - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

      - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

      - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

      - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

      - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

      - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

      - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

      - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

      - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

      - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

      - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

      - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

      - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

      - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

      - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

      - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

      - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

      - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

      - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

      - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

      - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

      - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

      - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

      - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

      - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

      - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

      - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

      - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

      - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

    - `string`

  - `Object Response`

    The object type of this resource - always set to `response`.

    - `const ResponseResponse Response = "response"`

  - `Output []BetaResponseOutputItemUnion`

    An array of content items generated by the model.

    - The length and order of items in the `output` array is dependent
      on the model's response.
    - Rather than accessing the first item in the `output` array and
      assuming it's an `assistant` message with the content generated by
      the model, you might consider using the `output_text` property where
      supported in SDKs.

    - `type BetaResponseOutputMessage struct{…}`

      An output message from the model.

    - `type BetaResponseFileSearchToolCall struct{…}`

      The results of a file search tool call. See the
      [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

    - `type BetaResponseFunctionToolCallOutputItem struct{…}`

      - `ID string`

        The unique ID of the function call tool output.

      - `CallID string`

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

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

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

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

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

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

    - `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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        A computer screenshot image used with the computer use tool.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

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

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

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

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

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

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

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

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

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

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `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.

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

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

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `ParallelToolCalls bool`

    Whether to allow the model to run tool calls in parallel.

  - `Temperature float64`

    What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
    We generally recommend altering this or `top_p` but not both.

  - `ToolChoice BetaResponseToolChoiceUnion`

    How the model should select which tool (or tools) to use when generating
    a response. See the `tools` parameter to see how to specify which tools
    the model can call.

    - `type BetaToolChoiceOptions string`

      Controls which (if any) tool is called by the model.

      `none` means the model will not call any tool and instead generates a message.

      `auto` means the model can pick between generating a message or calling one or
      more tools.

      `required` means the model must call one or more tools.

      - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

      - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

      - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

    - `type BetaToolChoiceAllowed struct{…}`

      Constrains the tools available to the model to a pre-defined set.

      - `Mode BetaToolChoiceAllowedMode`

        Constrains the tools available to the model to a pre-defined set.

        `auto` allows the model to pick from among the allowed tools and generate a
        message.

        `required` requires the model to call one or more of the allowed tools.

        - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

        - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

      - `Tools []map[string, any]`

        A list of tool definitions that the model should be allowed to call.

        For the Responses API, the list of tool definitions might look like:

        ```json
        [
          { "type": "function", "name": "get_weather" },
          { "type": "mcp", "server_label": "deepwiki" },
          { "type": "image_generation" }
        ]
        ```

      - `Type AllowedTools`

        Allowed tool configuration type. Always `allowed_tools`.

        - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

    - `type BetaToolChoiceTypes struct{…}`

      Indicates that the model should use a built-in tool to generate a response.
      [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

      - `Type BetaToolChoiceTypesType`

        The type of hosted tool the model should to use. Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).

        Allowed values are:

        - `file_search`
        - `web_search_preview`
        - `computer`
        - `computer_use_preview`
        - `computer_use`
        - `code_interpreter`
        - `image_generation`

        - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

        - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

        - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

        - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

        - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

        - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

    - `type BetaToolChoiceFunction struct{…}`

      Use this option to force the model to call a specific function.

      - `Name string`

        The name of the function to call.

      - `Type Function`

        For function calling, the type is always `function`.

        - `const FunctionFunction Function = "function"`

    - `type BetaToolChoiceMcp struct{…}`

      Use this option to force the model to call a specific tool on a remote MCP server.

      - `ServerLabel string`

        The label of the MCP server to use.

      - `Type Mcp`

        For MCP tools, the type is always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `Name string`

        The name of the tool to call on the server.

    - `type BetaToolChoiceCustom struct{…}`

      Use this option to force the model to call a specific custom tool.

      - `Name string`

        The name of the custom tool to call.

      - `Type Custom`

        For custom tool calling, the type is always `custom`.

        - `const CustomCustom Custom = "custom"`

    - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

      - `Type ProgrammaticToolCalling`

        The tool to call. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolChoiceApplyPatch struct{…}`

      Forces the model to call the apply_patch tool when executing a tool call.

      - `Type ApplyPatch`

        The tool to call. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `type BetaToolChoiceShell struct{…}`

      Forces the model to call the shell tool when a tool call is required.

      - `Type Shell`

        The tool to call. Always `shell`.

        - `const ShellShell Shell = "shell"`

  - `Tools []BetaToolUnion`

    An array of tools the model may call while generating a response. You
    can specify which tool to use by setting the `tool_choice` parameter.

    We support the following categories of tools:

    - **Built-in tools**: Tools that are provided by OpenAI that extend the
      model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
      or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
      [built-in tools](https://platform.openai.com/docs/guides/tools).
    - **MCP Tools**: Integrations with third-party systems via custom MCP servers
      or predefined connectors such as Google Drive and SharePoint. Learn more about
      [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
    - **Function calls (custom tools)**: Functions that are defined by you,
      enabling the model to call your own code with strongly typed arguments
      and outputs. Learn more about
      [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
      custom tools to call your own code.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

    - `type BetaToolProgrammaticToolCalling struct{…}`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

  - `TopP float64`

    An alternative to sampling with temperature, called nucleus sampling,
    where the model considers the results of the tokens with top_p probability
    mass. So 0.1 means only the tokens comprising the top 10% probability mass
    are considered.

    We generally recommend altering this or `temperature` but not both.

  - `Background bool`

    Whether to run the model response in the background.
    [Learn more](https://platform.openai.com/docs/guides/background).

  - `CompletedAt float64`

    Unix timestamp (in seconds) of when this Response was completed.
    Only present when the status is `completed`.

  - `Conversation BetaResponseConversation`

    The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

    - `ID string`

      The unique ID of the conversation that this response was associated with.

  - `MaxOutputTokens int64`

    An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

  - `MaxToolCalls int64`

    The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

  - `Moderation BetaResponseModeration`

    Moderation results for the response input and output, if moderated completions were requested.

    - `Input BetaResponseModerationInputUnion`

      Moderation for the response input.

      - `type BetaResponseModerationInputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationInputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

    - `Output BetaResponseModerationOutputUnion`

      Moderation for the response output.

      - `type BetaResponseModerationOutputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationOutputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

  - `PreviousResponseID string`

    The unique ID of the previous response to the model. Use this to
    create multi-turn conversations. Learn more about
    [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

  - `Prompt BetaResponsePrompt`

    Reference to a prompt template and its variables.
    [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

    - `ID string`

      The unique identifier of the prompt template to use.

    - `Variables map[string, BetaResponsePromptVariableUnion]`

      Optional map of values to substitute in for variables in your
      prompt. The substitution values can either be strings, or other
      Response input types like images or files.

      - `string`

      - `type BetaResponseInputText struct{…}`

        A text input to the model.

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

    - `Version string`

      Optional version of the prompt template.

  - `PromptCacheKey string`

    Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

  - `PromptCacheOptions BetaResponsePromptCacheOptions`

    The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

    - `Mode string`

      Whether implicit prompt-cache breakpoints were enabled.

      - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

      - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

    - `Ttl string`

      The minimum lifetime applied to each cache breakpoint.

      - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

  - `PromptCacheRetention BetaResponsePromptCacheRetention`

    Deprecated. Use `prompt_cache_options.ttl` instead.

    The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
    This field expresses a maximum retention policy, while
    `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
    fields are independent and do not interact.
    For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

    For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

    - Organizations without ZDR enabled default to `24h`.
    - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

    - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

    - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

  - `Reasoning BetaResponseReasoning`

    **gpt-5 and o-series models only**

    Configuration options for
    [reasoning models](https://platform.openai.com/docs/guides/reasoning).

    - `Context string`

      Controls which reasoning items are rendered back to the model on later turns.
      If omitted or set to `auto`, the model determines the context mode. The
      `gpt-5.6` model family defaults to `all_turns`; earlier models default to
      `current_turn`.

      When returned on a response, this is the effective reasoning context mode
      used for the response.

      - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

      - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

      - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

    - `Effort string`

      Constrains effort on reasoning for reasoning models. Currently supported
      values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
      Reducing reasoning effort can result in faster responses and fewer tokens
      used on reasoning in a response. Not all reasoning models support every
      value. See the
      [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
      for model-specific support.

      - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

      - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

      - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

      - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

      - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

      - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

      - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

    - `GenerateSummary string`

      **Deprecated:** use `summary` instead.

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

      - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

      - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

    - `Mode string`

      Controls the reasoning execution mode for the request.

      When returned on a response, this is the effective execution mode.

      - `string`

      - `string`

        - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

        - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

    - `Summary string`

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

      - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

      - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

      - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

  - `SafetyIdentifier string`

    A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
    The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `ServiceTier BetaResponseServiceTier`

    Specifies the processing type used for serving the request.

    - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
    - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
    - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
    - When not set, the default behavior is 'auto'.

    When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

    - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

    - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

    - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

    - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

    - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

  - `Status BetaResponseStatus`

    The status of the response generation. One of `completed`, `failed`,
    `in_progress`, `cancelled`, `queued`, or `incomplete`.

    - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

    - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

    - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

    - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

    - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

    - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

  - `Text BetaResponseTextConfig`

    Configuration options for a text response from the model. Can be plain
    text or structured JSON data. Learn more:

    - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
    - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

    - `Format BetaResponseFormatTextConfigUnion`

      An object specifying the format that the model must output.

      Configuring `{ "type": "json_schema" }` enables Structured Outputs,
      which ensures the model will match your supplied JSON schema. Learn more in the
      [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

      The default format is `{ "type": "text" }` with no additional options.

      **Not recommended for gpt-4o and newer models:**

      Setting to `{ "type": "json_object" }` enables the older JSON mode, which
      ensures the message the model generates is valid JSON. Using `json_schema`
      is preferred for models that support it.

      - `type BetaResponseFormatTextConfigText struct{…}`

        Default response format. Used to generate text responses.

        - `Type Text`

          The type of response format being defined. Always `text`.

          - `const TextText Text = "text"`

      - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

        JSON Schema response format. Used to generate structured JSON responses.
        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

        - `Name string`

          The name of the response format. Must be a-z, A-Z, 0-9, or contain
          underscores and dashes, with a maximum length of 64.

        - `Schema map[string, any]`

          The schema for the response format, described as a JSON Schema object.
          Learn how to build JSON schemas [here](https://json-schema.org/).

        - `Type JSONSchema`

          The type of response format being defined. Always `json_schema`.

          - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

        - `Description string`

          A description of what the response format is for, used by the model to
          determine how to respond in the format.

        - `Strict bool`

          Whether to enable strict schema adherence when generating the output.
          If set to true, the model will always follow the exact schema defined
          in the `schema` field. Only a subset of JSON Schema is supported when
          `strict` is `true`. To learn more, read the [Structured Outputs
          guide](https://platform.openai.com/docs/guides/structured-outputs).

      - `type BetaResponseFormatTextConfigJSONObject struct{…}`

        JSON object response format. An older method of generating JSON responses.
        Using `json_schema` is recommended for models that support it. Note that the
        model will not generate JSON without a system or user message instructing it
        to do so.

        - `Type JSONObject`

          The type of response format being defined. Always `json_object`.

          - `const JSONObjectJSONObject JSONObject = "json_object"`

    - `Verbosity BetaResponseTextConfigVerbosity`

      Constrains the verbosity of the model's response. Lower values will result in
      more concise responses, while higher values will result in more verbose responses.
      Currently supported values are `low`, `medium`, and `high`. The default is
      `medium`.

      - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

      - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

      - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

  - `TopLogprobs int64`

    An integer between 0 and 20 specifying the maximum number of most likely
    tokens to return at each token position, each with an associated log
    probability. In some cases, the number of returned tokens may be fewer than
    requested.

  - `Truncation BetaResponseTruncation`

    The truncation strategy to use for the model response.

    - `auto`: If the input to this Response exceeds
      the model's context window size, the model will truncate the
      response to fit the context window by dropping items from the beginning of the conversation.
    - `disabled` (default): If the input size will exceed the context window
      size for a model, the request will fail with a 400 error.

    - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

    - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

  - `Usage BetaResponseUsage`

    Represents token usage details including input tokens, output tokens,
    a breakdown of output tokens, and the total tokens used.

    - `InputTokens int64`

      The number of input tokens.

    - `InputTokensDetails BetaResponseUsageInputTokensDetails`

      A detailed breakdown of the input tokens.

      - `CacheWriteTokens int64`

        The number of input tokens that were written to the cache.

      - `CachedTokens int64`

        The number of tokens that were retrieved from the cache.
        [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

    - `OutputTokens int64`

      The number of output tokens.

    - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

      A detailed breakdown of the output tokens.

      - `ReasoningTokens int64`

        The number of reasoning tokens.

    - `TotalTokens int64`

      The total number of tokens used.

  - `User string`

    This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
    A stable identifier for your end-users.
    Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  betaResponse, err := client.Beta.Responses.New(context.TODO(), openai.BetaResponseNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", betaResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "created_at": 0,
  "error": {
    "code": "server_error",
    "message": "message"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "instructions": "string",
  "metadata": {
    "foo": "string"
  },
  "model": "gpt-5.1",
  "object": "response",
  "output": [
    {
      "id": "id",
      "content": [
        {
          "annotations": [
            {
              "file_id": "file_id",
              "filename": "filename",
              "index": 0,
              "type": "file_citation"
            }
          ],
          "text": "text",
          "type": "output_text",
          "logprobs": [
            {
              "token": "token",
              "bytes": [
                0
              ],
              "logprob": 0,
              "top_logprobs": [
                {
                  "token": "token",
                  "bytes": [
                    0
                  ],
                  "logprob": 0
                }
              ]
            }
          ]
        }
      ],
      "role": "assistant",
      "status": "in_progress",
      "type": "message",
      "agent": {
        "agent_name": "agent_name"
      },
      "phase": "commentary"
    }
  ],
  "parallel_tool_calls": true,
  "temperature": 1,
  "tool_choice": "none",
  "tools": [
    {
      "name": "name",
      "parameters": {
        "foo": "bar"
      },
      "strict": true,
      "type": "function",
      "allowed_callers": [
        "direct"
      ],
      "defer_loading": true,
      "description": "description",
      "output_schema": {
        "foo": "bar"
      }
    }
  ],
  "top_p": 1,
  "background": true,
  "completed_at": 0,
  "conversation": {
    "id": "id"
  },
  "max_output_tokens": 0,
  "max_tool_calls": 0,
  "moderation": {
    "input": {
      "categories": {
        "foo": true
      },
      "category_applied_input_types": {
        "foo": [
          "text"
        ]
      },
      "category_scores": {
        "foo": 0
      },
      "flagged": true,
      "model": "model",
      "type": "moderation_result"
    },
    "output": {
      "categories": {
        "foo": true
      },
      "category_applied_input_types": {
        "foo": [
          "text"
        ]
      },
      "category_scores": {
        "foo": 0
      },
      "flagged": true,
      "model": "model",
      "type": "moderation_result"
    }
  },
  "output_text": "output_text",
  "previous_response_id": "previous_response_id",
  "prompt": {
    "id": "id",
    "variables": {
      "foo": "string"
    },
    "version": "version"
  },
  "prompt_cache_key": "prompt-cache-key-1234",
  "prompt_cache_options": {
    "mode": "implicit",
    "ttl": "30m"
  },
  "prompt_cache_retention": "in_memory",
  "reasoning": {
    "context": "auto",
    "effort": "none",
    "generate_summary": "auto",
    "mode": "standard",
    "summary": "auto"
  },
  "safety_identifier": "safety-identifier-1234",
  "service_tier": "auto",
  "status": "completed",
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "top_logprobs": 0,
  "truncation": "auto",
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  },
  "user": "user-1234"
}
```

## Get a model response

`client.Beta.Responses.Get(ctx, responseID, params) (*BetaResponse, error)`

**get** `/responses/{response_id}?beta=true`

Retrieves a model response with the given ID.

### Parameters

- `responseID string`

- `params BetaResponseGetParams`

  - `Include param.Field[[]BetaResponseIncludable]`

    Query param: Additional fields to include in the response. See the `include`
    parameter for Response creation above for more information.

    - `const BetaResponseIncludableFileSearchCallResults BetaResponseIncludable = "file_search_call.results"`

    - `const BetaResponseIncludableWebSearchCallResults BetaResponseIncludable = "web_search_call.results"`

    - `const BetaResponseIncludableWebSearchCallActionSources BetaResponseIncludable = "web_search_call.action.sources"`

    - `const BetaResponseIncludableMessageInputImageImageURL BetaResponseIncludable = "message.input_image.image_url"`

    - `const BetaResponseIncludableComputerCallOutputOutputImageURL BetaResponseIncludable = "computer_call_output.output.image_url"`

    - `const BetaResponseIncludableCodeInterpreterCallOutputs BetaResponseIncludable = "code_interpreter_call.outputs"`

    - `const BetaResponseIncludableReasoningEncryptedContent BetaResponseIncludable = "reasoning.encrypted_content"`

    - `const BetaResponseIncludableMessageOutputTextLogprobs BetaResponseIncludable = "message.output_text.logprobs"`

  - `IncludeObfuscation param.Field[bool]`

    Query param: When true, stream obfuscation will be enabled. Stream obfuscation adds
    random characters to an `obfuscation` field on streaming delta events
    to normalize payload sizes as a mitigation to certain side-channel
    attacks. These obfuscation fields are included by default, but add a
    small amount of overhead to the data stream. You can set
    `include_obfuscation` to false to optimize for bandwidth if you trust
    the network links between your application and the OpenAI API.

  - `StartingAfter param.Field[int64]`

    Query param: The sequence number of the event after which to start streaming.

  - ``

  - `Betas param.Field[[]string]`

    Header param: Optional beta features to enable for this request.

    - `const BetaResponseGetParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseGetParamsOpenAIBeta = "responses_multi_agent=v1"`

### Returns

- `type BetaResponse struct{…}`

  - `ID string`

    Unique identifier for this Response.

  - `CreatedAt float64`

    Unix timestamp (in seconds) of when this Response was created.

  - `Error BetaResponseError`

    An error object returned when the model fails to generate a Response.

    - `Code BetaResponseErrorCode`

      The error code for the response.

      - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

      - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

      - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

      - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

      - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

      - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

      - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

      - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

      - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

      - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

      - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

      - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

      - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

      - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

      - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

      - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

      - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

      - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

      - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

      - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

    - `Message string`

      A human-readable description of the error.

  - `IncompleteDetails BetaResponseIncompleteDetails`

    Details about why the response is incomplete.

    - `Reason string`

      The reason why the response is incomplete.

      - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

      - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

  - `Instructions BetaResponseInstructionsUnion`

    A system (or developer) message inserted into the model's context.

    When using along with `previous_response_id`, the instructions from a previous
    response will not be carried over to the next response. This makes it simple
    to swap out system (or developer) messages in new responses.

    - `string`

    - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

      A list of one or many input items to the model, containing
      different content types.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

        - `Content BetaEasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail BetaResponseInputImageDetail`

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

                - `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`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileDetail`

                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`.

                - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

              - `FileData string`

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

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Role BetaEasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

          - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

          - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

          - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

        - `Phase BetaEasyInputMessagePhase`

          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.

          - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

          - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

        - `Type BetaEasyInputMessageType`

          The type of the message input. Always `message`.

          - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

        - `Content BetaResponseInputMessageContentList`

          A list of one or many input items to the model, containing different content
          types.

        - `Role string`

          The role of the message input. One of `user`, `system`, or `developer`.

          - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

          - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

          - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

        - `Agent BetaResponseInputItemMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

          - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

          - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

      - `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.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `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`.

                  - `const FileCitationFileCitation FileCitation = "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`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the web resource.

              - `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`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []BetaResponseOutputTextLogprob`

              - `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`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          The role of the output message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status BetaResponseOutputMessageStatus`

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

          - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

          - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

          - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Agent BetaResponseOutputMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Phase BetaResponseOutputMessagePhase`

          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.

          - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

          - `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`.

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Agent BetaResponseFileSearchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Results []BetaResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

            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.

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

            The unique ID of the file.

          - `Filename string`

            The name of the file.

          - `Score float64`

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

          - `Text string`

            The text that was retrieved from the file.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

            The type of the pending safety check.

          - `Message string`

            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.

          - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

          - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

          - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

        - `Type BetaResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

        - `Action BetaComputerActionUnion`

          A click action.

          - `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`.

              - `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`.

              - `const ClickClick Click = "click"`

            - `X int64`

              The x-coordinate where the click occurred.

            - `Y int64`

              The y-coordinate where the click occurred.

            - `Keys []string`

              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`.

              - `const DoubleClickDoubleClick DoubleClick = "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`.

              - `const DragDrag Drag = "drag"`

            - `Keys []string`

              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`.

              - `const KeypressKeypress Keypress = "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`.

              - `const MoveMove Move = "move"`

            - `X int64`

              The x-coordinate to move to.

            - `Y int64`

              The y-coordinate to move to.

            - `Keys []string`

              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`.

              - `const ScreenshotScreenshot Screenshot = "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`.

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

              The x-coordinate where the scroll occurred.

            - `Y int64`

              The y-coordinate where the scroll occurred.

            - `Keys []string`

              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`.

              - `const TypeType Type = "type"`

          - `type BetaComputerActionWait struct{…}`

            A wait action.

            - `Type Wait`

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

              - `const WaitWait Wait = "wait"`

        - `Actions BetaComputerActionList`

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

          - `type BetaComputerActionClick struct{…}`

            A click action.

          - `type BetaComputerActionDoubleClick struct{…}`

            A double click action.

          - `type BetaComputerActionDrag struct{…}`

            A drag action.

          - `type BetaComputerActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

          - `type BetaComputerActionMove struct{…}`

            A mouse move action.

          - `type BetaComputerActionScreenshot struct{…}`

            A screenshot action.

          - `type BetaComputerActionScroll struct{…}`

            A scroll action.

          - `type BetaComputerActionType struct{…}`

            An action to type in text.

          - `type BetaComputerActionWait struct{…}`

            A wait action.

        - `Agent BetaResponseComputerToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

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

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          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`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

        - `Type ComputerCallOutput`

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

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

          The ID of the computer tool call output.

        - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseInputItemComputerCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

          - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action BetaResponseFunctionWebSearchActionUnion`

          An object describing the specific action taken in this web search call.
          Includes details on how the model used the web (search, open_page, find_in_page).

          - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

            Action type "search" - Performs a web search query.

            - `Type Search`

              The action type.

              - `const SearchSearch Search = "search"`

            - `Queries []string`

              The search queries.

            - `Query string`

              The search query.

            - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

              The sources used in the search.

              - `Type URL`

                The type of source. Always `url`.

                - `const URLURL URL = "url"`

              - `URL string`

                The URL of the source.

          - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

            Action type "open_page" - Opens a specific URL from search results.

            - `Type OpenPage`

              The action type.

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

              The URL opened by the model.

          - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

            Action type "find_in_page": Searches for a pattern within a loaded page.

            - `Pattern string`

              The pattern or text to search for within the page.

            - `Type FindInPage`

              The action type.

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

              The URL of the page searched for the pattern.

        - `Status BetaResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

          - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

          - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

          - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          The type of the web search tool call. Always `web_search_call`.

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

        - `Agent BetaResponseFunctionWebSearchAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

          The unique ID of the function tool call.

        - `Agent BetaResponseFunctionToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the function to run.

        - `Status BetaResponseFunctionToolCallStatus`

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

          - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

          - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

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

        - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type BetaResponseInputTextContent 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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail BetaResponseInputImageContentDetail`

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

                - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileContentDetail`

                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`.

                - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Type FunctionCallOutput`

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

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

          The unique ID of the function tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemFunctionCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Status string`

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

          - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

        - `Author string`

          The sending agent identity.

        - `Content []BetaResponseInputItemAgentMessageContentUnion`

          Plaintext, image, or encrypted content sent between agents.

          - `type BetaResponseInputTextContent struct{…}`

            A text input to the model.

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The item type. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `ID string`

          The unique ID of this agent message item.

        - `Agent BetaResponseInputItemAgentMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

        - `Action string`

          The multi-agent action that was executed.

          - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

        - `Arguments string`

          The action arguments as a JSON string.

        - `CallID string`

          The unique ID linking this call to its output.

        - `Type MultiAgentCall`

          The item type. Always `multi_agent_call`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `ID string`

          The unique ID of this multi-agent call.

        - `Agent BetaResponseInputItemMultiAgentCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

        - `Action string`

          The multi-agent action that produced this result.

          - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

        - `CallID string`

          The unique ID of the multi-agent call.

        - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

          Text output returned by the multi-agent action.

          - `Text string`

            The text content.

          - `Type OutputText`

            The content type. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

            Citations associated with the text content.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

              - `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 citation type. Always `file_citation`.

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

              - `EndIndex int64`

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

              - `StartIndex int64`

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

              - `Title string`

                The title of the cited resource.

              - `Type URLCitation`

                The citation type. Always `url_citation`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the cited resource.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

              - `ContainerID string`

                The ID of the container.

              - `EndIndex int64`

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

              - `FileID string`

                The ID of the container file.

              - `Filename string`

                The filename of the container file cited.

              - `StartIndex int64`

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

              - `Type ContainerFileCitation`

                The citation type. Always `container_file_citation`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `Type MultiAgentCallOutput`

          The item type. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `ID string`

          The unique ID of this multi-agent call output.

        - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemToolSearchCall struct{…}`

        - `Arguments any`

          The arguments supplied to the tool search call.

        - `Type ToolSearchCall`

          The item type. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `ID string`

          The unique ID of this tool search call.

        - `Agent BetaResponseInputItemToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

          - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

          - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by the tool search output.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `Name string`

              The name of the function to call.

            - `Parameters map[string, any]`

              A JSON schema object describing the parameters of the function.

            - `Strict bool`

              Whether strict parameter validation is enforced for this function tool.

            - `Type Function`

              The type of the function tool. Always `function`.

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

              - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function is deferred and loaded via tool search.

            - `Description string`

              A description of the function. Used by the model to determine whether or not to call the function.

            - `OutputSchema map[string, any]`

              A JSON schema object describing the JSON value encoded in string outputs for this function.

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `Type FileSearch`

              The type of the file search tool. Always `file_search`.

              - `const FileSearchFileSearch FileSearch = "file_search"`

            - `VectorStoreIDs []string`

              The IDs of the vector stores to search.

            - `Filters BetaFileSearchToolFiltersUnion`

              A filter to apply.

              - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                - `Type string`

                  Type of operation: `and` or `or`.

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions BetaFileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                - `EmbeddingWeight float64`

                  The weight of the embedding in the reciprocal ranking fusion.

                - `TextWeight float64`

                  The weight of the text in the reciprocal ranking fusion.

              - `Ranker string`

                The ranker to use for the file search.

                - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

              - `ScoreThreshold float64`

                The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment BetaComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

              - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

              - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

              - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

              - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

            - `Filters BetaWebSearchToolFilters`

              Filters for the search.

              - `AllowedDomains []string`

                Allowed domains for the search. If not provided, all domains are allowed.
                Subdomains of the provided domains are allowed as well.

                Example: `["pubmed.ncbi.nlm.nih.gov"]`

            - `SearchContextSize BetaWebSearchToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

              - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

              - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchToolUserLocation`

              The approximate location of the user.

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `Type string`

                The type of location approximation. Always `approximate`.

                - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `ServerLabel string`

              A label for this MCP server, used to identify it in tool calls.

            - `Type Mcp`

              The type of the MCP tool. Always `mcp`.

              - `const McpMcp Mcp = "mcp"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

              - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools BetaToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `Authorization string`

              An OAuth access token that can be used with a remote MCP server, either
              with a custom MCP server URL or a service connector. Your application
              must handle the OAuth authorization flow and provide the token here.

            - `ConnectorID string`

              Identifier for service connectors, like those available in ChatGPT. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
              about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

              Currently supported `connector_id` values are:

              - Dropbox: `connector_dropbox`
              - Gmail: `connector_gmail`
              - Google Calendar: `connector_googlecalendar`
              - Google Drive: `connector_googledrive`
              - Microsoft Teams: `connector_microsoftteams`
              - Outlook Calendar: `connector_outlookcalendar`
              - Outlook Email: `connector_outlookemail`
              - SharePoint: `connector_sharepoint`

              - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

              - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

              - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

              - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

              - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

              - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

              - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

              - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

            - `DeferLoading bool`

              Whether this MCP tool is deferred and discovered via tool search.

            - `Headers map[string, string]`

              Optional HTTP headers to send to the MCP server. Use for authentication
              or other purposes.

            - `RequireApproval BetaToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                Specify which of the MCP server's tools require approval. Can be
                `always`, `never`, or a filter object associated with tools
                that require approval.

                - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

                - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                Specify a single approval policy for all tools. One of `always` or
                `never`. When set to `always`, all tools will require approval. When
                set to `never`, all tools will not require approval.

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

            - `ServerDescription string`

              Optional description of the MCP server, used to provide more context.

            - `ServerURL string`

              The URL for the MCP server. One of `server_url`, `connector_id`, or
              `tunnel_id` must be provided.

            - `TunnelID string`

              The Secure MCP Tunnel ID to use instead of a direct server URL. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided.

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container BetaToolCodeInterpreterContainerUnion`

              The code interpreter container. Can be a container ID or an object that
              specifies uploaded file IDs to make available to your code, along with an
              optional `memory_limit` setting.

              - `string`

              - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                - `Type Auto`

                  Always `auto`.

                  - `const AutoAuto Auto = "auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      - `Domain string`

                        The domain associated with the secret.

                      - `Name string`

                        The name of the secret to inject for the domain.

                      - `Value string`

                        The secret value to inject for the domain.

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

              - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type BetaToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

            - `Type ImageGeneration`

              The type of the image generation tool. Always `image_generation`.

              - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

            - `Action string`

              Whether to generate a new image or edit an existing image. Default: `auto`.

              - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

              - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

              - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s).
              This parameter is only supported for GPT image models that support
              transparent backgrounds. Must be one of `transparent`, `opaque`, or
              `auto` (default value). When `auto` is used, the model will
              automatically determine the best background for the image.

              `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
              transparent backgrounds. Requests with `background` set to
              `transparent` will return an error for these models; use `opaque` or
              `auto` instead.

              If `transparent`, the output format needs to support transparency,
              so it should be set to either `png` (default value) or `webp`.

              - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

              - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

              - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

              - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

              - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

            - `InputImageMask BetaToolImageGenerationInputImageMask`

              Optional mask for inpainting. Contains `image_url`
              (string, optional) and `file_id` (string, optional).

              - `FileID string`

                File ID for the mask image.

              - `ImageURL string`

                Base64-encoded mask image.

            - `Model string`

              The image generation model to use. Default: `gpt-image-1`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

              - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

              - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

              - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

            - `Quality string`

              The quality of the generated image. One of `low`, `medium`, `high`,
              or `auto`. Default: `auto`.

              - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

              - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

              - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

              - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

            - `Type LocalShell`

              The type of the local shell tool. Always `local_shell`.

              - `const LocalShellLocalShell LocalShell = "local_shell"`

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

            - `Type Shell`

              The type of the shell tool. Always `shell`.

              - `const ShellShell Shell = "shell"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

              - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

            - `Environment BetaFunctionShellToolEnvironmentUnion`

              - `type BetaContainerAuto struct{…}`

                - `Type ContainerAuto`

                  Automatically creates a container for this request

                  - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit BetaContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                  - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                  - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                  - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []BetaContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  - `type BetaSkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                    - `Type SkillReference`

                      References a skill created with the /v1/skills endpoint.

                      - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                    - `Version string`

                      Optional skill version. Use a positive integer or 'latest'. Omit for default.

                  - `type BetaInlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source BetaInlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                      - `MediaType ApplicationZip`

                        The media type of the inline skill payload. Must be `application/zip`.

                        - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                      - `Type Base64`

                        The type of the inline skill source. Must be `base64`.

                        - `const Base64Base64 Base64 = "base64"`

                    - `Type Inline`

                      Defines an inline skill for this request.

                      - `const InlineInline Inline = "inline"`

              - `type BetaLocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []BetaLocalSkill`

                  An optional list of skills.

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Path string`

                    The path to the directory containing the skill.

              - `type BetaContainerReference struct{…}`

                - `ContainerID string`

                  The ID of the referenced container.

                - `Type ContainerReference`

                  References a container created with the /v1/containers endpoint

                  - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Name string`

              The name of the custom tool, used to identify it in tool calls.

            - `Type Custom`

              The type of the custom tool. Always `custom`.

              - `const CustomCustom Custom = "custom"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

              - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this tool should be deferred and discovered via tool search.

            - `Description string`

              Optional description of the custom tool, used to provide more context.

            - `Format BetaCustomToolFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type BetaCustomToolFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type BetaCustomToolFormatGrammar struct{…}`

                A grammar defined by the user.

                - `Definition string`

                  The grammar definition.

                - `Syntax string`

                  The syntax of the grammar definition. One of `lark` or `regex`.

                  - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                  - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

            - `Description string`

              A description of the namespace shown to the model.

            - `Name string`

              The namespace name used in tool calls (for example, `crm`).

            - `Tools []BetaNamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              - `type BetaNamespaceToolToolFunction struct{…}`

                - `Name string`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function should be deferred and discovered via tool search.

                - `Description string`

                - `OutputSchema map[string, any]`

                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                - `Parameters any`

                - `Strict bool`

                  Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

            - `Type ToolSearch`

              The type of the tool. Always `tool_search`.

              - `const ToolSearchToolSearch ToolSearch = "tool_search"`

            - `Description string`

              Description shown to the model for a client-executed tool search tool.

            - `Execution BetaToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

              - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

              - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

              - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

              - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchPreviewToolUserLocation`

              The user's location.

              - `Type Approximate`

                The type of location approximation. Always `approximate`.

                - `const ApproximateApproximate Approximate = "approximate"`

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

            - `Type ApplyPatch`

              The type of the tool. Always `apply_patch`.

              - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

              - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

        - `Type ToolSearchOutput`

          The item type. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `ID string`

          The unique ID of this tool search output.

        - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

          - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []BetaToolUnion`

          A list of additional tools made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The item type. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `ID string`

          The unique ID of this additional tools item.

        - `Agent BetaResponseInputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

        - `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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          The type of the object. Always `reasoning`.

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Agent BetaResponseReasoningItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Content []BetaResponseReasoningItemContent`

          Reasoning text content.

          - `Text string`

            The reasoning text from the model.

          - `Type ReasoningText`

            The type of the reasoning text. Always `reasoning_text`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

          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.

        - `Status BetaResponseReasoningItemStatus`

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

          - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

          - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

          - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

        - `Agent BetaResponseCompactionItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseInputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

          The unique ID of the code interpreter tool call.

        - `Code string`

          The code to run, or null if not available.

        - `ContainerID string`

          The ID of the container used to run the code.

        - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

              The logs output from the code interpreter.

            - `Type Logs`

              The type of the output. Always `logs`.

              - `const LogsLogs Logs = "logs"`

          - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              The type of the output. Always `image`.

              - `const ImageImage Image = "image"`

            - `URL string`

              The URL of the image output from the code interpreter.

        - `Status BetaResponseCodeInterpreterToolCallStatus`

          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

          - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

          - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          The type of the code interpreter tool call. Always `code_interpreter_call`.

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Agent BetaResponseCodeInterpreterToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseInputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action BetaResponseInputItemShellCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

            Ordered shell commands for the execution environment to run.

          - `MaxOutputLength int64`

            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

          - `TimeoutMs int64`

            Maximum wall-clock time in milliseconds to allow the shell commands to run.

        - `CallID string`

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

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type BetaLocalEnvironment struct{…}`

          - `type BetaContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

          - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

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

        - `Output []BetaResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                The exit code returned by the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            Captured stderr output for the shell call.

          - `Stdout string`

            Captured stdout output for the shell call.

        - `Type ShellCallOutput`

          The type of the item. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

          The unique ID of the shell tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `MaxOutputLength int64`

          The maximum number of UTF-8 characters captured for this shell call's combined output.

        - `Status string`

          The status of the shell call output.

          - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

            - `Path string`

              Path of the file to create relative to the workspace root.

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

              Path of the file to delete relative to the workspace root.

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

            - `Path string`

              Path of the file to update relative to the workspace root.

            - `Type UpdateFile`

              The operation type. Always `update_file`.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Output string`

          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseInputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseInputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

          The unique ID of the approval response

        - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseInputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

          - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

          - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

      - `type BetaResponseCustomToolCallOutput struct{…}`

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

        - `CallID string`

          The call ID, used to map this custom tool call output to a custom tool call.

        - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          The type of the custom tool call output. Always `custom_tool_call_output`.

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

          The unique ID of the custom tool call output in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

          An identifier used to map this custom tool call to a tool call output.

        - `Input string`

          The input for the custom tool call generated by the model.

        - `Name string`

          The name of the custom tool being called.

        - `Type CustomToolCall`

          The type of the custom tool call. Always `custom_tool_call`.

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

          The unique ID of the custom tool call in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the custom tool being called.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

        - `Type CompactionTrigger`

          The type of the item. Always `compaction_trigger`.

          - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

        - `Agent BetaResponseInputItemCompactionTriggerAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Agent BetaResponseInputItemItemReferenceAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

      - `type BetaResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseInputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output.

          - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

          - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseInputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

  - `Metadata map[string, string]`

    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.

  - `Model BetaResponseModel`

    Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
    offers a wide range of models with different capabilities, performance
    characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
    to browse and compare available models.

    - `type BetaResponseModel string`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

      - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

      - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

      - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

      - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

      - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

      - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

      - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

      - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

      - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

      - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

      - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

      - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

      - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

      - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

      - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

      - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

      - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

      - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

      - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

      - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

      - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

      - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

      - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

      - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

      - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

      - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

      - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

      - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

      - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

      - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

      - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

      - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

      - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

      - `const BetaResponseModelO3 BetaResponseModel = "o3"`

      - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

      - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

      - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

      - `const BetaResponseModelO1 BetaResponseModel = "o1"`

      - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

      - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

      - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

      - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

      - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

      - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

      - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

      - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

      - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

      - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

      - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

      - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

      - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

      - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

      - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

      - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

      - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

      - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

      - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

      - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

      - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

      - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

      - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

      - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

      - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

      - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

      - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

      - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

      - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

      - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

      - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

      - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

      - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

      - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

      - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

      - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

      - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

      - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

      - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

      - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

      - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

      - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

      - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

      - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

      - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

      - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

      - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

      - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

      - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

      - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

      - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

      - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

      - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

      - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

    - `string`

  - `Object Response`

    The object type of this resource - always set to `response`.

    - `const ResponseResponse Response = "response"`

  - `Output []BetaResponseOutputItemUnion`

    An array of content items generated by the model.

    - The length and order of items in the `output` array is dependent
      on the model's response.
    - Rather than accessing the first item in the `output` array and
      assuming it's an `assistant` message with the content generated by
      the model, you might consider using the `output_text` property where
      supported in SDKs.

    - `type BetaResponseOutputMessage struct{…}`

      An output message from the model.

    - `type BetaResponseFileSearchToolCall struct{…}`

      The results of a file search tool call. See the
      [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

    - `type BetaResponseFunctionToolCallOutputItem struct{…}`

      - `ID string`

        The unique ID of the function call tool output.

      - `CallID string`

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

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

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

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

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

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

    - `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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        A computer screenshot image used with the computer use tool.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

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

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

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

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

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

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

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

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

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

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `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.

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

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

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `ParallelToolCalls bool`

    Whether to allow the model to run tool calls in parallel.

  - `Temperature float64`

    What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
    We generally recommend altering this or `top_p` but not both.

  - `ToolChoice BetaResponseToolChoiceUnion`

    How the model should select which tool (or tools) to use when generating
    a response. See the `tools` parameter to see how to specify which tools
    the model can call.

    - `type BetaToolChoiceOptions string`

      Controls which (if any) tool is called by the model.

      `none` means the model will not call any tool and instead generates a message.

      `auto` means the model can pick between generating a message or calling one or
      more tools.

      `required` means the model must call one or more tools.

      - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

      - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

      - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

    - `type BetaToolChoiceAllowed struct{…}`

      Constrains the tools available to the model to a pre-defined set.

      - `Mode BetaToolChoiceAllowedMode`

        Constrains the tools available to the model to a pre-defined set.

        `auto` allows the model to pick from among the allowed tools and generate a
        message.

        `required` requires the model to call one or more of the allowed tools.

        - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

        - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

      - `Tools []map[string, any]`

        A list of tool definitions that the model should be allowed to call.

        For the Responses API, the list of tool definitions might look like:

        ```json
        [
          { "type": "function", "name": "get_weather" },
          { "type": "mcp", "server_label": "deepwiki" },
          { "type": "image_generation" }
        ]
        ```

      - `Type AllowedTools`

        Allowed tool configuration type. Always `allowed_tools`.

        - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

    - `type BetaToolChoiceTypes struct{…}`

      Indicates that the model should use a built-in tool to generate a response.
      [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

      - `Type BetaToolChoiceTypesType`

        The type of hosted tool the model should to use. Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).

        Allowed values are:

        - `file_search`
        - `web_search_preview`
        - `computer`
        - `computer_use_preview`
        - `computer_use`
        - `code_interpreter`
        - `image_generation`

        - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

        - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

        - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

        - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

        - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

        - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

    - `type BetaToolChoiceFunction struct{…}`

      Use this option to force the model to call a specific function.

      - `Name string`

        The name of the function to call.

      - `Type Function`

        For function calling, the type is always `function`.

        - `const FunctionFunction Function = "function"`

    - `type BetaToolChoiceMcp struct{…}`

      Use this option to force the model to call a specific tool on a remote MCP server.

      - `ServerLabel string`

        The label of the MCP server to use.

      - `Type Mcp`

        For MCP tools, the type is always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `Name string`

        The name of the tool to call on the server.

    - `type BetaToolChoiceCustom struct{…}`

      Use this option to force the model to call a specific custom tool.

      - `Name string`

        The name of the custom tool to call.

      - `Type Custom`

        For custom tool calling, the type is always `custom`.

        - `const CustomCustom Custom = "custom"`

    - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

      - `Type ProgrammaticToolCalling`

        The tool to call. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolChoiceApplyPatch struct{…}`

      Forces the model to call the apply_patch tool when executing a tool call.

      - `Type ApplyPatch`

        The tool to call. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `type BetaToolChoiceShell struct{…}`

      Forces the model to call the shell tool when a tool call is required.

      - `Type Shell`

        The tool to call. Always `shell`.

        - `const ShellShell Shell = "shell"`

  - `Tools []BetaToolUnion`

    An array of tools the model may call while generating a response. You
    can specify which tool to use by setting the `tool_choice` parameter.

    We support the following categories of tools:

    - **Built-in tools**: Tools that are provided by OpenAI that extend the
      model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
      or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
      [built-in tools](https://platform.openai.com/docs/guides/tools).
    - **MCP Tools**: Integrations with third-party systems via custom MCP servers
      or predefined connectors such as Google Drive and SharePoint. Learn more about
      [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
    - **Function calls (custom tools)**: Functions that are defined by you,
      enabling the model to call your own code with strongly typed arguments
      and outputs. Learn more about
      [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
      custom tools to call your own code.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

    - `type BetaToolProgrammaticToolCalling struct{…}`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

  - `TopP float64`

    An alternative to sampling with temperature, called nucleus sampling,
    where the model considers the results of the tokens with top_p probability
    mass. So 0.1 means only the tokens comprising the top 10% probability mass
    are considered.

    We generally recommend altering this or `temperature` but not both.

  - `Background bool`

    Whether to run the model response in the background.
    [Learn more](https://platform.openai.com/docs/guides/background).

  - `CompletedAt float64`

    Unix timestamp (in seconds) of when this Response was completed.
    Only present when the status is `completed`.

  - `Conversation BetaResponseConversation`

    The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

    - `ID string`

      The unique ID of the conversation that this response was associated with.

  - `MaxOutputTokens int64`

    An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

  - `MaxToolCalls int64`

    The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

  - `Moderation BetaResponseModeration`

    Moderation results for the response input and output, if moderated completions were requested.

    - `Input BetaResponseModerationInputUnion`

      Moderation for the response input.

      - `type BetaResponseModerationInputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationInputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

    - `Output BetaResponseModerationOutputUnion`

      Moderation for the response output.

      - `type BetaResponseModerationOutputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationOutputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

  - `PreviousResponseID string`

    The unique ID of the previous response to the model. Use this to
    create multi-turn conversations. Learn more about
    [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

  - `Prompt BetaResponsePrompt`

    Reference to a prompt template and its variables.
    [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

    - `ID string`

      The unique identifier of the prompt template to use.

    - `Variables map[string, BetaResponsePromptVariableUnion]`

      Optional map of values to substitute in for variables in your
      prompt. The substitution values can either be strings, or other
      Response input types like images or files.

      - `string`

      - `type BetaResponseInputText struct{…}`

        A text input to the model.

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

    - `Version string`

      Optional version of the prompt template.

  - `PromptCacheKey string`

    Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

  - `PromptCacheOptions BetaResponsePromptCacheOptions`

    The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

    - `Mode string`

      Whether implicit prompt-cache breakpoints were enabled.

      - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

      - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

    - `Ttl string`

      The minimum lifetime applied to each cache breakpoint.

      - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

  - `PromptCacheRetention BetaResponsePromptCacheRetention`

    Deprecated. Use `prompt_cache_options.ttl` instead.

    The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
    This field expresses a maximum retention policy, while
    `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
    fields are independent and do not interact.
    For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

    For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

    - Organizations without ZDR enabled default to `24h`.
    - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

    - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

    - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

  - `Reasoning BetaResponseReasoning`

    **gpt-5 and o-series models only**

    Configuration options for
    [reasoning models](https://platform.openai.com/docs/guides/reasoning).

    - `Context string`

      Controls which reasoning items are rendered back to the model on later turns.
      If omitted or set to `auto`, the model determines the context mode. The
      `gpt-5.6` model family defaults to `all_turns`; earlier models default to
      `current_turn`.

      When returned on a response, this is the effective reasoning context mode
      used for the response.

      - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

      - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

      - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

    - `Effort string`

      Constrains effort on reasoning for reasoning models. Currently supported
      values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
      Reducing reasoning effort can result in faster responses and fewer tokens
      used on reasoning in a response. Not all reasoning models support every
      value. See the
      [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
      for model-specific support.

      - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

      - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

      - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

      - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

      - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

      - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

      - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

    - `GenerateSummary string`

      **Deprecated:** use `summary` instead.

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

      - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

      - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

    - `Mode string`

      Controls the reasoning execution mode for the request.

      When returned on a response, this is the effective execution mode.

      - `string`

      - `string`

        - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

        - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

    - `Summary string`

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

      - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

      - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

      - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

  - `SafetyIdentifier string`

    A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
    The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `ServiceTier BetaResponseServiceTier`

    Specifies the processing type used for serving the request.

    - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
    - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
    - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
    - When not set, the default behavior is 'auto'.

    When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

    - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

    - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

    - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

    - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

    - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

  - `Status BetaResponseStatus`

    The status of the response generation. One of `completed`, `failed`,
    `in_progress`, `cancelled`, `queued`, or `incomplete`.

    - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

    - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

    - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

    - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

    - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

    - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

  - `Text BetaResponseTextConfig`

    Configuration options for a text response from the model. Can be plain
    text or structured JSON data. Learn more:

    - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
    - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

    - `Format BetaResponseFormatTextConfigUnion`

      An object specifying the format that the model must output.

      Configuring `{ "type": "json_schema" }` enables Structured Outputs,
      which ensures the model will match your supplied JSON schema. Learn more in the
      [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

      The default format is `{ "type": "text" }` with no additional options.

      **Not recommended for gpt-4o and newer models:**

      Setting to `{ "type": "json_object" }` enables the older JSON mode, which
      ensures the message the model generates is valid JSON. Using `json_schema`
      is preferred for models that support it.

      - `type BetaResponseFormatTextConfigText struct{…}`

        Default response format. Used to generate text responses.

        - `Type Text`

          The type of response format being defined. Always `text`.

          - `const TextText Text = "text"`

      - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

        JSON Schema response format. Used to generate structured JSON responses.
        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

        - `Name string`

          The name of the response format. Must be a-z, A-Z, 0-9, or contain
          underscores and dashes, with a maximum length of 64.

        - `Schema map[string, any]`

          The schema for the response format, described as a JSON Schema object.
          Learn how to build JSON schemas [here](https://json-schema.org/).

        - `Type JSONSchema`

          The type of response format being defined. Always `json_schema`.

          - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

        - `Description string`

          A description of what the response format is for, used by the model to
          determine how to respond in the format.

        - `Strict bool`

          Whether to enable strict schema adherence when generating the output.
          If set to true, the model will always follow the exact schema defined
          in the `schema` field. Only a subset of JSON Schema is supported when
          `strict` is `true`. To learn more, read the [Structured Outputs
          guide](https://platform.openai.com/docs/guides/structured-outputs).

      - `type BetaResponseFormatTextConfigJSONObject struct{…}`

        JSON object response format. An older method of generating JSON responses.
        Using `json_schema` is recommended for models that support it. Note that the
        model will not generate JSON without a system or user message instructing it
        to do so.

        - `Type JSONObject`

          The type of response format being defined. Always `json_object`.

          - `const JSONObjectJSONObject JSONObject = "json_object"`

    - `Verbosity BetaResponseTextConfigVerbosity`

      Constrains the verbosity of the model's response. Lower values will result in
      more concise responses, while higher values will result in more verbose responses.
      Currently supported values are `low`, `medium`, and `high`. The default is
      `medium`.

      - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

      - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

      - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

  - `TopLogprobs int64`

    An integer between 0 and 20 specifying the maximum number of most likely
    tokens to return at each token position, each with an associated log
    probability. In some cases, the number of returned tokens may be fewer than
    requested.

  - `Truncation BetaResponseTruncation`

    The truncation strategy to use for the model response.

    - `auto`: If the input to this Response exceeds
      the model's context window size, the model will truncate the
      response to fit the context window by dropping items from the beginning of the conversation.
    - `disabled` (default): If the input size will exceed the context window
      size for a model, the request will fail with a 400 error.

    - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

    - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

  - `Usage BetaResponseUsage`

    Represents token usage details including input tokens, output tokens,
    a breakdown of output tokens, and the total tokens used.

    - `InputTokens int64`

      The number of input tokens.

    - `InputTokensDetails BetaResponseUsageInputTokensDetails`

      A detailed breakdown of the input tokens.

      - `CacheWriteTokens int64`

        The number of input tokens that were written to the cache.

      - `CachedTokens int64`

        The number of tokens that were retrieved from the cache.
        [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

    - `OutputTokens int64`

      The number of output tokens.

    - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

      A detailed breakdown of the output tokens.

      - `ReasoningTokens int64`

        The number of reasoning tokens.

    - `TotalTokens int64`

      The total number of tokens used.

  - `User string`

    This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
    A stable identifier for your end-users.
    Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  betaResponse, err := client.Beta.Responses.Get(
    context.TODO(),
    "resp_677efb5139a88190b512bc3fef8e535d",
    openai.BetaResponseGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", betaResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "created_at": 0,
  "error": {
    "code": "server_error",
    "message": "message"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "instructions": "string",
  "metadata": {
    "foo": "string"
  },
  "model": "gpt-5.1",
  "object": "response",
  "output": [
    {
      "id": "id",
      "content": [
        {
          "annotations": [
            {
              "file_id": "file_id",
              "filename": "filename",
              "index": 0,
              "type": "file_citation"
            }
          ],
          "text": "text",
          "type": "output_text",
          "logprobs": [
            {
              "token": "token",
              "bytes": [
                0
              ],
              "logprob": 0,
              "top_logprobs": [
                {
                  "token": "token",
                  "bytes": [
                    0
                  ],
                  "logprob": 0
                }
              ]
            }
          ]
        }
      ],
      "role": "assistant",
      "status": "in_progress",
      "type": "message",
      "agent": {
        "agent_name": "agent_name"
      },
      "phase": "commentary"
    }
  ],
  "parallel_tool_calls": true,
  "temperature": 1,
  "tool_choice": "none",
  "tools": [
    {
      "name": "name",
      "parameters": {
        "foo": "bar"
      },
      "strict": true,
      "type": "function",
      "allowed_callers": [
        "direct"
      ],
      "defer_loading": true,
      "description": "description",
      "output_schema": {
        "foo": "bar"
      }
    }
  ],
  "top_p": 1,
  "background": true,
  "completed_at": 0,
  "conversation": {
    "id": "id"
  },
  "max_output_tokens": 0,
  "max_tool_calls": 0,
  "moderation": {
    "input": {
      "categories": {
        "foo": true
      },
      "category_applied_input_types": {
        "foo": [
          "text"
        ]
      },
      "category_scores": {
        "foo": 0
      },
      "flagged": true,
      "model": "model",
      "type": "moderation_result"
    },
    "output": {
      "categories": {
        "foo": true
      },
      "category_applied_input_types": {
        "foo": [
          "text"
        ]
      },
      "category_scores": {
        "foo": 0
      },
      "flagged": true,
      "model": "model",
      "type": "moderation_result"
    }
  },
  "output_text": "output_text",
  "previous_response_id": "previous_response_id",
  "prompt": {
    "id": "id",
    "variables": {
      "foo": "string"
    },
    "version": "version"
  },
  "prompt_cache_key": "prompt-cache-key-1234",
  "prompt_cache_options": {
    "mode": "implicit",
    "ttl": "30m"
  },
  "prompt_cache_retention": "in_memory",
  "reasoning": {
    "context": "auto",
    "effort": "none",
    "generate_summary": "auto",
    "mode": "standard",
    "summary": "auto"
  },
  "safety_identifier": "safety-identifier-1234",
  "service_tier": "auto",
  "status": "completed",
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "top_logprobs": 0,
  "truncation": "auto",
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  },
  "user": "user-1234"
}
```

## Delete a model response

`client.Beta.Responses.Delete(ctx, responseID, body) error`

**delete** `/responses/{response_id}?beta=true`

Deletes a model response with the given ID.

### Parameters

- `responseID string`

- `body BetaResponseDeleteParams`

  - `Betas param.Field[[]string]`

    Optional beta features to enable for this request.

    - `const BetaResponseDeleteParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseDeleteParamsOpenAIBeta = "responses_multi_agent=v1"`

### Example

```go
package main

import (
  "context"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Beta.Responses.Delete(
    context.TODO(),
    "resp_677efb5139a88190b512bc3fef8e535d",
    openai.BetaResponseDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

## Cancel a response

`client.Beta.Responses.Cancel(ctx, responseID, body) (*BetaResponse, error)`

**post** `/responses/{response_id}/cancel?beta=true`

Cancels a model response with the given ID. Only responses created with
the `background` parameter set to `true` can be cancelled.
[Learn more](https://platform.openai.com/docs/guides/background).

### Parameters

- `responseID string`

- `body BetaResponseCancelParams`

  - `Betas param.Field[[]string]`

    Optional beta features to enable for this request.

    - `const BetaResponseCancelParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseCancelParamsOpenAIBeta = "responses_multi_agent=v1"`

### Returns

- `type BetaResponse struct{…}`

  - `ID string`

    Unique identifier for this Response.

  - `CreatedAt float64`

    Unix timestamp (in seconds) of when this Response was created.

  - `Error BetaResponseError`

    An error object returned when the model fails to generate a Response.

    - `Code BetaResponseErrorCode`

      The error code for the response.

      - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

      - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

      - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

      - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

      - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

      - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

      - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

      - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

      - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

      - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

      - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

      - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

      - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

      - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

      - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

      - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

      - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

      - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

      - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

      - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

    - `Message string`

      A human-readable description of the error.

  - `IncompleteDetails BetaResponseIncompleteDetails`

    Details about why the response is incomplete.

    - `Reason string`

      The reason why the response is incomplete.

      - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

      - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

  - `Instructions BetaResponseInstructionsUnion`

    A system (or developer) message inserted into the model's context.

    When using along with `previous_response_id`, the instructions from a previous
    response will not be carried over to the next response. This makes it simple
    to swap out system (or developer) messages in new responses.

    - `string`

    - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

      A list of one or many input items to the model, containing
      different content types.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

        - `Content BetaEasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail BetaResponseInputImageDetail`

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

                - `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`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileDetail`

                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`.

                - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

              - `FileData string`

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

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Role BetaEasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

          - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

          - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

          - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

        - `Phase BetaEasyInputMessagePhase`

          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.

          - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

          - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

        - `Type BetaEasyInputMessageType`

          The type of the message input. Always `message`.

          - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

        - `Content BetaResponseInputMessageContentList`

          A list of one or many input items to the model, containing different content
          types.

        - `Role string`

          The role of the message input. One of `user`, `system`, or `developer`.

          - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

          - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

          - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

        - `Agent BetaResponseInputItemMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

          - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

          - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

      - `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.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `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`.

                  - `const FileCitationFileCitation FileCitation = "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`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the web resource.

              - `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`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []BetaResponseOutputTextLogprob`

              - `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`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          The role of the output message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status BetaResponseOutputMessageStatus`

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

          - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

          - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

          - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Agent BetaResponseOutputMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Phase BetaResponseOutputMessagePhase`

          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.

          - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

          - `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`.

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Agent BetaResponseFileSearchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Results []BetaResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

            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.

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

            The unique ID of the file.

          - `Filename string`

            The name of the file.

          - `Score float64`

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

          - `Text string`

            The text that was retrieved from the file.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

            The type of the pending safety check.

          - `Message string`

            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.

          - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

          - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

          - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

        - `Type BetaResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

        - `Action BetaComputerActionUnion`

          A click action.

          - `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`.

              - `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`.

              - `const ClickClick Click = "click"`

            - `X int64`

              The x-coordinate where the click occurred.

            - `Y int64`

              The y-coordinate where the click occurred.

            - `Keys []string`

              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`.

              - `const DoubleClickDoubleClick DoubleClick = "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`.

              - `const DragDrag Drag = "drag"`

            - `Keys []string`

              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`.

              - `const KeypressKeypress Keypress = "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`.

              - `const MoveMove Move = "move"`

            - `X int64`

              The x-coordinate to move to.

            - `Y int64`

              The y-coordinate to move to.

            - `Keys []string`

              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`.

              - `const ScreenshotScreenshot Screenshot = "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`.

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

              The x-coordinate where the scroll occurred.

            - `Y int64`

              The y-coordinate where the scroll occurred.

            - `Keys []string`

              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`.

              - `const TypeType Type = "type"`

          - `type BetaComputerActionWait struct{…}`

            A wait action.

            - `Type Wait`

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

              - `const WaitWait Wait = "wait"`

        - `Actions BetaComputerActionList`

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

          - `type BetaComputerActionClick struct{…}`

            A click action.

          - `type BetaComputerActionDoubleClick struct{…}`

            A double click action.

          - `type BetaComputerActionDrag struct{…}`

            A drag action.

          - `type BetaComputerActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

          - `type BetaComputerActionMove struct{…}`

            A mouse move action.

          - `type BetaComputerActionScreenshot struct{…}`

            A screenshot action.

          - `type BetaComputerActionScroll struct{…}`

            A scroll action.

          - `type BetaComputerActionType struct{…}`

            An action to type in text.

          - `type BetaComputerActionWait struct{…}`

            A wait action.

        - `Agent BetaResponseComputerToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

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

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          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`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

        - `Type ComputerCallOutput`

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

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

          The ID of the computer tool call output.

        - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseInputItemComputerCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

          - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action BetaResponseFunctionWebSearchActionUnion`

          An object describing the specific action taken in this web search call.
          Includes details on how the model used the web (search, open_page, find_in_page).

          - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

            Action type "search" - Performs a web search query.

            - `Type Search`

              The action type.

              - `const SearchSearch Search = "search"`

            - `Queries []string`

              The search queries.

            - `Query string`

              The search query.

            - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

              The sources used in the search.

              - `Type URL`

                The type of source. Always `url`.

                - `const URLURL URL = "url"`

              - `URL string`

                The URL of the source.

          - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

            Action type "open_page" - Opens a specific URL from search results.

            - `Type OpenPage`

              The action type.

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

              The URL opened by the model.

          - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

            Action type "find_in_page": Searches for a pattern within a loaded page.

            - `Pattern string`

              The pattern or text to search for within the page.

            - `Type FindInPage`

              The action type.

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

              The URL of the page searched for the pattern.

        - `Status BetaResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

          - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

          - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

          - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          The type of the web search tool call. Always `web_search_call`.

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

        - `Agent BetaResponseFunctionWebSearchAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

          The unique ID of the function tool call.

        - `Agent BetaResponseFunctionToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the function to run.

        - `Status BetaResponseFunctionToolCallStatus`

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

          - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

          - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

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

        - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type BetaResponseInputTextContent 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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail BetaResponseInputImageContentDetail`

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

                - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileContentDetail`

                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`.

                - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Type FunctionCallOutput`

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

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

          The unique ID of the function tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemFunctionCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Status string`

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

          - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

        - `Author string`

          The sending agent identity.

        - `Content []BetaResponseInputItemAgentMessageContentUnion`

          Plaintext, image, or encrypted content sent between agents.

          - `type BetaResponseInputTextContent struct{…}`

            A text input to the model.

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The item type. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `ID string`

          The unique ID of this agent message item.

        - `Agent BetaResponseInputItemAgentMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

        - `Action string`

          The multi-agent action that was executed.

          - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

        - `Arguments string`

          The action arguments as a JSON string.

        - `CallID string`

          The unique ID linking this call to its output.

        - `Type MultiAgentCall`

          The item type. Always `multi_agent_call`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `ID string`

          The unique ID of this multi-agent call.

        - `Agent BetaResponseInputItemMultiAgentCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

        - `Action string`

          The multi-agent action that produced this result.

          - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

        - `CallID string`

          The unique ID of the multi-agent call.

        - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

          Text output returned by the multi-agent action.

          - `Text string`

            The text content.

          - `Type OutputText`

            The content type. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

            Citations associated with the text content.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

              - `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 citation type. Always `file_citation`.

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

              - `EndIndex int64`

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

              - `StartIndex int64`

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

              - `Title string`

                The title of the cited resource.

              - `Type URLCitation`

                The citation type. Always `url_citation`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the cited resource.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

              - `ContainerID string`

                The ID of the container.

              - `EndIndex int64`

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

              - `FileID string`

                The ID of the container file.

              - `Filename string`

                The filename of the container file cited.

              - `StartIndex int64`

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

              - `Type ContainerFileCitation`

                The citation type. Always `container_file_citation`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `Type MultiAgentCallOutput`

          The item type. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `ID string`

          The unique ID of this multi-agent call output.

        - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemToolSearchCall struct{…}`

        - `Arguments any`

          The arguments supplied to the tool search call.

        - `Type ToolSearchCall`

          The item type. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `ID string`

          The unique ID of this tool search call.

        - `Agent BetaResponseInputItemToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

          - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

          - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by the tool search output.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `Name string`

              The name of the function to call.

            - `Parameters map[string, any]`

              A JSON schema object describing the parameters of the function.

            - `Strict bool`

              Whether strict parameter validation is enforced for this function tool.

            - `Type Function`

              The type of the function tool. Always `function`.

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

              - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function is deferred and loaded via tool search.

            - `Description string`

              A description of the function. Used by the model to determine whether or not to call the function.

            - `OutputSchema map[string, any]`

              A JSON schema object describing the JSON value encoded in string outputs for this function.

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `Type FileSearch`

              The type of the file search tool. Always `file_search`.

              - `const FileSearchFileSearch FileSearch = "file_search"`

            - `VectorStoreIDs []string`

              The IDs of the vector stores to search.

            - `Filters BetaFileSearchToolFiltersUnion`

              A filter to apply.

              - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                - `Type string`

                  Type of operation: `and` or `or`.

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions BetaFileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                - `EmbeddingWeight float64`

                  The weight of the embedding in the reciprocal ranking fusion.

                - `TextWeight float64`

                  The weight of the text in the reciprocal ranking fusion.

              - `Ranker string`

                The ranker to use for the file search.

                - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

              - `ScoreThreshold float64`

                The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment BetaComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

              - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

              - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

              - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

              - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

            - `Filters BetaWebSearchToolFilters`

              Filters for the search.

              - `AllowedDomains []string`

                Allowed domains for the search. If not provided, all domains are allowed.
                Subdomains of the provided domains are allowed as well.

                Example: `["pubmed.ncbi.nlm.nih.gov"]`

            - `SearchContextSize BetaWebSearchToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

              - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

              - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchToolUserLocation`

              The approximate location of the user.

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `Type string`

                The type of location approximation. Always `approximate`.

                - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `ServerLabel string`

              A label for this MCP server, used to identify it in tool calls.

            - `Type Mcp`

              The type of the MCP tool. Always `mcp`.

              - `const McpMcp Mcp = "mcp"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

              - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools BetaToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `Authorization string`

              An OAuth access token that can be used with a remote MCP server, either
              with a custom MCP server URL or a service connector. Your application
              must handle the OAuth authorization flow and provide the token here.

            - `ConnectorID string`

              Identifier for service connectors, like those available in ChatGPT. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
              about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

              Currently supported `connector_id` values are:

              - Dropbox: `connector_dropbox`
              - Gmail: `connector_gmail`
              - Google Calendar: `connector_googlecalendar`
              - Google Drive: `connector_googledrive`
              - Microsoft Teams: `connector_microsoftteams`
              - Outlook Calendar: `connector_outlookcalendar`
              - Outlook Email: `connector_outlookemail`
              - SharePoint: `connector_sharepoint`

              - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

              - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

              - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

              - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

              - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

              - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

              - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

              - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

            - `DeferLoading bool`

              Whether this MCP tool is deferred and discovered via tool search.

            - `Headers map[string, string]`

              Optional HTTP headers to send to the MCP server. Use for authentication
              or other purposes.

            - `RequireApproval BetaToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                Specify which of the MCP server's tools require approval. Can be
                `always`, `never`, or a filter object associated with tools
                that require approval.

                - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

                - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                Specify a single approval policy for all tools. One of `always` or
                `never`. When set to `always`, all tools will require approval. When
                set to `never`, all tools will not require approval.

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

            - `ServerDescription string`

              Optional description of the MCP server, used to provide more context.

            - `ServerURL string`

              The URL for the MCP server. One of `server_url`, `connector_id`, or
              `tunnel_id` must be provided.

            - `TunnelID string`

              The Secure MCP Tunnel ID to use instead of a direct server URL. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided.

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container BetaToolCodeInterpreterContainerUnion`

              The code interpreter container. Can be a container ID or an object that
              specifies uploaded file IDs to make available to your code, along with an
              optional `memory_limit` setting.

              - `string`

              - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                - `Type Auto`

                  Always `auto`.

                  - `const AutoAuto Auto = "auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      - `Domain string`

                        The domain associated with the secret.

                      - `Name string`

                        The name of the secret to inject for the domain.

                      - `Value string`

                        The secret value to inject for the domain.

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

              - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type BetaToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

            - `Type ImageGeneration`

              The type of the image generation tool. Always `image_generation`.

              - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

            - `Action string`

              Whether to generate a new image or edit an existing image. Default: `auto`.

              - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

              - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

              - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s).
              This parameter is only supported for GPT image models that support
              transparent backgrounds. Must be one of `transparent`, `opaque`, or
              `auto` (default value). When `auto` is used, the model will
              automatically determine the best background for the image.

              `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
              transparent backgrounds. Requests with `background` set to
              `transparent` will return an error for these models; use `opaque` or
              `auto` instead.

              If `transparent`, the output format needs to support transparency,
              so it should be set to either `png` (default value) or `webp`.

              - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

              - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

              - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

              - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

              - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

            - `InputImageMask BetaToolImageGenerationInputImageMask`

              Optional mask for inpainting. Contains `image_url`
              (string, optional) and `file_id` (string, optional).

              - `FileID string`

                File ID for the mask image.

              - `ImageURL string`

                Base64-encoded mask image.

            - `Model string`

              The image generation model to use. Default: `gpt-image-1`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

              - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

              - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

              - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

            - `Quality string`

              The quality of the generated image. One of `low`, `medium`, `high`,
              or `auto`. Default: `auto`.

              - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

              - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

              - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

              - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

            - `Type LocalShell`

              The type of the local shell tool. Always `local_shell`.

              - `const LocalShellLocalShell LocalShell = "local_shell"`

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

            - `Type Shell`

              The type of the shell tool. Always `shell`.

              - `const ShellShell Shell = "shell"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

              - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

            - `Environment BetaFunctionShellToolEnvironmentUnion`

              - `type BetaContainerAuto struct{…}`

                - `Type ContainerAuto`

                  Automatically creates a container for this request

                  - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit BetaContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                  - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                  - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                  - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []BetaContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  - `type BetaSkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                    - `Type SkillReference`

                      References a skill created with the /v1/skills endpoint.

                      - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                    - `Version string`

                      Optional skill version. Use a positive integer or 'latest'. Omit for default.

                  - `type BetaInlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source BetaInlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                      - `MediaType ApplicationZip`

                        The media type of the inline skill payload. Must be `application/zip`.

                        - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                      - `Type Base64`

                        The type of the inline skill source. Must be `base64`.

                        - `const Base64Base64 Base64 = "base64"`

                    - `Type Inline`

                      Defines an inline skill for this request.

                      - `const InlineInline Inline = "inline"`

              - `type BetaLocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []BetaLocalSkill`

                  An optional list of skills.

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Path string`

                    The path to the directory containing the skill.

              - `type BetaContainerReference struct{…}`

                - `ContainerID string`

                  The ID of the referenced container.

                - `Type ContainerReference`

                  References a container created with the /v1/containers endpoint

                  - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Name string`

              The name of the custom tool, used to identify it in tool calls.

            - `Type Custom`

              The type of the custom tool. Always `custom`.

              - `const CustomCustom Custom = "custom"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

              - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this tool should be deferred and discovered via tool search.

            - `Description string`

              Optional description of the custom tool, used to provide more context.

            - `Format BetaCustomToolFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type BetaCustomToolFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type BetaCustomToolFormatGrammar struct{…}`

                A grammar defined by the user.

                - `Definition string`

                  The grammar definition.

                - `Syntax string`

                  The syntax of the grammar definition. One of `lark` or `regex`.

                  - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                  - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

            - `Description string`

              A description of the namespace shown to the model.

            - `Name string`

              The namespace name used in tool calls (for example, `crm`).

            - `Tools []BetaNamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              - `type BetaNamespaceToolToolFunction struct{…}`

                - `Name string`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function should be deferred and discovered via tool search.

                - `Description string`

                - `OutputSchema map[string, any]`

                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                - `Parameters any`

                - `Strict bool`

                  Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

            - `Type ToolSearch`

              The type of the tool. Always `tool_search`.

              - `const ToolSearchToolSearch ToolSearch = "tool_search"`

            - `Description string`

              Description shown to the model for a client-executed tool search tool.

            - `Execution BetaToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

              - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

              - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

              - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

              - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchPreviewToolUserLocation`

              The user's location.

              - `Type Approximate`

                The type of location approximation. Always `approximate`.

                - `const ApproximateApproximate Approximate = "approximate"`

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

            - `Type ApplyPatch`

              The type of the tool. Always `apply_patch`.

              - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

              - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

        - `Type ToolSearchOutput`

          The item type. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `ID string`

          The unique ID of this tool search output.

        - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

          - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []BetaToolUnion`

          A list of additional tools made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The item type. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `ID string`

          The unique ID of this additional tools item.

        - `Agent BetaResponseInputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

        - `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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          The type of the object. Always `reasoning`.

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Agent BetaResponseReasoningItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Content []BetaResponseReasoningItemContent`

          Reasoning text content.

          - `Text string`

            The reasoning text from the model.

          - `Type ReasoningText`

            The type of the reasoning text. Always `reasoning_text`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

          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.

        - `Status BetaResponseReasoningItemStatus`

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

          - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

          - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

          - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

        - `Agent BetaResponseCompactionItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseInputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

          The unique ID of the code interpreter tool call.

        - `Code string`

          The code to run, or null if not available.

        - `ContainerID string`

          The ID of the container used to run the code.

        - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

              The logs output from the code interpreter.

            - `Type Logs`

              The type of the output. Always `logs`.

              - `const LogsLogs Logs = "logs"`

          - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              The type of the output. Always `image`.

              - `const ImageImage Image = "image"`

            - `URL string`

              The URL of the image output from the code interpreter.

        - `Status BetaResponseCodeInterpreterToolCallStatus`

          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

          - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

          - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          The type of the code interpreter tool call. Always `code_interpreter_call`.

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Agent BetaResponseCodeInterpreterToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseInputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action BetaResponseInputItemShellCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

            Ordered shell commands for the execution environment to run.

          - `MaxOutputLength int64`

            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

          - `TimeoutMs int64`

            Maximum wall-clock time in milliseconds to allow the shell commands to run.

        - `CallID string`

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

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type BetaLocalEnvironment struct{…}`

          - `type BetaContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

          - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

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

        - `Output []BetaResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                The exit code returned by the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            Captured stderr output for the shell call.

          - `Stdout string`

            Captured stdout output for the shell call.

        - `Type ShellCallOutput`

          The type of the item. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

          The unique ID of the shell tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `MaxOutputLength int64`

          The maximum number of UTF-8 characters captured for this shell call's combined output.

        - `Status string`

          The status of the shell call output.

          - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

            - `Path string`

              Path of the file to create relative to the workspace root.

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

              Path of the file to delete relative to the workspace root.

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

            - `Path string`

              Path of the file to update relative to the workspace root.

            - `Type UpdateFile`

              The operation type. Always `update_file`.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Output string`

          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseInputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseInputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

          The unique ID of the approval response

        - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseInputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

          - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

          - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

      - `type BetaResponseCustomToolCallOutput struct{…}`

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

        - `CallID string`

          The call ID, used to map this custom tool call output to a custom tool call.

        - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          The type of the custom tool call output. Always `custom_tool_call_output`.

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

          The unique ID of the custom tool call output in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

          An identifier used to map this custom tool call to a tool call output.

        - `Input string`

          The input for the custom tool call generated by the model.

        - `Name string`

          The name of the custom tool being called.

        - `Type CustomToolCall`

          The type of the custom tool call. Always `custom_tool_call`.

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

          The unique ID of the custom tool call in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the custom tool being called.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

        - `Type CompactionTrigger`

          The type of the item. Always `compaction_trigger`.

          - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

        - `Agent BetaResponseInputItemCompactionTriggerAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Agent BetaResponseInputItemItemReferenceAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

      - `type BetaResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseInputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output.

          - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

          - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseInputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

  - `Metadata map[string, string]`

    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.

  - `Model BetaResponseModel`

    Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
    offers a wide range of models with different capabilities, performance
    characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
    to browse and compare available models.

    - `type BetaResponseModel string`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

      - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

      - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

      - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

      - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

      - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

      - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

      - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

      - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

      - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

      - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

      - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

      - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

      - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

      - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

      - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

      - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

      - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

      - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

      - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

      - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

      - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

      - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

      - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

      - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

      - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

      - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

      - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

      - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

      - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

      - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

      - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

      - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

      - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

      - `const BetaResponseModelO3 BetaResponseModel = "o3"`

      - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

      - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

      - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

      - `const BetaResponseModelO1 BetaResponseModel = "o1"`

      - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

      - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

      - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

      - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

      - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

      - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

      - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

      - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

      - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

      - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

      - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

      - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

      - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

      - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

      - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

      - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

      - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

      - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

      - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

      - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

      - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

      - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

      - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

      - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

      - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

      - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

      - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

      - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

      - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

      - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

      - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

      - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

      - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

      - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

      - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

      - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

      - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

      - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

      - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

      - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

      - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

      - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

      - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

      - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

      - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

      - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

      - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

      - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

      - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

      - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

      - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

      - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

      - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

      - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

    - `string`

  - `Object Response`

    The object type of this resource - always set to `response`.

    - `const ResponseResponse Response = "response"`

  - `Output []BetaResponseOutputItemUnion`

    An array of content items generated by the model.

    - The length and order of items in the `output` array is dependent
      on the model's response.
    - Rather than accessing the first item in the `output` array and
      assuming it's an `assistant` message with the content generated by
      the model, you might consider using the `output_text` property where
      supported in SDKs.

    - `type BetaResponseOutputMessage struct{…}`

      An output message from the model.

    - `type BetaResponseFileSearchToolCall struct{…}`

      The results of a file search tool call. See the
      [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

    - `type BetaResponseFunctionToolCallOutputItem struct{…}`

      - `ID string`

        The unique ID of the function call tool output.

      - `CallID string`

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

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

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

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

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

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

    - `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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        A computer screenshot image used with the computer use tool.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

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

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

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

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

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

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

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

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

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

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `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.

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

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

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `ParallelToolCalls bool`

    Whether to allow the model to run tool calls in parallel.

  - `Temperature float64`

    What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
    We generally recommend altering this or `top_p` but not both.

  - `ToolChoice BetaResponseToolChoiceUnion`

    How the model should select which tool (or tools) to use when generating
    a response. See the `tools` parameter to see how to specify which tools
    the model can call.

    - `type BetaToolChoiceOptions string`

      Controls which (if any) tool is called by the model.

      `none` means the model will not call any tool and instead generates a message.

      `auto` means the model can pick between generating a message or calling one or
      more tools.

      `required` means the model must call one or more tools.

      - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

      - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

      - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

    - `type BetaToolChoiceAllowed struct{…}`

      Constrains the tools available to the model to a pre-defined set.

      - `Mode BetaToolChoiceAllowedMode`

        Constrains the tools available to the model to a pre-defined set.

        `auto` allows the model to pick from among the allowed tools and generate a
        message.

        `required` requires the model to call one or more of the allowed tools.

        - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

        - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

      - `Tools []map[string, any]`

        A list of tool definitions that the model should be allowed to call.

        For the Responses API, the list of tool definitions might look like:

        ```json
        [
          { "type": "function", "name": "get_weather" },
          { "type": "mcp", "server_label": "deepwiki" },
          { "type": "image_generation" }
        ]
        ```

      - `Type AllowedTools`

        Allowed tool configuration type. Always `allowed_tools`.

        - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

    - `type BetaToolChoiceTypes struct{…}`

      Indicates that the model should use a built-in tool to generate a response.
      [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

      - `Type BetaToolChoiceTypesType`

        The type of hosted tool the model should to use. Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).

        Allowed values are:

        - `file_search`
        - `web_search_preview`
        - `computer`
        - `computer_use_preview`
        - `computer_use`
        - `code_interpreter`
        - `image_generation`

        - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

        - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

        - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

        - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

        - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

        - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

    - `type BetaToolChoiceFunction struct{…}`

      Use this option to force the model to call a specific function.

      - `Name string`

        The name of the function to call.

      - `Type Function`

        For function calling, the type is always `function`.

        - `const FunctionFunction Function = "function"`

    - `type BetaToolChoiceMcp struct{…}`

      Use this option to force the model to call a specific tool on a remote MCP server.

      - `ServerLabel string`

        The label of the MCP server to use.

      - `Type Mcp`

        For MCP tools, the type is always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `Name string`

        The name of the tool to call on the server.

    - `type BetaToolChoiceCustom struct{…}`

      Use this option to force the model to call a specific custom tool.

      - `Name string`

        The name of the custom tool to call.

      - `Type Custom`

        For custom tool calling, the type is always `custom`.

        - `const CustomCustom Custom = "custom"`

    - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

      - `Type ProgrammaticToolCalling`

        The tool to call. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolChoiceApplyPatch struct{…}`

      Forces the model to call the apply_patch tool when executing a tool call.

      - `Type ApplyPatch`

        The tool to call. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `type BetaToolChoiceShell struct{…}`

      Forces the model to call the shell tool when a tool call is required.

      - `Type Shell`

        The tool to call. Always `shell`.

        - `const ShellShell Shell = "shell"`

  - `Tools []BetaToolUnion`

    An array of tools the model may call while generating a response. You
    can specify which tool to use by setting the `tool_choice` parameter.

    We support the following categories of tools:

    - **Built-in tools**: Tools that are provided by OpenAI that extend the
      model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
      or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
      [built-in tools](https://platform.openai.com/docs/guides/tools).
    - **MCP Tools**: Integrations with third-party systems via custom MCP servers
      or predefined connectors such as Google Drive and SharePoint. Learn more about
      [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
    - **Function calls (custom tools)**: Functions that are defined by you,
      enabling the model to call your own code with strongly typed arguments
      and outputs. Learn more about
      [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
      custom tools to call your own code.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

    - `type BetaToolProgrammaticToolCalling struct{…}`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

  - `TopP float64`

    An alternative to sampling with temperature, called nucleus sampling,
    where the model considers the results of the tokens with top_p probability
    mass. So 0.1 means only the tokens comprising the top 10% probability mass
    are considered.

    We generally recommend altering this or `temperature` but not both.

  - `Background bool`

    Whether to run the model response in the background.
    [Learn more](https://platform.openai.com/docs/guides/background).

  - `CompletedAt float64`

    Unix timestamp (in seconds) of when this Response was completed.
    Only present when the status is `completed`.

  - `Conversation BetaResponseConversation`

    The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

    - `ID string`

      The unique ID of the conversation that this response was associated with.

  - `MaxOutputTokens int64`

    An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

  - `MaxToolCalls int64`

    The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

  - `Moderation BetaResponseModeration`

    Moderation results for the response input and output, if moderated completions were requested.

    - `Input BetaResponseModerationInputUnion`

      Moderation for the response input.

      - `type BetaResponseModerationInputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationInputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

    - `Output BetaResponseModerationOutputUnion`

      Moderation for the response output.

      - `type BetaResponseModerationOutputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationOutputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

  - `PreviousResponseID string`

    The unique ID of the previous response to the model. Use this to
    create multi-turn conversations. Learn more about
    [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

  - `Prompt BetaResponsePrompt`

    Reference to a prompt template and its variables.
    [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

    - `ID string`

      The unique identifier of the prompt template to use.

    - `Variables map[string, BetaResponsePromptVariableUnion]`

      Optional map of values to substitute in for variables in your
      prompt. The substitution values can either be strings, or other
      Response input types like images or files.

      - `string`

      - `type BetaResponseInputText struct{…}`

        A text input to the model.

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

    - `Version string`

      Optional version of the prompt template.

  - `PromptCacheKey string`

    Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

  - `PromptCacheOptions BetaResponsePromptCacheOptions`

    The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

    - `Mode string`

      Whether implicit prompt-cache breakpoints were enabled.

      - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

      - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

    - `Ttl string`

      The minimum lifetime applied to each cache breakpoint.

      - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

  - `PromptCacheRetention BetaResponsePromptCacheRetention`

    Deprecated. Use `prompt_cache_options.ttl` instead.

    The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
    This field expresses a maximum retention policy, while
    `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
    fields are independent and do not interact.
    For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

    For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

    - Organizations without ZDR enabled default to `24h`.
    - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

    - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

    - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

  - `Reasoning BetaResponseReasoning`

    **gpt-5 and o-series models only**

    Configuration options for
    [reasoning models](https://platform.openai.com/docs/guides/reasoning).

    - `Context string`

      Controls which reasoning items are rendered back to the model on later turns.
      If omitted or set to `auto`, the model determines the context mode. The
      `gpt-5.6` model family defaults to `all_turns`; earlier models default to
      `current_turn`.

      When returned on a response, this is the effective reasoning context mode
      used for the response.

      - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

      - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

      - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

    - `Effort string`

      Constrains effort on reasoning for reasoning models. Currently supported
      values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
      Reducing reasoning effort can result in faster responses and fewer tokens
      used on reasoning in a response. Not all reasoning models support every
      value. See the
      [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
      for model-specific support.

      - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

      - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

      - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

      - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

      - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

      - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

      - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

    - `GenerateSummary string`

      **Deprecated:** use `summary` instead.

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

      - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

      - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

    - `Mode string`

      Controls the reasoning execution mode for the request.

      When returned on a response, this is the effective execution mode.

      - `string`

      - `string`

        - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

        - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

    - `Summary string`

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

      - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

      - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

      - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

  - `SafetyIdentifier string`

    A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
    The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `ServiceTier BetaResponseServiceTier`

    Specifies the processing type used for serving the request.

    - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
    - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
    - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
    - When not set, the default behavior is 'auto'.

    When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

    - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

    - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

    - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

    - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

    - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

  - `Status BetaResponseStatus`

    The status of the response generation. One of `completed`, `failed`,
    `in_progress`, `cancelled`, `queued`, or `incomplete`.

    - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

    - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

    - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

    - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

    - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

    - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

  - `Text BetaResponseTextConfig`

    Configuration options for a text response from the model. Can be plain
    text or structured JSON data. Learn more:

    - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
    - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

    - `Format BetaResponseFormatTextConfigUnion`

      An object specifying the format that the model must output.

      Configuring `{ "type": "json_schema" }` enables Structured Outputs,
      which ensures the model will match your supplied JSON schema. Learn more in the
      [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

      The default format is `{ "type": "text" }` with no additional options.

      **Not recommended for gpt-4o and newer models:**

      Setting to `{ "type": "json_object" }` enables the older JSON mode, which
      ensures the message the model generates is valid JSON. Using `json_schema`
      is preferred for models that support it.

      - `type BetaResponseFormatTextConfigText struct{…}`

        Default response format. Used to generate text responses.

        - `Type Text`

          The type of response format being defined. Always `text`.

          - `const TextText Text = "text"`

      - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

        JSON Schema response format. Used to generate structured JSON responses.
        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

        - `Name string`

          The name of the response format. Must be a-z, A-Z, 0-9, or contain
          underscores and dashes, with a maximum length of 64.

        - `Schema map[string, any]`

          The schema for the response format, described as a JSON Schema object.
          Learn how to build JSON schemas [here](https://json-schema.org/).

        - `Type JSONSchema`

          The type of response format being defined. Always `json_schema`.

          - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

        - `Description string`

          A description of what the response format is for, used by the model to
          determine how to respond in the format.

        - `Strict bool`

          Whether to enable strict schema adherence when generating the output.
          If set to true, the model will always follow the exact schema defined
          in the `schema` field. Only a subset of JSON Schema is supported when
          `strict` is `true`. To learn more, read the [Structured Outputs
          guide](https://platform.openai.com/docs/guides/structured-outputs).

      - `type BetaResponseFormatTextConfigJSONObject struct{…}`

        JSON object response format. An older method of generating JSON responses.
        Using `json_schema` is recommended for models that support it. Note that the
        model will not generate JSON without a system or user message instructing it
        to do so.

        - `Type JSONObject`

          The type of response format being defined. Always `json_object`.

          - `const JSONObjectJSONObject JSONObject = "json_object"`

    - `Verbosity BetaResponseTextConfigVerbosity`

      Constrains the verbosity of the model's response. Lower values will result in
      more concise responses, while higher values will result in more verbose responses.
      Currently supported values are `low`, `medium`, and `high`. The default is
      `medium`.

      - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

      - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

      - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

  - `TopLogprobs int64`

    An integer between 0 and 20 specifying the maximum number of most likely
    tokens to return at each token position, each with an associated log
    probability. In some cases, the number of returned tokens may be fewer than
    requested.

  - `Truncation BetaResponseTruncation`

    The truncation strategy to use for the model response.

    - `auto`: If the input to this Response exceeds
      the model's context window size, the model will truncate the
      response to fit the context window by dropping items from the beginning of the conversation.
    - `disabled` (default): If the input size will exceed the context window
      size for a model, the request will fail with a 400 error.

    - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

    - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

  - `Usage BetaResponseUsage`

    Represents token usage details including input tokens, output tokens,
    a breakdown of output tokens, and the total tokens used.

    - `InputTokens int64`

      The number of input tokens.

    - `InputTokensDetails BetaResponseUsageInputTokensDetails`

      A detailed breakdown of the input tokens.

      - `CacheWriteTokens int64`

        The number of input tokens that were written to the cache.

      - `CachedTokens int64`

        The number of tokens that were retrieved from the cache.
        [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

    - `OutputTokens int64`

      The number of output tokens.

    - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

      A detailed breakdown of the output tokens.

      - `ReasoningTokens int64`

        The number of reasoning tokens.

    - `TotalTokens int64`

      The total number of tokens used.

  - `User string`

    This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
    A stable identifier for your end-users.
    Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  betaResponse, err := client.Beta.Responses.Cancel(
    context.TODO(),
    "resp_677efb5139a88190b512bc3fef8e535d",
    openai.BetaResponseCancelParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", betaResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "created_at": 0,
  "error": {
    "code": "server_error",
    "message": "message"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "instructions": "string",
  "metadata": {
    "foo": "string"
  },
  "model": "gpt-5.1",
  "object": "response",
  "output": [
    {
      "id": "id",
      "content": [
        {
          "annotations": [
            {
              "file_id": "file_id",
              "filename": "filename",
              "index": 0,
              "type": "file_citation"
            }
          ],
          "text": "text",
          "type": "output_text",
          "logprobs": [
            {
              "token": "token",
              "bytes": [
                0
              ],
              "logprob": 0,
              "top_logprobs": [
                {
                  "token": "token",
                  "bytes": [
                    0
                  ],
                  "logprob": 0
                }
              ]
            }
          ]
        }
      ],
      "role": "assistant",
      "status": "in_progress",
      "type": "message",
      "agent": {
        "agent_name": "agent_name"
      },
      "phase": "commentary"
    }
  ],
  "parallel_tool_calls": true,
  "temperature": 1,
  "tool_choice": "none",
  "tools": [
    {
      "name": "name",
      "parameters": {
        "foo": "bar"
      },
      "strict": true,
      "type": "function",
      "allowed_callers": [
        "direct"
      ],
      "defer_loading": true,
      "description": "description",
      "output_schema": {
        "foo": "bar"
      }
    }
  ],
  "top_p": 1,
  "background": true,
  "completed_at": 0,
  "conversation": {
    "id": "id"
  },
  "max_output_tokens": 0,
  "max_tool_calls": 0,
  "moderation": {
    "input": {
      "categories": {
        "foo": true
      },
      "category_applied_input_types": {
        "foo": [
          "text"
        ]
      },
      "category_scores": {
        "foo": 0
      },
      "flagged": true,
      "model": "model",
      "type": "moderation_result"
    },
    "output": {
      "categories": {
        "foo": true
      },
      "category_applied_input_types": {
        "foo": [
          "text"
        ]
      },
      "category_scores": {
        "foo": 0
      },
      "flagged": true,
      "model": "model",
      "type": "moderation_result"
    }
  },
  "output_text": "output_text",
  "previous_response_id": "previous_response_id",
  "prompt": {
    "id": "id",
    "variables": {
      "foo": "string"
    },
    "version": "version"
  },
  "prompt_cache_key": "prompt-cache-key-1234",
  "prompt_cache_options": {
    "mode": "implicit",
    "ttl": "30m"
  },
  "prompt_cache_retention": "in_memory",
  "reasoning": {
    "context": "auto",
    "effort": "none",
    "generate_summary": "auto",
    "mode": "standard",
    "summary": "auto"
  },
  "safety_identifier": "safety-identifier-1234",
  "service_tier": "auto",
  "status": "completed",
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "top_logprobs": 0,
  "truncation": "auto",
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  },
  "user": "user-1234"
}
```

## Compact a response

`client.Beta.Responses.Compact(ctx, params) (*BetaCompactedResponse, error)`

**post** `/responses/compact?beta=true`

Compact a conversation. Returns a compacted response object.

Learn when and how to compact long-running conversations in the [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced).

### Parameters

- `params BetaResponseCompactParams`

  - `Model param.Field[BetaResponseCompactParamsModel]`

    Body param: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models.

    - `type BetaResponseCompactParamsModel string`

      Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models.

      - `const BetaResponseCompactParamsModelGPT5_6Sol BetaResponseCompactParamsModel = "gpt-5.6-sol"`

      - `const BetaResponseCompactParamsModelGPT5_6Terra BetaResponseCompactParamsModel = "gpt-5.6-terra"`

      - `const BetaResponseCompactParamsModelGPT5_6Luna BetaResponseCompactParamsModel = "gpt-5.6-luna"`

      - `const BetaResponseCompactParamsModelGPT5_4 BetaResponseCompactParamsModel = "gpt-5.4"`

      - `const BetaResponseCompactParamsModelGPT5_4Mini BetaResponseCompactParamsModel = "gpt-5.4-mini"`

      - `const BetaResponseCompactParamsModelGPT5_4Nano BetaResponseCompactParamsModel = "gpt-5.4-nano"`

      - `const BetaResponseCompactParamsModelGPT5_4Mini2026_03_17 BetaResponseCompactParamsModel = "gpt-5.4-mini-2026-03-17"`

      - `const BetaResponseCompactParamsModelGPT5_4Nano2026_03_17 BetaResponseCompactParamsModel = "gpt-5.4-nano-2026-03-17"`

      - `const BetaResponseCompactParamsModelGPT5_3ChatLatest BetaResponseCompactParamsModel = "gpt-5.3-chat-latest"`

      - `const BetaResponseCompactParamsModelGPT5_2 BetaResponseCompactParamsModel = "gpt-5.2"`

      - `const BetaResponseCompactParamsModelGPT5_2_2025_12_11 BetaResponseCompactParamsModel = "gpt-5.2-2025-12-11"`

      - `const BetaResponseCompactParamsModelGPT5_2ChatLatest BetaResponseCompactParamsModel = "gpt-5.2-chat-latest"`

      - `const BetaResponseCompactParamsModelGPT5_2Pro BetaResponseCompactParamsModel = "gpt-5.2-pro"`

      - `const BetaResponseCompactParamsModelGPT5_2Pro2025_12_11 BetaResponseCompactParamsModel = "gpt-5.2-pro-2025-12-11"`

      - `const BetaResponseCompactParamsModelGPT5_1 BetaResponseCompactParamsModel = "gpt-5.1"`

      - `const BetaResponseCompactParamsModelGPT5_1_2025_11_13 BetaResponseCompactParamsModel = "gpt-5.1-2025-11-13"`

      - `const BetaResponseCompactParamsModelGPT5_1Codex BetaResponseCompactParamsModel = "gpt-5.1-codex"`

      - `const BetaResponseCompactParamsModelGPT5_1Mini BetaResponseCompactParamsModel = "gpt-5.1-mini"`

      - `const BetaResponseCompactParamsModelGPT5_1ChatLatest BetaResponseCompactParamsModel = "gpt-5.1-chat-latest"`

      - `const BetaResponseCompactParamsModelGPT5 BetaResponseCompactParamsModel = "gpt-5"`

      - `const BetaResponseCompactParamsModelGPT5Mini BetaResponseCompactParamsModel = "gpt-5-mini"`

      - `const BetaResponseCompactParamsModelGPT5Nano BetaResponseCompactParamsModel = "gpt-5-nano"`

      - `const BetaResponseCompactParamsModelGPT5_2025_08_07 BetaResponseCompactParamsModel = "gpt-5-2025-08-07"`

      - `const BetaResponseCompactParamsModelGPT5Mini2025_08_07 BetaResponseCompactParamsModel = "gpt-5-mini-2025-08-07"`

      - `const BetaResponseCompactParamsModelGPT5Nano2025_08_07 BetaResponseCompactParamsModel = "gpt-5-nano-2025-08-07"`

      - `const BetaResponseCompactParamsModelGPT5ChatLatest BetaResponseCompactParamsModel = "gpt-5-chat-latest"`

      - `const BetaResponseCompactParamsModelGPT4_1 BetaResponseCompactParamsModel = "gpt-4.1"`

      - `const BetaResponseCompactParamsModelGPT4_1Mini BetaResponseCompactParamsModel = "gpt-4.1-mini"`

      - `const BetaResponseCompactParamsModelGPT4_1Nano BetaResponseCompactParamsModel = "gpt-4.1-nano"`

      - `const BetaResponseCompactParamsModelGPT4_1_2025_04_14 BetaResponseCompactParamsModel = "gpt-4.1-2025-04-14"`

      - `const BetaResponseCompactParamsModelGPT4_1Mini2025_04_14 BetaResponseCompactParamsModel = "gpt-4.1-mini-2025-04-14"`

      - `const BetaResponseCompactParamsModelGPT4_1Nano2025_04_14 BetaResponseCompactParamsModel = "gpt-4.1-nano-2025-04-14"`

      - `const BetaResponseCompactParamsModelO4Mini BetaResponseCompactParamsModel = "o4-mini"`

      - `const BetaResponseCompactParamsModelO4Mini2025_04_16 BetaResponseCompactParamsModel = "o4-mini-2025-04-16"`

      - `const BetaResponseCompactParamsModelO3 BetaResponseCompactParamsModel = "o3"`

      - `const BetaResponseCompactParamsModelO3_2025_04_16 BetaResponseCompactParamsModel = "o3-2025-04-16"`

      - `const BetaResponseCompactParamsModelO3Mini BetaResponseCompactParamsModel = "o3-mini"`

      - `const BetaResponseCompactParamsModelO3Mini2025_01_31 BetaResponseCompactParamsModel = "o3-mini-2025-01-31"`

      - `const BetaResponseCompactParamsModelO1 BetaResponseCompactParamsModel = "o1"`

      - `const BetaResponseCompactParamsModelO1_2024_12_17 BetaResponseCompactParamsModel = "o1-2024-12-17"`

      - `const BetaResponseCompactParamsModelO1Preview BetaResponseCompactParamsModel = "o1-preview"`

      - `const BetaResponseCompactParamsModelO1Preview2024_09_12 BetaResponseCompactParamsModel = "o1-preview-2024-09-12"`

      - `const BetaResponseCompactParamsModelO1Mini BetaResponseCompactParamsModel = "o1-mini"`

      - `const BetaResponseCompactParamsModelO1Mini2024_09_12 BetaResponseCompactParamsModel = "o1-mini-2024-09-12"`

      - `const BetaResponseCompactParamsModelGPT4o BetaResponseCompactParamsModel = "gpt-4o"`

      - `const BetaResponseCompactParamsModelGPT4o2024_11_20 BetaResponseCompactParamsModel = "gpt-4o-2024-11-20"`

      - `const BetaResponseCompactParamsModelGPT4o2024_08_06 BetaResponseCompactParamsModel = "gpt-4o-2024-08-06"`

      - `const BetaResponseCompactParamsModelGPT4o2024_05_13 BetaResponseCompactParamsModel = "gpt-4o-2024-05-13"`

      - `const BetaResponseCompactParamsModelGPT4oAudioPreview BetaResponseCompactParamsModel = "gpt-4o-audio-preview"`

      - `const BetaResponseCompactParamsModelGPT4oAudioPreview2024_10_01 BetaResponseCompactParamsModel = "gpt-4o-audio-preview-2024-10-01"`

      - `const BetaResponseCompactParamsModelGPT4oAudioPreview2024_12_17 BetaResponseCompactParamsModel = "gpt-4o-audio-preview-2024-12-17"`

      - `const BetaResponseCompactParamsModelGPT4oAudioPreview2025_06_03 BetaResponseCompactParamsModel = "gpt-4o-audio-preview-2025-06-03"`

      - `const BetaResponseCompactParamsModelGPT4oMiniAudioPreview BetaResponseCompactParamsModel = "gpt-4o-mini-audio-preview"`

      - `const BetaResponseCompactParamsModelGPT4oMiniAudioPreview2024_12_17 BetaResponseCompactParamsModel = "gpt-4o-mini-audio-preview-2024-12-17"`

      - `const BetaResponseCompactParamsModelGPT4oSearchPreview BetaResponseCompactParamsModel = "gpt-4o-search-preview"`

      - `const BetaResponseCompactParamsModelGPT4oMiniSearchPreview BetaResponseCompactParamsModel = "gpt-4o-mini-search-preview"`

      - `const BetaResponseCompactParamsModelGPT4oSearchPreview2025_03_11 BetaResponseCompactParamsModel = "gpt-4o-search-preview-2025-03-11"`

      - `const BetaResponseCompactParamsModelGPT4oMiniSearchPreview2025_03_11 BetaResponseCompactParamsModel = "gpt-4o-mini-search-preview-2025-03-11"`

      - `const BetaResponseCompactParamsModelChatgpt4oLatest BetaResponseCompactParamsModel = "chatgpt-4o-latest"`

      - `const BetaResponseCompactParamsModelCodexMiniLatest BetaResponseCompactParamsModel = "codex-mini-latest"`

      - `const BetaResponseCompactParamsModelGPT4oMini BetaResponseCompactParamsModel = "gpt-4o-mini"`

      - `const BetaResponseCompactParamsModelGPT4oMini2024_07_18 BetaResponseCompactParamsModel = "gpt-4o-mini-2024-07-18"`

      - `const BetaResponseCompactParamsModelGPT4Turbo BetaResponseCompactParamsModel = "gpt-4-turbo"`

      - `const BetaResponseCompactParamsModelGPT4Turbo2024_04_09 BetaResponseCompactParamsModel = "gpt-4-turbo-2024-04-09"`

      - `const BetaResponseCompactParamsModelGPT4_0125Preview BetaResponseCompactParamsModel = "gpt-4-0125-preview"`

      - `const BetaResponseCompactParamsModelGPT4TurboPreview BetaResponseCompactParamsModel = "gpt-4-turbo-preview"`

      - `const BetaResponseCompactParamsModelGPT4_1106Preview BetaResponseCompactParamsModel = "gpt-4-1106-preview"`

      - `const BetaResponseCompactParamsModelGPT4VisionPreview BetaResponseCompactParamsModel = "gpt-4-vision-preview"`

      - `const BetaResponseCompactParamsModelGPT4 BetaResponseCompactParamsModel = "gpt-4"`

      - `const BetaResponseCompactParamsModelGPT4_0314 BetaResponseCompactParamsModel = "gpt-4-0314"`

      - `const BetaResponseCompactParamsModelGPT4_0613 BetaResponseCompactParamsModel = "gpt-4-0613"`

      - `const BetaResponseCompactParamsModelGPT4_32k BetaResponseCompactParamsModel = "gpt-4-32k"`

      - `const BetaResponseCompactParamsModelGPT4_32k0314 BetaResponseCompactParamsModel = "gpt-4-32k-0314"`

      - `const BetaResponseCompactParamsModelGPT4_32k0613 BetaResponseCompactParamsModel = "gpt-4-32k-0613"`

      - `const BetaResponseCompactParamsModelGPT3_5Turbo BetaResponseCompactParamsModel = "gpt-3.5-turbo"`

      - `const BetaResponseCompactParamsModelGPT3_5Turbo16k BetaResponseCompactParamsModel = "gpt-3.5-turbo-16k"`

      - `const BetaResponseCompactParamsModelGPT3_5Turbo0301 BetaResponseCompactParamsModel = "gpt-3.5-turbo-0301"`

      - `const BetaResponseCompactParamsModelGPT3_5Turbo0613 BetaResponseCompactParamsModel = "gpt-3.5-turbo-0613"`

      - `const BetaResponseCompactParamsModelGPT3_5Turbo1106 BetaResponseCompactParamsModel = "gpt-3.5-turbo-1106"`

      - `const BetaResponseCompactParamsModelGPT3_5Turbo0125 BetaResponseCompactParamsModel = "gpt-3.5-turbo-0125"`

      - `const BetaResponseCompactParamsModelGPT3_5Turbo16k0613 BetaResponseCompactParamsModel = "gpt-3.5-turbo-16k-0613"`

      - `const BetaResponseCompactParamsModelO1Pro BetaResponseCompactParamsModel = "o1-pro"`

      - `const BetaResponseCompactParamsModelO1Pro2025_03_19 BetaResponseCompactParamsModel = "o1-pro-2025-03-19"`

      - `const BetaResponseCompactParamsModelO3Pro BetaResponseCompactParamsModel = "o3-pro"`

      - `const BetaResponseCompactParamsModelO3Pro2025_06_10 BetaResponseCompactParamsModel = "o3-pro-2025-06-10"`

      - `const BetaResponseCompactParamsModelO3DeepResearch BetaResponseCompactParamsModel = "o3-deep-research"`

      - `const BetaResponseCompactParamsModelO3DeepResearch2025_06_26 BetaResponseCompactParamsModel = "o3-deep-research-2025-06-26"`

      - `const BetaResponseCompactParamsModelO4MiniDeepResearch BetaResponseCompactParamsModel = "o4-mini-deep-research"`

      - `const BetaResponseCompactParamsModelO4MiniDeepResearch2025_06_26 BetaResponseCompactParamsModel = "o4-mini-deep-research-2025-06-26"`

      - `const BetaResponseCompactParamsModelComputerUsePreview BetaResponseCompactParamsModel = "computer-use-preview"`

      - `const BetaResponseCompactParamsModelComputerUsePreview2025_03_11 BetaResponseCompactParamsModel = "computer-use-preview-2025-03-11"`

      - `const BetaResponseCompactParamsModelGPT5Codex BetaResponseCompactParamsModel = "gpt-5-codex"`

      - `const BetaResponseCompactParamsModelGPT5Pro BetaResponseCompactParamsModel = "gpt-5-pro"`

      - `const BetaResponseCompactParamsModelGPT5Pro2025_10_06 BetaResponseCompactParamsModel = "gpt-5-pro-2025-10-06"`

      - `const BetaResponseCompactParamsModelGPT5_1CodexMax BetaResponseCompactParamsModel = "gpt-5.1-codex-max"`

    - `string`

  - `Input param.Field[BetaResponseCompactParamsInputUnion]`

    Body param: Text, image, or file inputs to the model, used to generate a response

    - `string`

    - `type BetaResponseCompactParamsInputArray []BetaResponseInputItemUnion`

      A list of one or many input items to the model, containing different content types.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

        - `Content BetaEasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail BetaResponseInputImageDetail`

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

                - `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`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileDetail`

                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`.

                - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

              - `FileData string`

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

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Role BetaEasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

          - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

          - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

          - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

        - `Phase BetaEasyInputMessagePhase`

          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.

          - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

          - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

        - `Type BetaEasyInputMessageType`

          The type of the message input. Always `message`.

          - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

        - `Content BetaResponseInputMessageContentList`

          A list of one or many input items to the model, containing different content
          types.

        - `Role string`

          The role of the message input. One of `user`, `system`, or `developer`.

          - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

          - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

          - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

        - `Agent BetaResponseInputItemMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

          - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

          - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

      - `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.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `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`.

                  - `const FileCitationFileCitation FileCitation = "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`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the web resource.

              - `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`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []BetaResponseOutputTextLogprob`

              - `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`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          The role of the output message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status BetaResponseOutputMessageStatus`

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

          - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

          - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

          - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Agent BetaResponseOutputMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Phase BetaResponseOutputMessagePhase`

          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.

          - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

          - `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`.

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Agent BetaResponseFileSearchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Results []BetaResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

            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.

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

            The unique ID of the file.

          - `Filename string`

            The name of the file.

          - `Score float64`

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

          - `Text string`

            The text that was retrieved from the file.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

            The type of the pending safety check.

          - `Message string`

            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.

          - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

          - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

          - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

        - `Type BetaResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

        - `Action BetaComputerActionUnion`

          A click action.

          - `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`.

              - `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`.

              - `const ClickClick Click = "click"`

            - `X int64`

              The x-coordinate where the click occurred.

            - `Y int64`

              The y-coordinate where the click occurred.

            - `Keys []string`

              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`.

              - `const DoubleClickDoubleClick DoubleClick = "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`.

              - `const DragDrag Drag = "drag"`

            - `Keys []string`

              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`.

              - `const KeypressKeypress Keypress = "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`.

              - `const MoveMove Move = "move"`

            - `X int64`

              The x-coordinate to move to.

            - `Y int64`

              The y-coordinate to move to.

            - `Keys []string`

              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`.

              - `const ScreenshotScreenshot Screenshot = "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`.

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

              The x-coordinate where the scroll occurred.

            - `Y int64`

              The y-coordinate where the scroll occurred.

            - `Keys []string`

              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`.

              - `const TypeType Type = "type"`

          - `type BetaComputerActionWait struct{…}`

            A wait action.

            - `Type Wait`

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

              - `const WaitWait Wait = "wait"`

        - `Actions BetaComputerActionList`

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

          - `type BetaComputerActionClick struct{…}`

            A click action.

          - `type BetaComputerActionDoubleClick struct{…}`

            A double click action.

          - `type BetaComputerActionDrag struct{…}`

            A drag action.

          - `type BetaComputerActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

          - `type BetaComputerActionMove struct{…}`

            A mouse move action.

          - `type BetaComputerActionScreenshot struct{…}`

            A screenshot action.

          - `type BetaComputerActionScroll struct{…}`

            A scroll action.

          - `type BetaComputerActionType struct{…}`

            An action to type in text.

          - `type BetaComputerActionWait struct{…}`

            A wait action.

        - `Agent BetaResponseComputerToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

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

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          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`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

        - `Type ComputerCallOutput`

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

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

          The ID of the computer tool call output.

        - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseInputItemComputerCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

          - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action BetaResponseFunctionWebSearchActionUnion`

          An object describing the specific action taken in this web search call.
          Includes details on how the model used the web (search, open_page, find_in_page).

          - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

            Action type "search" - Performs a web search query.

            - `Type Search`

              The action type.

              - `const SearchSearch Search = "search"`

            - `Queries []string`

              The search queries.

            - `Query string`

              The search query.

            - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

              The sources used in the search.

              - `Type URL`

                The type of source. Always `url`.

                - `const URLURL URL = "url"`

              - `URL string`

                The URL of the source.

          - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

            Action type "open_page" - Opens a specific URL from search results.

            - `Type OpenPage`

              The action type.

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

              The URL opened by the model.

          - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

            Action type "find_in_page": Searches for a pattern within a loaded page.

            - `Pattern string`

              The pattern or text to search for within the page.

            - `Type FindInPage`

              The action type.

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

              The URL of the page searched for the pattern.

        - `Status BetaResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

          - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

          - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

          - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          The type of the web search tool call. Always `web_search_call`.

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

        - `Agent BetaResponseFunctionWebSearchAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

          The unique ID of the function tool call.

        - `Agent BetaResponseFunctionToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the function to run.

        - `Status BetaResponseFunctionToolCallStatus`

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

          - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

          - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

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

        - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type BetaResponseInputTextContent 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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail BetaResponseInputImageContentDetail`

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

                - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileContentDetail`

                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`.

                - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Type FunctionCallOutput`

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

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

          The unique ID of the function tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemFunctionCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Status string`

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

          - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

        - `Author string`

          The sending agent identity.

        - `Content []BetaResponseInputItemAgentMessageContentUnion`

          Plaintext, image, or encrypted content sent between agents.

          - `type BetaResponseInputTextContent struct{…}`

            A text input to the model.

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The item type. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `ID string`

          The unique ID of this agent message item.

        - `Agent BetaResponseInputItemAgentMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

        - `Action string`

          The multi-agent action that was executed.

          - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

        - `Arguments string`

          The action arguments as a JSON string.

        - `CallID string`

          The unique ID linking this call to its output.

        - `Type MultiAgentCall`

          The item type. Always `multi_agent_call`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `ID string`

          The unique ID of this multi-agent call.

        - `Agent BetaResponseInputItemMultiAgentCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

        - `Action string`

          The multi-agent action that produced this result.

          - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

        - `CallID string`

          The unique ID of the multi-agent call.

        - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

          Text output returned by the multi-agent action.

          - `Text string`

            The text content.

          - `Type OutputText`

            The content type. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

            Citations associated with the text content.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

              - `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 citation type. Always `file_citation`.

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

              - `EndIndex int64`

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

              - `StartIndex int64`

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

              - `Title string`

                The title of the cited resource.

              - `Type URLCitation`

                The citation type. Always `url_citation`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the cited resource.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

              - `ContainerID string`

                The ID of the container.

              - `EndIndex int64`

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

              - `FileID string`

                The ID of the container file.

              - `Filename string`

                The filename of the container file cited.

              - `StartIndex int64`

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

              - `Type ContainerFileCitation`

                The citation type. Always `container_file_citation`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `Type MultiAgentCallOutput`

          The item type. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `ID string`

          The unique ID of this multi-agent call output.

        - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemToolSearchCall struct{…}`

        - `Arguments any`

          The arguments supplied to the tool search call.

        - `Type ToolSearchCall`

          The item type. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `ID string`

          The unique ID of this tool search call.

        - `Agent BetaResponseInputItemToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

          - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

          - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by the tool search output.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `Name string`

              The name of the function to call.

            - `Parameters map[string, any]`

              A JSON schema object describing the parameters of the function.

            - `Strict bool`

              Whether strict parameter validation is enforced for this function tool.

            - `Type Function`

              The type of the function tool. Always `function`.

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

              - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function is deferred and loaded via tool search.

            - `Description string`

              A description of the function. Used by the model to determine whether or not to call the function.

            - `OutputSchema map[string, any]`

              A JSON schema object describing the JSON value encoded in string outputs for this function.

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `Type FileSearch`

              The type of the file search tool. Always `file_search`.

              - `const FileSearchFileSearch FileSearch = "file_search"`

            - `VectorStoreIDs []string`

              The IDs of the vector stores to search.

            - `Filters BetaFileSearchToolFiltersUnion`

              A filter to apply.

              - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                - `Type string`

                  Type of operation: `and` or `or`.

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions BetaFileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                - `EmbeddingWeight float64`

                  The weight of the embedding in the reciprocal ranking fusion.

                - `TextWeight float64`

                  The weight of the text in the reciprocal ranking fusion.

              - `Ranker string`

                The ranker to use for the file search.

                - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

              - `ScoreThreshold float64`

                The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment BetaComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

              - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

              - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

              - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

              - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

            - `Filters BetaWebSearchToolFilters`

              Filters for the search.

              - `AllowedDomains []string`

                Allowed domains for the search. If not provided, all domains are allowed.
                Subdomains of the provided domains are allowed as well.

                Example: `["pubmed.ncbi.nlm.nih.gov"]`

            - `SearchContextSize BetaWebSearchToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

              - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

              - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchToolUserLocation`

              The approximate location of the user.

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `Type string`

                The type of location approximation. Always `approximate`.

                - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `ServerLabel string`

              A label for this MCP server, used to identify it in tool calls.

            - `Type Mcp`

              The type of the MCP tool. Always `mcp`.

              - `const McpMcp Mcp = "mcp"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

              - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools BetaToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `Authorization string`

              An OAuth access token that can be used with a remote MCP server, either
              with a custom MCP server URL or a service connector. Your application
              must handle the OAuth authorization flow and provide the token here.

            - `ConnectorID string`

              Identifier for service connectors, like those available in ChatGPT. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
              about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

              Currently supported `connector_id` values are:

              - Dropbox: `connector_dropbox`
              - Gmail: `connector_gmail`
              - Google Calendar: `connector_googlecalendar`
              - Google Drive: `connector_googledrive`
              - Microsoft Teams: `connector_microsoftteams`
              - Outlook Calendar: `connector_outlookcalendar`
              - Outlook Email: `connector_outlookemail`
              - SharePoint: `connector_sharepoint`

              - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

              - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

              - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

              - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

              - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

              - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

              - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

              - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

            - `DeferLoading bool`

              Whether this MCP tool is deferred and discovered via tool search.

            - `Headers map[string, string]`

              Optional HTTP headers to send to the MCP server. Use for authentication
              or other purposes.

            - `RequireApproval BetaToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                Specify which of the MCP server's tools require approval. Can be
                `always`, `never`, or a filter object associated with tools
                that require approval.

                - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

                - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                Specify a single approval policy for all tools. One of `always` or
                `never`. When set to `always`, all tools will require approval. When
                set to `never`, all tools will not require approval.

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

            - `ServerDescription string`

              Optional description of the MCP server, used to provide more context.

            - `ServerURL string`

              The URL for the MCP server. One of `server_url`, `connector_id`, or
              `tunnel_id` must be provided.

            - `TunnelID string`

              The Secure MCP Tunnel ID to use instead of a direct server URL. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided.

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container BetaToolCodeInterpreterContainerUnion`

              The code interpreter container. Can be a container ID or an object that
              specifies uploaded file IDs to make available to your code, along with an
              optional `memory_limit` setting.

              - `string`

              - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                - `Type Auto`

                  Always `auto`.

                  - `const AutoAuto Auto = "auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      - `Domain string`

                        The domain associated with the secret.

                      - `Name string`

                        The name of the secret to inject for the domain.

                      - `Value string`

                        The secret value to inject for the domain.

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

              - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type BetaToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

            - `Type ImageGeneration`

              The type of the image generation tool. Always `image_generation`.

              - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

            - `Action string`

              Whether to generate a new image or edit an existing image. Default: `auto`.

              - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

              - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

              - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s).
              This parameter is only supported for GPT image models that support
              transparent backgrounds. Must be one of `transparent`, `opaque`, or
              `auto` (default value). When `auto` is used, the model will
              automatically determine the best background for the image.

              `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
              transparent backgrounds. Requests with `background` set to
              `transparent` will return an error for these models; use `opaque` or
              `auto` instead.

              If `transparent`, the output format needs to support transparency,
              so it should be set to either `png` (default value) or `webp`.

              - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

              - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

              - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

              - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

              - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

            - `InputImageMask BetaToolImageGenerationInputImageMask`

              Optional mask for inpainting. Contains `image_url`
              (string, optional) and `file_id` (string, optional).

              - `FileID string`

                File ID for the mask image.

              - `ImageURL string`

                Base64-encoded mask image.

            - `Model string`

              The image generation model to use. Default: `gpt-image-1`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

              - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

              - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

              - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

            - `Quality string`

              The quality of the generated image. One of `low`, `medium`, `high`,
              or `auto`. Default: `auto`.

              - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

              - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

              - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

              - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

            - `Type LocalShell`

              The type of the local shell tool. Always `local_shell`.

              - `const LocalShellLocalShell LocalShell = "local_shell"`

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

            - `Type Shell`

              The type of the shell tool. Always `shell`.

              - `const ShellShell Shell = "shell"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

              - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

            - `Environment BetaFunctionShellToolEnvironmentUnion`

              - `type BetaContainerAuto struct{…}`

                - `Type ContainerAuto`

                  Automatically creates a container for this request

                  - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit BetaContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                  - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                  - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                  - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []BetaContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  - `type BetaSkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                    - `Type SkillReference`

                      References a skill created with the /v1/skills endpoint.

                      - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                    - `Version string`

                      Optional skill version. Use a positive integer or 'latest'. Omit for default.

                  - `type BetaInlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source BetaInlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                      - `MediaType ApplicationZip`

                        The media type of the inline skill payload. Must be `application/zip`.

                        - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                      - `Type Base64`

                        The type of the inline skill source. Must be `base64`.

                        - `const Base64Base64 Base64 = "base64"`

                    - `Type Inline`

                      Defines an inline skill for this request.

                      - `const InlineInline Inline = "inline"`

              - `type BetaLocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []BetaLocalSkill`

                  An optional list of skills.

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Path string`

                    The path to the directory containing the skill.

              - `type BetaContainerReference struct{…}`

                - `ContainerID string`

                  The ID of the referenced container.

                - `Type ContainerReference`

                  References a container created with the /v1/containers endpoint

                  - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Name string`

              The name of the custom tool, used to identify it in tool calls.

            - `Type Custom`

              The type of the custom tool. Always `custom`.

              - `const CustomCustom Custom = "custom"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

              - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this tool should be deferred and discovered via tool search.

            - `Description string`

              Optional description of the custom tool, used to provide more context.

            - `Format BetaCustomToolFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type BetaCustomToolFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type BetaCustomToolFormatGrammar struct{…}`

                A grammar defined by the user.

                - `Definition string`

                  The grammar definition.

                - `Syntax string`

                  The syntax of the grammar definition. One of `lark` or `regex`.

                  - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                  - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

            - `Description string`

              A description of the namespace shown to the model.

            - `Name string`

              The namespace name used in tool calls (for example, `crm`).

            - `Tools []BetaNamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              - `type BetaNamespaceToolToolFunction struct{…}`

                - `Name string`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function should be deferred and discovered via tool search.

                - `Description string`

                - `OutputSchema map[string, any]`

                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                - `Parameters any`

                - `Strict bool`

                  Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

            - `Type ToolSearch`

              The type of the tool. Always `tool_search`.

              - `const ToolSearchToolSearch ToolSearch = "tool_search"`

            - `Description string`

              Description shown to the model for a client-executed tool search tool.

            - `Execution BetaToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

              - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

              - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

              - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

              - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchPreviewToolUserLocation`

              The user's location.

              - `Type Approximate`

                The type of location approximation. Always `approximate`.

                - `const ApproximateApproximate Approximate = "approximate"`

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

            - `Type ApplyPatch`

              The type of the tool. Always `apply_patch`.

              - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

              - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

        - `Type ToolSearchOutput`

          The item type. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `ID string`

          The unique ID of this tool search output.

        - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

          - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []BetaToolUnion`

          A list of additional tools made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The item type. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `ID string`

          The unique ID of this additional tools item.

        - `Agent BetaResponseInputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

        - `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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          The type of the object. Always `reasoning`.

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Agent BetaResponseReasoningItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Content []BetaResponseReasoningItemContent`

          Reasoning text content.

          - `Text string`

            The reasoning text from the model.

          - `Type ReasoningText`

            The type of the reasoning text. Always `reasoning_text`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

          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.

        - `Status BetaResponseReasoningItemStatus`

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

          - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

          - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

          - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

        - `Agent BetaResponseCompactionItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseInputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

          The unique ID of the code interpreter tool call.

        - `Code string`

          The code to run, or null if not available.

        - `ContainerID string`

          The ID of the container used to run the code.

        - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

              The logs output from the code interpreter.

            - `Type Logs`

              The type of the output. Always `logs`.

              - `const LogsLogs Logs = "logs"`

          - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              The type of the output. Always `image`.

              - `const ImageImage Image = "image"`

            - `URL string`

              The URL of the image output from the code interpreter.

        - `Status BetaResponseCodeInterpreterToolCallStatus`

          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

          - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

          - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          The type of the code interpreter tool call. Always `code_interpreter_call`.

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Agent BetaResponseCodeInterpreterToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseInputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action BetaResponseInputItemShellCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

            Ordered shell commands for the execution environment to run.

          - `MaxOutputLength int64`

            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

          - `TimeoutMs int64`

            Maximum wall-clock time in milliseconds to allow the shell commands to run.

        - `CallID string`

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

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type BetaLocalEnvironment struct{…}`

          - `type BetaContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

          - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

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

        - `Output []BetaResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                The exit code returned by the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            Captured stderr output for the shell call.

          - `Stdout string`

            Captured stdout output for the shell call.

        - `Type ShellCallOutput`

          The type of the item. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

          The unique ID of the shell tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `MaxOutputLength int64`

          The maximum number of UTF-8 characters captured for this shell call's combined output.

        - `Status string`

          The status of the shell call output.

          - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

            - `Path string`

              Path of the file to create relative to the workspace root.

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

              Path of the file to delete relative to the workspace root.

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

            - `Path string`

              Path of the file to update relative to the workspace root.

            - `Type UpdateFile`

              The operation type. Always `update_file`.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Output string`

          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseInputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseInputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

          The unique ID of the approval response

        - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseInputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

          - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

          - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

      - `type BetaResponseCustomToolCallOutput struct{…}`

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

        - `CallID string`

          The call ID, used to map this custom tool call output to a custom tool call.

        - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          The type of the custom tool call output. Always `custom_tool_call_output`.

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

          The unique ID of the custom tool call output in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

          An identifier used to map this custom tool call to a tool call output.

        - `Input string`

          The input for the custom tool call generated by the model.

        - `Name string`

          The name of the custom tool being called.

        - `Type CustomToolCall`

          The type of the custom tool call. Always `custom_tool_call`.

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

          The unique ID of the custom tool call in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the custom tool being called.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

        - `Type CompactionTrigger`

          The type of the item. Always `compaction_trigger`.

          - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

        - `Agent BetaResponseInputItemCompactionTriggerAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Agent BetaResponseInputItemItemReferenceAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

      - `type BetaResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseInputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output.

          - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

          - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseInputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

  - `Instructions param.Field[string]`

    Body param: A system (or developer) message inserted into the model's context.
    When used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

  - `PreviousResponseID param.Field[string]`

    Body param: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

  - `PromptCacheKey param.Field[string]`

    Body param: A key to use when reading from or writing to the prompt cache.

  - `PromptCacheOptions param.Field[BetaResponseCompactParamsPromptCacheOptions]`

    Body param: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details.

    - `Mode string`

      Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.

      - `const BetaResponseCompactParamsPromptCacheOptionsModeImplicit BetaResponseCompactParamsPromptCacheOptionsMode = "implicit"`

      - `const BetaResponseCompactParamsPromptCacheOptionsModeExplicit BetaResponseCompactParamsPromptCacheOptionsMode = "explicit"`

    - `Ttl string`

      The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.

      - `const BetaResponseCompactParamsPromptCacheOptionsTtl30m BetaResponseCompactParamsPromptCacheOptionsTtl = "30m"`

  - `PromptCacheRetention param.Field[BetaResponseCompactParamsPromptCacheRetention]`

    Body param: How long to retain a prompt cache entry created by this request.

    - `const BetaResponseCompactParamsPromptCacheRetentionInMemory BetaResponseCompactParamsPromptCacheRetention = "in_memory"`

    - `const BetaResponseCompactParamsPromptCacheRetention24h BetaResponseCompactParamsPromptCacheRetention = "24h"`

  - `ServiceTier param.Field[BetaResponseCompactParamsServiceTier]`

    Body param: The service tier to use for this request.

    - `const BetaResponseCompactParamsServiceTierAuto BetaResponseCompactParamsServiceTier = "auto"`

    - `const BetaResponseCompactParamsServiceTierDefault BetaResponseCompactParamsServiceTier = "default"`

    - `const BetaResponseCompactParamsServiceTierFlex BetaResponseCompactParamsServiceTier = "flex"`

    - `const BetaResponseCompactParamsServiceTierPriority BetaResponseCompactParamsServiceTier = "priority"`

  - `Betas param.Field[[]string]`

    Header param: Optional beta features to enable for this request.

    - `const BetaResponseCompactParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseCompactParamsOpenAIBeta = "responses_multi_agent=v1"`

### Returns

- `type BetaCompactedResponse struct{…}`

  - `ID string`

    The unique identifier for the compacted response.

  - `CreatedAt int64`

    Unix timestamp (in seconds) when the compacted conversation was created.

  - `Object ResponseCompaction`

    The object type. Always `response.compaction`.

    - `const ResponseCompactionResponseCompaction ResponseCompaction = "response.compaction"`

  - `Output []BetaResponseOutputItemUnion`

    The compacted list of output items. This is a list of all user messages, followed by a single compaction item.

    - `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.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

            - `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`.

                - `const FileCitationFileCitation FileCitation = "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`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the web resource.

            - `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`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []BetaResponseOutputTextLogprob`

            - `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`.

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        The role of the output message. Always `assistant`.

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status BetaResponseOutputMessageStatus`

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

        - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

        - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

        - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        The type of the output message. Always `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseOutputMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Phase BetaResponseOutputMessagePhase`

        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.

        - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

        - `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`.

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Agent BetaResponseFileSearchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Results []BetaResponseFileSearchToolCallResult`

        The results of the file search tool call.

        - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

          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.

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

          The unique ID of the file.

        - `Filename string`

          The name of the file.

        - `Score float64`

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

        - `Text string`

          The text that was retrieved from the file.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

        - `const FunctionCallFunctionCall FunctionCall = "function_call"`

      - `ID string`

        The unique ID of the function tool call.

      - `Agent BetaResponseFunctionToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the function to run.

      - `Status BetaResponseFunctionToolCallStatus`

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

        - `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.

      - `CallID string`

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

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

          - `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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `Detail BetaResponseInputImageDetail`

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

              - `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`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `FileID string`

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

            - `ImageURL string`

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

            - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileDetail`

              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`.

              - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

              - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

              - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

            - `FileData string`

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

            - `FileID string`

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

            - `FileURL string`

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

            - `Filename string`

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

            - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

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

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

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

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `ID string`

        The unique ID of the web search tool call.

      - `Action BetaResponseFunctionWebSearchActionUnion`

        An object describing the specific action taken in this web search call.
        Includes details on how the model used the web (search, open_page, find_in_page).

        - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

          Action type "search" - Performs a web search query.

          - `Type Search`

            The action type.

            - `const SearchSearch Search = "search"`

          - `Queries []string`

            The search queries.

          - `Query string`

            The search query.

          - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

            The sources used in the search.

            - `Type URL`

              The type of source. Always `url`.

              - `const URLURL URL = "url"`

            - `URL string`

              The URL of the source.

        - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

          Action type "open_page" - Opens a specific URL from search results.

          - `Type OpenPage`

            The action type.

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

            The URL opened by the model.

        - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

          Action type "find_in_page": Searches for a pattern within a loaded page.

          - `Pattern string`

            The pattern or text to search for within the page.

          - `Type FindInPage`

            The action type.

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

            The URL of the page searched for the pattern.

      - `Status BetaResponseFunctionWebSearchStatus`

        The status of the web search tool call.

        - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

        - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

        - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

        - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        The type of the web search tool call. Always `web_search_call`.

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `Agent BetaResponseFunctionWebSearchAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

          The type of the pending safety check.

        - `Message string`

          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.

        - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

        - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

        - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

      - `Type BetaResponseComputerToolCallType`

        The type of the computer call. Always `computer_call`.

        - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

      - `Action BetaComputerActionUnion`

        A click action.

        - `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`.

            - `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`.

            - `const ClickClick Click = "click"`

          - `X int64`

            The x-coordinate where the click occurred.

          - `Y int64`

            The y-coordinate where the click occurred.

          - `Keys []string`

            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`.

            - `const DoubleClickDoubleClick DoubleClick = "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`.

            - `const DragDrag Drag = "drag"`

          - `Keys []string`

            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`.

            - `const KeypressKeypress Keypress = "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`.

            - `const MoveMove Move = "move"`

          - `X int64`

            The x-coordinate to move to.

          - `Y int64`

            The y-coordinate to move to.

          - `Keys []string`

            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`.

            - `const ScreenshotScreenshot Screenshot = "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`.

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

            The x-coordinate where the scroll occurred.

          - `Y int64`

            The y-coordinate where the scroll occurred.

          - `Keys []string`

            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`.

            - `const TypeType Type = "type"`

        - `type BetaComputerActionWait struct{…}`

          A wait action.

          - `Type Wait`

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

            - `const WaitWait Wait = "wait"`

      - `Actions BetaComputerActionList`

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

        - `type BetaComputerActionClick struct{…}`

          A click action.

        - `type BetaComputerActionDoubleClick struct{…}`

          A double click action.

        - `type BetaComputerActionDrag struct{…}`

          A drag action.

        - `type BetaComputerActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

        - `type BetaComputerActionMove struct{…}`

          A mouse move action.

        - `type BetaComputerActionScreenshot struct{…}`

          A screenshot action.

        - `type BetaComputerActionScroll struct{…}`

          A scroll action.

        - `type BetaComputerActionType struct{…}`

          An action to type in text.

        - `type BetaComputerActionWait struct{…}`

          A wait action.

      - `Agent BetaResponseComputerToolCallAgent`

        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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        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`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

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

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

      - `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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        The type of the object. Always `reasoning`.

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Agent BetaResponseReasoningItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Content []BetaResponseReasoningItemContent`

        Reasoning text content.

        - `Text string`

          The reasoning text from the model.

        - `Type ReasoningText`

          The type of the reasoning text. Always `reasoning_text`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

        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.

      - `Status BetaResponseReasoningItemStatus`

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

        - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

        - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

        - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `Name string`

            The name of the function to call.

          - `Parameters map[string, any]`

            A JSON schema object describing the parameters of the function.

          - `Strict bool`

            Whether strict parameter validation is enforced for this function tool.

          - `Type Function`

            The type of the function tool. Always `function`.

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

            - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function is deferred and loaded via tool search.

          - `Description string`

            A description of the function. Used by the model to determine whether or not to call the function.

          - `OutputSchema map[string, any]`

            A JSON schema object describing the JSON value encoded in string outputs for this function.

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `Type FileSearch`

            The type of the file search tool. Always `file_search`.

            - `const FileSearchFileSearch FileSearch = "file_search"`

          - `VectorStoreIDs []string`

            The IDs of the vector stores to search.

          - `Filters BetaFileSearchToolFiltersUnion`

            A filter to apply.

            - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

            - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

              Combine multiple filters using `and` or `or`.

              - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

              - `Type string`

                Type of operation: `and` or `or`.

                - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

          - `MaxNumResults int64`

            The maximum number of results to return. This number should be between 1 and 50 inclusive.

          - `RankingOptions BetaFileSearchToolRankingOptions`

            Ranking options for search.

            - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

              - `EmbeddingWeight float64`

                The weight of the embedding in the reciprocal ranking fusion.

              - `TextWeight float64`

                The weight of the text in the reciprocal ranking fusion.

            - `Ranker string`

              The ranker to use for the file search.

              - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

              - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

            - `ScoreThreshold float64`

              The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `Type Computer`

            The type of the computer tool. Always `computer`.

            - `const ComputerComputer Computer = "computer"`

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `DisplayHeight int64`

            The height of the computer display.

          - `DisplayWidth int64`

            The width of the computer display.

          - `Environment BetaComputerUsePreviewToolEnvironment`

            The type of computer environment to control.

            - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

            - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

            - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

            - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

            - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

          - `Type ComputerUsePreview`

            The type of the computer use tool. Always `computer_use_preview`.

            - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchToolType`

            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

            - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

            - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

          - `Filters BetaWebSearchToolFilters`

            Filters for the search.

            - `AllowedDomains []string`

              Allowed domains for the search. If not provided, all domains are allowed.
              Subdomains of the provided domains are allowed as well.

              Example: `["pubmed.ncbi.nlm.nih.gov"]`

          - `SearchContextSize BetaWebSearchToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

            - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

            - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchToolUserLocation`

            The approximate location of the user.

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `Type string`

              The type of location approximation. Always `approximate`.

              - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `ServerLabel string`

            A label for this MCP server, used to identify it in tool calls.

          - `Type Mcp`

            The type of the MCP tool. Always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

            - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

          - `AllowedTools BetaToolMcpAllowedToolsUnion`

            List of allowed tool names or a filter object.

            - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

              A string array of allowed tool names

            - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `Authorization string`

            An OAuth access token that can be used with a remote MCP server, either
            with a custom MCP server URL or a service connector. Your application
            must handle the OAuth authorization flow and provide the token here.

          - `ConnectorID string`

            Identifier for service connectors, like those available in ChatGPT. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
            about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

            Currently supported `connector_id` values are:

            - Dropbox: `connector_dropbox`
            - Gmail: `connector_gmail`
            - Google Calendar: `connector_googlecalendar`
            - Google Drive: `connector_googledrive`
            - Microsoft Teams: `connector_microsoftteams`
            - Outlook Calendar: `connector_outlookcalendar`
            - Outlook Email: `connector_outlookemail`
            - SharePoint: `connector_sharepoint`

            - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

            - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

            - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

            - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

            - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

            - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

            - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

            - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

          - `DeferLoading bool`

            Whether this MCP tool is deferred and discovered via tool search.

          - `Headers map[string, string]`

            Optional HTTP headers to send to the MCP server. Use for authentication
            or other purposes.

          - `RequireApproval BetaToolMcpRequireApprovalUnion`

            Specify which of the MCP server's tools require approval.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

              Specify which of the MCP server's tools require approval. Can be
              `always`, `never`, or a filter object associated with tools
              that require approval.

              - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

              - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

              Specify a single approval policy for all tools. One of `always` or
              `never`. When set to `always`, all tools will require approval. When
              set to `never`, all tools will not require approval.

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

          - `ServerDescription string`

            Optional description of the MCP server, used to provide more context.

          - `ServerURL string`

            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.

          - `TunnelID string`

            The Secure MCP Tunnel ID to use instead of a direct server URL. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided.

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

          - `Container BetaToolCodeInterpreterContainerUnion`

            The code interpreter container. Can be a container ID or an object that
            specifies uploaded file IDs to make available to your code, along with an
            optional `memory_limit` setting.

            - `string`

            - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

              - `Type Auto`

                Always `auto`.

                - `const AutoAuto Auto = "auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit string`

                The memory limit for the code interpreter container.

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `Type Disabled`

                    Disable outbound network access. Always `disabled`.

                    - `const DisabledDisabled Disabled = "disabled"`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `AllowedDomains []string`

                    A list of allowed domains when type is `allowlist`.

                  - `Type Allowlist`

                    Allow outbound network access only to specified domains. Always `allowlist`.

                    - `const AllowlistAllowlist Allowlist = "allowlist"`

                  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                    Optional domain-scoped secrets for allowlisted domains.

                    - `Domain string`

                      The domain associated with the secret.

                    - `Name string`

                      The name of the secret to inject for the domain.

                    - `Value string`

                      The secret value to inject for the domain.

          - `Type CodeInterpreter`

            The type of the code interpreter tool. Always `code_interpreter`.

            - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

            - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

        - `type BetaToolProgrammaticToolCalling struct{…}`

          - `Type ProgrammaticToolCalling`

            The type of the tool. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

          - `Type ImageGeneration`

            The type of the image generation tool. Always `image_generation`.

            - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

          - `Action string`

            Whether to generate a new image or edit an existing image. Default: `auto`.

            - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

            - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

            - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

          - `Background string`

            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for GPT image models that support
            transparent backgrounds. Must be one of `transparent`, `opaque`, or
            `auto` (default value). When `auto` is used, the model will
            automatically determine the best background for the image.

            `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
            transparent backgrounds. Requests with `background` set to
            `transparent` will return an error for these models; use `opaque` or
            `auto` instead.

            If `transparent`, the output format needs to support transparency,
            so it should be set to either `png` (default value) or `webp`.

            - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

            - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

            - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

          - `InputFidelity string`

            Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

            - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

            - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

          - `InputImageMask BetaToolImageGenerationInputImageMask`

            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).

            - `FileID string`

              File ID for the mask image.

            - `ImageURL string`

              Base64-encoded mask image.

          - `Model string`

            The image generation model to use. Default: `gpt-image-1`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

              - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

              - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

              - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

              - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

              - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

          - `Moderation string`

            Moderation level for the generated image. Default: `auto`.

            - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

            - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

          - `OutputCompression int64`

            Compression level for the output image. Default: 100.

          - `OutputFormat string`

            The output format of the generated image. One of `png`, `webp`, or
            `jpeg`. Default: `png`.

            - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

            - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

            - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

          - `PartialImages int64`

            Number of partial images to generate in streaming mode, from 0 (default value) to 3.

          - `Quality string`

            The quality of the generated image. One of `low`, `medium`, `high`,
            or `auto`. Default: `auto`.

            - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

            - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

            - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

            - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

          - `Size string`

            The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

              - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

              - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

              - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

          - `Type LocalShell`

            The type of the local shell tool. Always `local_shell`.

            - `const LocalShellLocalShell LocalShell = "local_shell"`

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

          - `Type Shell`

            The type of the shell tool. Always `shell`.

            - `const ShellShell Shell = "shell"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

            - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

          - `Environment BetaFunctionShellToolEnvironmentUnion`

            - `type BetaContainerAuto struct{…}`

              - `Type ContainerAuto`

                Automatically creates a container for this request

                - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit BetaContainerAutoMemoryLimit`

                The memory limit for the container.

                - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `Skills []BetaContainerAutoSkillUnion`

                An optional list of skills referenced by id or inline data.

                - `type BetaSkillReference struct{…}`

                  - `SkillID string`

                    The ID of the referenced skill.

                  - `Type SkillReference`

                    References a skill created with the /v1/skills endpoint.

                    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                  - `Version string`

                    Optional skill version. Use a positive integer or 'latest'. Omit for default.

                - `type BetaInlineSkill struct{…}`

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Source BetaInlineSkillSource`

                    Inline skill payload

                    - `Data string`

                      Base64-encoded skill zip bundle.

                    - `MediaType ApplicationZip`

                      The media type of the inline skill payload. Must be `application/zip`.

                      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                    - `Type Base64`

                      The type of the inline skill source. Must be `base64`.

                      - `const Base64Base64 Base64 = "base64"`

                  - `Type Inline`

                    Defines an inline skill for this request.

                    - `const InlineInline Inline = "inline"`

            - `type BetaLocalEnvironment struct{…}`

              - `Type Local`

                Use a local computer environment.

                - `const LocalLocal Local = "local"`

              - `Skills []BetaLocalSkill`

                An optional list of skills.

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Path string`

                  The path to the directory containing the skill.

            - `type BetaContainerReference struct{…}`

              - `ContainerID string`

                The ID of the referenced container.

              - `Type ContainerReference`

                References a container created with the /v1/containers endpoint

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Name string`

            The name of the custom tool, used to identify it in tool calls.

          - `Type Custom`

            The type of the custom tool. Always `custom`.

            - `const CustomCustom Custom = "custom"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

            - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this tool should be deferred and discovered via tool search.

          - `Description string`

            Optional description of the custom tool, used to provide more context.

          - `Format BetaCustomToolFormatUnion`

            The input format for the custom tool. Default is unconstrained text.

            - `type BetaCustomToolFormatText struct{…}`

              Unconstrained free-form text.

              - `Type Text`

                Unconstrained text format. Always `text`.

                - `const TextText Text = "text"`

            - `type BetaCustomToolFormatGrammar struct{…}`

              A grammar defined by the user.

              - `Definition string`

                The grammar definition.

              - `Syntax string`

                The syntax of the grammar definition. One of `lark` or `regex`.

                - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

              - `Type Grammar`

                Grammar format. Always `grammar`.

                - `const GrammarGrammar Grammar = "grammar"`

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

          - `Description string`

            A description of the namespace shown to the model.

          - `Name string`

            The namespace name used in tool calls (for example, `crm`).

          - `Tools []BetaNamespaceToolToolUnion`

            The function/custom tools available inside this namespace.

            - `type BetaNamespaceToolToolFunction struct{…}`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function should be deferred and discovered via tool search.

              - `Description string`

              - `OutputSchema map[string, any]`

                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

              - `Parameters any`

              - `Strict bool`

                Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Type Namespace`

            The type of the tool. Always `namespace`.

            - `const NamespaceNamespace Namespace = "namespace"`

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

          - `Type ToolSearch`

            The type of the tool. Always `tool_search`.

            - `const ToolSearchToolSearch ToolSearch = "tool_search"`

          - `Description string`

            Description shown to the model for a client-executed tool search tool.

          - `Execution BetaToolSearchToolExecution`

            Whether tool search is executed by the server or by the client.

            - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

            - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

          - `Parameters any`

            Parameter schema for a client-executed tool search tool.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchPreviewToolType`

            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

          - `SearchContentTypes []string`

            - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

            - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

          - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

            - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

            - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchPreviewToolUserLocation`

            The user's location.

            - `Type Approximate`

              The type of location approximation. Always `approximate`.

              - `const ApproximateApproximate Approximate = "approximate"`

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ApplyPatch`

            The type of the tool. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

            - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

        The unique ID of the code interpreter tool call.

      - `Code string`

        The code to run, or null if not available.

      - `ContainerID string`

        The ID of the container used to run the code.

      - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

        The outputs generated by the code interpreter, such as logs or images.
        Can be null if no outputs are available.

        - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

            The logs output from the code interpreter.

          - `Type Logs`

            The type of the output. Always `logs`.

            - `const LogsLogs Logs = "logs"`

        - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            The type of the output. Always `image`.

            - `const ImageImage Image = "image"`

          - `URL string`

            The URL of the image output from the code interpreter.

      - `Status BetaResponseCodeInterpreterToolCallStatus`

        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

        - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

        - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        The type of the code interpreter tool call. Always `code_interpreter_call`.

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Agent BetaResponseCodeInterpreterToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

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

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

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

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

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

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

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

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `type BetaResponseCustomToolCall struct{…}`

      A call to a custom tool created by the model.

      - `CallID string`

        An identifier used to map this custom tool call to a tool call output.

      - `Input string`

        The input for the custom tool call generated by the model.

      - `Name string`

        The name of the custom tool being called.

      - `Type CustomToolCall`

        The type of the custom tool call. Always `custom_tool_call`.

        - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

      - `ID string`

        The unique ID of the custom tool call in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the custom tool being called.

    - `type BetaResponseCustomToolCallOutputItem struct{…}`

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

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

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

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `Usage BetaResponseUsage`

    Token accounting for the compaction pass, including cached, reasoning, and total tokens.

    - `InputTokens int64`

      The number of input tokens.

    - `InputTokensDetails BetaResponseUsageInputTokensDetails`

      A detailed breakdown of the input tokens.

      - `CacheWriteTokens int64`

        The number of input tokens that were written to the cache.

      - `CachedTokens int64`

        The number of tokens that were retrieved from the cache.
        [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

    - `OutputTokens int64`

      The number of output tokens.

    - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

      A detailed breakdown of the output tokens.

      - `ReasoningTokens int64`

        The number of reasoning tokens.

    - `TotalTokens int64`

      The total number of tokens used.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  betaCompactedResponse, err := client.Beta.Responses.Compact(context.TODO(), openai.BetaResponseCompactParams{
    Model: openai.BetaResponseCompactParamsModelGPT5_6Sol,
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", betaCompactedResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "created_at": 0,
  "object": "response.compaction",
  "output": [
    {
      "id": "id",
      "content": [
        {
          "annotations": [
            {
              "file_id": "file_id",
              "filename": "filename",
              "index": 0,
              "type": "file_citation"
            }
          ],
          "text": "text",
          "type": "output_text",
          "logprobs": [
            {
              "token": "token",
              "bytes": [
                0
              ],
              "logprob": 0,
              "top_logprobs": [
                {
                  "token": "token",
                  "bytes": [
                    0
                  ],
                  "logprob": 0
                }
              ]
            }
          ]
        }
      ],
      "role": "assistant",
      "status": "in_progress",
      "type": "message",
      "agent": {
        "agent_name": "agent_name"
      },
      "phase": "commentary"
    }
  ],
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  }
}
```

## Domain Types

### Beta Apply Patch Tool

- `type BetaApplyPatchTool struct{…}`

  Allows the assistant to create, delete, or update files using unified diffs.

  - `Type ApplyPatch`

    The type of the tool. Always `apply_patch`.

    - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

  - `AllowedCallers []string`

    The tool invocation context(s).

    - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

    - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

### Beta Compacted Response

- `type BetaCompactedResponse struct{…}`

  - `ID string`

    The unique identifier for the compacted response.

  - `CreatedAt int64`

    Unix timestamp (in seconds) when the compacted conversation was created.

  - `Object ResponseCompaction`

    The object type. Always `response.compaction`.

    - `const ResponseCompactionResponseCompaction ResponseCompaction = "response.compaction"`

  - `Output []BetaResponseOutputItemUnion`

    The compacted list of output items. This is a list of all user messages, followed by a single compaction item.

    - `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.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

            - `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`.

                - `const FileCitationFileCitation FileCitation = "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`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the web resource.

            - `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`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []BetaResponseOutputTextLogprob`

            - `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`.

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        The role of the output message. Always `assistant`.

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status BetaResponseOutputMessageStatus`

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

        - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

        - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

        - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        The type of the output message. Always `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseOutputMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Phase BetaResponseOutputMessagePhase`

        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.

        - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

        - `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`.

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Agent BetaResponseFileSearchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Results []BetaResponseFileSearchToolCallResult`

        The results of the file search tool call.

        - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

          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.

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

          The unique ID of the file.

        - `Filename string`

          The name of the file.

        - `Score float64`

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

        - `Text string`

          The text that was retrieved from the file.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

        - `const FunctionCallFunctionCall FunctionCall = "function_call"`

      - `ID string`

        The unique ID of the function tool call.

      - `Agent BetaResponseFunctionToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the function to run.

      - `Status BetaResponseFunctionToolCallStatus`

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

        - `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.

      - `CallID string`

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

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

          - `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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `Detail BetaResponseInputImageDetail`

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

              - `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`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `FileID string`

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

            - `ImageURL string`

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

            - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileDetail`

              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`.

              - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

              - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

              - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

            - `FileData string`

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

            - `FileID string`

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

            - `FileURL string`

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

            - `Filename string`

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

            - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

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

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

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

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `ID string`

        The unique ID of the web search tool call.

      - `Action BetaResponseFunctionWebSearchActionUnion`

        An object describing the specific action taken in this web search call.
        Includes details on how the model used the web (search, open_page, find_in_page).

        - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

          Action type "search" - Performs a web search query.

          - `Type Search`

            The action type.

            - `const SearchSearch Search = "search"`

          - `Queries []string`

            The search queries.

          - `Query string`

            The search query.

          - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

            The sources used in the search.

            - `Type URL`

              The type of source. Always `url`.

              - `const URLURL URL = "url"`

            - `URL string`

              The URL of the source.

        - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

          Action type "open_page" - Opens a specific URL from search results.

          - `Type OpenPage`

            The action type.

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

            The URL opened by the model.

        - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

          Action type "find_in_page": Searches for a pattern within a loaded page.

          - `Pattern string`

            The pattern or text to search for within the page.

          - `Type FindInPage`

            The action type.

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

            The URL of the page searched for the pattern.

      - `Status BetaResponseFunctionWebSearchStatus`

        The status of the web search tool call.

        - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

        - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

        - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

        - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        The type of the web search tool call. Always `web_search_call`.

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `Agent BetaResponseFunctionWebSearchAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

          The type of the pending safety check.

        - `Message string`

          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.

        - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

        - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

        - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

      - `Type BetaResponseComputerToolCallType`

        The type of the computer call. Always `computer_call`.

        - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

      - `Action BetaComputerActionUnion`

        A click action.

        - `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`.

            - `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`.

            - `const ClickClick Click = "click"`

          - `X int64`

            The x-coordinate where the click occurred.

          - `Y int64`

            The y-coordinate where the click occurred.

          - `Keys []string`

            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`.

            - `const DoubleClickDoubleClick DoubleClick = "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`.

            - `const DragDrag Drag = "drag"`

          - `Keys []string`

            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`.

            - `const KeypressKeypress Keypress = "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`.

            - `const MoveMove Move = "move"`

          - `X int64`

            The x-coordinate to move to.

          - `Y int64`

            The y-coordinate to move to.

          - `Keys []string`

            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`.

            - `const ScreenshotScreenshot Screenshot = "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`.

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

            The x-coordinate where the scroll occurred.

          - `Y int64`

            The y-coordinate where the scroll occurred.

          - `Keys []string`

            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`.

            - `const TypeType Type = "type"`

        - `type BetaComputerActionWait struct{…}`

          A wait action.

          - `Type Wait`

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

            - `const WaitWait Wait = "wait"`

      - `Actions BetaComputerActionList`

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

        - `type BetaComputerActionClick struct{…}`

          A click action.

        - `type BetaComputerActionDoubleClick struct{…}`

          A double click action.

        - `type BetaComputerActionDrag struct{…}`

          A drag action.

        - `type BetaComputerActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

        - `type BetaComputerActionMove struct{…}`

          A mouse move action.

        - `type BetaComputerActionScreenshot struct{…}`

          A screenshot action.

        - `type BetaComputerActionScroll struct{…}`

          A scroll action.

        - `type BetaComputerActionType struct{…}`

          An action to type in text.

        - `type BetaComputerActionWait struct{…}`

          A wait action.

      - `Agent BetaResponseComputerToolCallAgent`

        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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        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`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

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

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

      - `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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        The type of the object. Always `reasoning`.

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Agent BetaResponseReasoningItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Content []BetaResponseReasoningItemContent`

        Reasoning text content.

        - `Text string`

          The reasoning text from the model.

        - `Type ReasoningText`

          The type of the reasoning text. Always `reasoning_text`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

        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.

      - `Status BetaResponseReasoningItemStatus`

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

        - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

        - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

        - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `Name string`

            The name of the function to call.

          - `Parameters map[string, any]`

            A JSON schema object describing the parameters of the function.

          - `Strict bool`

            Whether strict parameter validation is enforced for this function tool.

          - `Type Function`

            The type of the function tool. Always `function`.

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

            - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function is deferred and loaded via tool search.

          - `Description string`

            A description of the function. Used by the model to determine whether or not to call the function.

          - `OutputSchema map[string, any]`

            A JSON schema object describing the JSON value encoded in string outputs for this function.

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `Type FileSearch`

            The type of the file search tool. Always `file_search`.

            - `const FileSearchFileSearch FileSearch = "file_search"`

          - `VectorStoreIDs []string`

            The IDs of the vector stores to search.

          - `Filters BetaFileSearchToolFiltersUnion`

            A filter to apply.

            - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

            - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

              Combine multiple filters using `and` or `or`.

              - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

              - `Type string`

                Type of operation: `and` or `or`.

                - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

          - `MaxNumResults int64`

            The maximum number of results to return. This number should be between 1 and 50 inclusive.

          - `RankingOptions BetaFileSearchToolRankingOptions`

            Ranking options for search.

            - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

              - `EmbeddingWeight float64`

                The weight of the embedding in the reciprocal ranking fusion.

              - `TextWeight float64`

                The weight of the text in the reciprocal ranking fusion.

            - `Ranker string`

              The ranker to use for the file search.

              - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

              - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

            - `ScoreThreshold float64`

              The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `Type Computer`

            The type of the computer tool. Always `computer`.

            - `const ComputerComputer Computer = "computer"`

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `DisplayHeight int64`

            The height of the computer display.

          - `DisplayWidth int64`

            The width of the computer display.

          - `Environment BetaComputerUsePreviewToolEnvironment`

            The type of computer environment to control.

            - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

            - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

            - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

            - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

            - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

          - `Type ComputerUsePreview`

            The type of the computer use tool. Always `computer_use_preview`.

            - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchToolType`

            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

            - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

            - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

          - `Filters BetaWebSearchToolFilters`

            Filters for the search.

            - `AllowedDomains []string`

              Allowed domains for the search. If not provided, all domains are allowed.
              Subdomains of the provided domains are allowed as well.

              Example: `["pubmed.ncbi.nlm.nih.gov"]`

          - `SearchContextSize BetaWebSearchToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

            - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

            - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchToolUserLocation`

            The approximate location of the user.

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `Type string`

              The type of location approximation. Always `approximate`.

              - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `ServerLabel string`

            A label for this MCP server, used to identify it in tool calls.

          - `Type Mcp`

            The type of the MCP tool. Always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

            - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

          - `AllowedTools BetaToolMcpAllowedToolsUnion`

            List of allowed tool names or a filter object.

            - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

              A string array of allowed tool names

            - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `Authorization string`

            An OAuth access token that can be used with a remote MCP server, either
            with a custom MCP server URL or a service connector. Your application
            must handle the OAuth authorization flow and provide the token here.

          - `ConnectorID string`

            Identifier for service connectors, like those available in ChatGPT. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
            about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

            Currently supported `connector_id` values are:

            - Dropbox: `connector_dropbox`
            - Gmail: `connector_gmail`
            - Google Calendar: `connector_googlecalendar`
            - Google Drive: `connector_googledrive`
            - Microsoft Teams: `connector_microsoftteams`
            - Outlook Calendar: `connector_outlookcalendar`
            - Outlook Email: `connector_outlookemail`
            - SharePoint: `connector_sharepoint`

            - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

            - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

            - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

            - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

            - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

            - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

            - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

            - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

          - `DeferLoading bool`

            Whether this MCP tool is deferred and discovered via tool search.

          - `Headers map[string, string]`

            Optional HTTP headers to send to the MCP server. Use for authentication
            or other purposes.

          - `RequireApproval BetaToolMcpRequireApprovalUnion`

            Specify which of the MCP server's tools require approval.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

              Specify which of the MCP server's tools require approval. Can be
              `always`, `never`, or a filter object associated with tools
              that require approval.

              - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

              - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

              Specify a single approval policy for all tools. One of `always` or
              `never`. When set to `always`, all tools will require approval. When
              set to `never`, all tools will not require approval.

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

          - `ServerDescription string`

            Optional description of the MCP server, used to provide more context.

          - `ServerURL string`

            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.

          - `TunnelID string`

            The Secure MCP Tunnel ID to use instead of a direct server URL. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided.

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

          - `Container BetaToolCodeInterpreterContainerUnion`

            The code interpreter container. Can be a container ID or an object that
            specifies uploaded file IDs to make available to your code, along with an
            optional `memory_limit` setting.

            - `string`

            - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

              - `Type Auto`

                Always `auto`.

                - `const AutoAuto Auto = "auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit string`

                The memory limit for the code interpreter container.

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `Type Disabled`

                    Disable outbound network access. Always `disabled`.

                    - `const DisabledDisabled Disabled = "disabled"`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `AllowedDomains []string`

                    A list of allowed domains when type is `allowlist`.

                  - `Type Allowlist`

                    Allow outbound network access only to specified domains. Always `allowlist`.

                    - `const AllowlistAllowlist Allowlist = "allowlist"`

                  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                    Optional domain-scoped secrets for allowlisted domains.

                    - `Domain string`

                      The domain associated with the secret.

                    - `Name string`

                      The name of the secret to inject for the domain.

                    - `Value string`

                      The secret value to inject for the domain.

          - `Type CodeInterpreter`

            The type of the code interpreter tool. Always `code_interpreter`.

            - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

            - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

        - `type BetaToolProgrammaticToolCalling struct{…}`

          - `Type ProgrammaticToolCalling`

            The type of the tool. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

          - `Type ImageGeneration`

            The type of the image generation tool. Always `image_generation`.

            - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

          - `Action string`

            Whether to generate a new image or edit an existing image. Default: `auto`.

            - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

            - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

            - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

          - `Background string`

            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for GPT image models that support
            transparent backgrounds. Must be one of `transparent`, `opaque`, or
            `auto` (default value). When `auto` is used, the model will
            automatically determine the best background for the image.

            `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
            transparent backgrounds. Requests with `background` set to
            `transparent` will return an error for these models; use `opaque` or
            `auto` instead.

            If `transparent`, the output format needs to support transparency,
            so it should be set to either `png` (default value) or `webp`.

            - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

            - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

            - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

          - `InputFidelity string`

            Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

            - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

            - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

          - `InputImageMask BetaToolImageGenerationInputImageMask`

            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).

            - `FileID string`

              File ID for the mask image.

            - `ImageURL string`

              Base64-encoded mask image.

          - `Model string`

            The image generation model to use. Default: `gpt-image-1`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

              - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

              - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

              - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

              - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

              - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

          - `Moderation string`

            Moderation level for the generated image. Default: `auto`.

            - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

            - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

          - `OutputCompression int64`

            Compression level for the output image. Default: 100.

          - `OutputFormat string`

            The output format of the generated image. One of `png`, `webp`, or
            `jpeg`. Default: `png`.

            - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

            - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

            - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

          - `PartialImages int64`

            Number of partial images to generate in streaming mode, from 0 (default value) to 3.

          - `Quality string`

            The quality of the generated image. One of `low`, `medium`, `high`,
            or `auto`. Default: `auto`.

            - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

            - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

            - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

            - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

          - `Size string`

            The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

              - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

              - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

              - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

          - `Type LocalShell`

            The type of the local shell tool. Always `local_shell`.

            - `const LocalShellLocalShell LocalShell = "local_shell"`

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

          - `Type Shell`

            The type of the shell tool. Always `shell`.

            - `const ShellShell Shell = "shell"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

            - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

          - `Environment BetaFunctionShellToolEnvironmentUnion`

            - `type BetaContainerAuto struct{…}`

              - `Type ContainerAuto`

                Automatically creates a container for this request

                - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit BetaContainerAutoMemoryLimit`

                The memory limit for the container.

                - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `Skills []BetaContainerAutoSkillUnion`

                An optional list of skills referenced by id or inline data.

                - `type BetaSkillReference struct{…}`

                  - `SkillID string`

                    The ID of the referenced skill.

                  - `Type SkillReference`

                    References a skill created with the /v1/skills endpoint.

                    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                  - `Version string`

                    Optional skill version. Use a positive integer or 'latest'. Omit for default.

                - `type BetaInlineSkill struct{…}`

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Source BetaInlineSkillSource`

                    Inline skill payload

                    - `Data string`

                      Base64-encoded skill zip bundle.

                    - `MediaType ApplicationZip`

                      The media type of the inline skill payload. Must be `application/zip`.

                      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                    - `Type Base64`

                      The type of the inline skill source. Must be `base64`.

                      - `const Base64Base64 Base64 = "base64"`

                  - `Type Inline`

                    Defines an inline skill for this request.

                    - `const InlineInline Inline = "inline"`

            - `type BetaLocalEnvironment struct{…}`

              - `Type Local`

                Use a local computer environment.

                - `const LocalLocal Local = "local"`

              - `Skills []BetaLocalSkill`

                An optional list of skills.

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Path string`

                  The path to the directory containing the skill.

            - `type BetaContainerReference struct{…}`

              - `ContainerID string`

                The ID of the referenced container.

              - `Type ContainerReference`

                References a container created with the /v1/containers endpoint

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Name string`

            The name of the custom tool, used to identify it in tool calls.

          - `Type Custom`

            The type of the custom tool. Always `custom`.

            - `const CustomCustom Custom = "custom"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

            - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this tool should be deferred and discovered via tool search.

          - `Description string`

            Optional description of the custom tool, used to provide more context.

          - `Format BetaCustomToolFormatUnion`

            The input format for the custom tool. Default is unconstrained text.

            - `type BetaCustomToolFormatText struct{…}`

              Unconstrained free-form text.

              - `Type Text`

                Unconstrained text format. Always `text`.

                - `const TextText Text = "text"`

            - `type BetaCustomToolFormatGrammar struct{…}`

              A grammar defined by the user.

              - `Definition string`

                The grammar definition.

              - `Syntax string`

                The syntax of the grammar definition. One of `lark` or `regex`.

                - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

              - `Type Grammar`

                Grammar format. Always `grammar`.

                - `const GrammarGrammar Grammar = "grammar"`

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

          - `Description string`

            A description of the namespace shown to the model.

          - `Name string`

            The namespace name used in tool calls (for example, `crm`).

          - `Tools []BetaNamespaceToolToolUnion`

            The function/custom tools available inside this namespace.

            - `type BetaNamespaceToolToolFunction struct{…}`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function should be deferred and discovered via tool search.

              - `Description string`

              - `OutputSchema map[string, any]`

                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

              - `Parameters any`

              - `Strict bool`

                Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Type Namespace`

            The type of the tool. Always `namespace`.

            - `const NamespaceNamespace Namespace = "namespace"`

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

          - `Type ToolSearch`

            The type of the tool. Always `tool_search`.

            - `const ToolSearchToolSearch ToolSearch = "tool_search"`

          - `Description string`

            Description shown to the model for a client-executed tool search tool.

          - `Execution BetaToolSearchToolExecution`

            Whether tool search is executed by the server or by the client.

            - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

            - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

          - `Parameters any`

            Parameter schema for a client-executed tool search tool.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchPreviewToolType`

            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

          - `SearchContentTypes []string`

            - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

            - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

          - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

            - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

            - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchPreviewToolUserLocation`

            The user's location.

            - `Type Approximate`

              The type of location approximation. Always `approximate`.

              - `const ApproximateApproximate Approximate = "approximate"`

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ApplyPatch`

            The type of the tool. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

            - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

        The unique ID of the code interpreter tool call.

      - `Code string`

        The code to run, or null if not available.

      - `ContainerID string`

        The ID of the container used to run the code.

      - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

        The outputs generated by the code interpreter, such as logs or images.
        Can be null if no outputs are available.

        - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

            The logs output from the code interpreter.

          - `Type Logs`

            The type of the output. Always `logs`.

            - `const LogsLogs Logs = "logs"`

        - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            The type of the output. Always `image`.

            - `const ImageImage Image = "image"`

          - `URL string`

            The URL of the image output from the code interpreter.

      - `Status BetaResponseCodeInterpreterToolCallStatus`

        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

        - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

        - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        The type of the code interpreter tool call. Always `code_interpreter_call`.

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Agent BetaResponseCodeInterpreterToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

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

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

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

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

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

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

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

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `type BetaResponseCustomToolCall struct{…}`

      A call to a custom tool created by the model.

      - `CallID string`

        An identifier used to map this custom tool call to a tool call output.

      - `Input string`

        The input for the custom tool call generated by the model.

      - `Name string`

        The name of the custom tool being called.

      - `Type CustomToolCall`

        The type of the custom tool call. Always `custom_tool_call`.

        - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

      - `ID string`

        The unique ID of the custom tool call in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the custom tool being called.

    - `type BetaResponseCustomToolCallOutputItem struct{…}`

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

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

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

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `Usage BetaResponseUsage`

    Token accounting for the compaction pass, including cached, reasoning, and total tokens.

    - `InputTokens int64`

      The number of input tokens.

    - `InputTokensDetails BetaResponseUsageInputTokensDetails`

      A detailed breakdown of the input tokens.

      - `CacheWriteTokens int64`

        The number of input tokens that were written to the cache.

      - `CachedTokens int64`

        The number of tokens that were retrieved from the cache.
        [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

    - `OutputTokens int64`

      The number of output tokens.

    - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

      A detailed breakdown of the output tokens.

      - `ReasoningTokens int64`

        The number of reasoning tokens.

    - `TotalTokens int64`

      The total number of tokens used.

### Beta Computer Action

- `type BetaComputerActionUnion interface{…}`

  A click action.

  - `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`.

      - `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`.

      - `const ClickClick Click = "click"`

    - `X int64`

      The x-coordinate where the click occurred.

    - `Y int64`

      The y-coordinate where the click occurred.

    - `Keys []string`

      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`.

      - `const DoubleClickDoubleClick DoubleClick = "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`.

      - `const DragDrag Drag = "drag"`

    - `Keys []string`

      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`.

      - `const KeypressKeypress Keypress = "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`.

      - `const MoveMove Move = "move"`

    - `X int64`

      The x-coordinate to move to.

    - `Y int64`

      The y-coordinate to move to.

    - `Keys []string`

      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`.

      - `const ScreenshotScreenshot Screenshot = "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`.

      - `const ScrollScroll Scroll = "scroll"`

    - `X int64`

      The x-coordinate where the scroll occurred.

    - `Y int64`

      The y-coordinate where the scroll occurred.

    - `Keys []string`

      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`.

      - `const TypeType Type = "type"`

  - `type BetaComputerActionWait struct{…}`

    A wait action.

    - `Type Wait`

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

      - `const WaitWait Wait = "wait"`

### Beta Computer Action List

- `type BetaComputerActionList []BetaComputerActionUnion`

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

  - `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`.

      - `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`.

      - `const ClickClick Click = "click"`

    - `X int64`

      The x-coordinate where the click occurred.

    - `Y int64`

      The y-coordinate where the click occurred.

    - `Keys []string`

      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`.

      - `const DoubleClickDoubleClick DoubleClick = "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`.

      - `const DragDrag Drag = "drag"`

    - `Keys []string`

      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`.

      - `const KeypressKeypress Keypress = "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`.

      - `const MoveMove Move = "move"`

    - `X int64`

      The x-coordinate to move to.

    - `Y int64`

      The y-coordinate to move to.

    - `Keys []string`

      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`.

      - `const ScreenshotScreenshot Screenshot = "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`.

      - `const ScrollScroll Scroll = "scroll"`

    - `X int64`

      The x-coordinate where the scroll occurred.

    - `Y int64`

      The y-coordinate where the scroll occurred.

    - `Keys []string`

      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`.

      - `const TypeType Type = "type"`

  - `type BetaComputerActionWait struct{…}`

    A wait action.

    - `Type Wait`

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

      - `const WaitWait Wait = "wait"`

### Beta Computer Tool

- `type BetaComputerTool struct{…}`

  A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

  - `Type Computer`

    The type of the computer tool. Always `computer`.

    - `const ComputerComputer Computer = "computer"`

### Beta Computer Use Preview Tool

- `type BetaComputerUsePreviewTool struct{…}`

  A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

  - `DisplayHeight int64`

    The height of the computer display.

  - `DisplayWidth int64`

    The width of the computer display.

  - `Environment BetaComputerUsePreviewToolEnvironment`

    The type of computer environment to control.

    - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

    - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

    - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

    - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

    - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

  - `Type ComputerUsePreview`

    The type of the computer use tool. Always `computer_use_preview`.

    - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

### Beta Container Auto

- `type BetaContainerAuto struct{…}`

  - `Type ContainerAuto`

    Automatically creates a container for this request

    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

  - `FileIDs []string`

    An optional list of uploaded files to make available to your code.

  - `MemoryLimit BetaContainerAutoMemoryLimit`

    The memory limit for the container.

    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

    Network access policy for the container.

    - `type BetaContainerNetworkPolicyDisabled struct{…}`

      - `Type Disabled`

        Disable outbound network access. Always `disabled`.

        - `const DisabledDisabled Disabled = "disabled"`

    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

      - `AllowedDomains []string`

        A list of allowed domains when type is `allowlist`.

      - `Type Allowlist`

        Allow outbound network access only to specified domains. Always `allowlist`.

        - `const AllowlistAllowlist Allowlist = "allowlist"`

      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

        Optional domain-scoped secrets for allowlisted domains.

        - `Domain string`

          The domain associated with the secret.

        - `Name string`

          The name of the secret to inject for the domain.

        - `Value string`

          The secret value to inject for the domain.

  - `Skills []BetaContainerAutoSkillUnion`

    An optional list of skills referenced by id or inline data.

    - `type BetaSkillReference struct{…}`

      - `SkillID string`

        The ID of the referenced skill.

      - `Type SkillReference`

        References a skill created with the /v1/skills endpoint.

        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

      - `Version string`

        Optional skill version. Use a positive integer or 'latest'. Omit for default.

    - `type BetaInlineSkill struct{…}`

      - `Description string`

        The description of the skill.

      - `Name string`

        The name of the skill.

      - `Source BetaInlineSkillSource`

        Inline skill payload

        - `Data string`

          Base64-encoded skill zip bundle.

        - `MediaType ApplicationZip`

          The media type of the inline skill payload. Must be `application/zip`.

          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

        - `Type Base64`

          The type of the inline skill source. Must be `base64`.

          - `const Base64Base64 Base64 = "base64"`

      - `Type Inline`

        Defines an inline skill for this request.

        - `const InlineInline Inline = "inline"`

### Beta Container Network Policy Allowlist

- `type BetaContainerNetworkPolicyAllowlist struct{…}`

  - `AllowedDomains []string`

    A list of allowed domains when type is `allowlist`.

  - `Type Allowlist`

    Allow outbound network access only to specified domains. Always `allowlist`.

    - `const AllowlistAllowlist Allowlist = "allowlist"`

  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

    Optional domain-scoped secrets for allowlisted domains.

    - `Domain string`

      The domain associated with the secret.

    - `Name string`

      The name of the secret to inject for the domain.

    - `Value string`

      The secret value to inject for the domain.

### Beta Container Network Policy Disabled

- `type BetaContainerNetworkPolicyDisabled struct{…}`

  - `Type Disabled`

    Disable outbound network access. Always `disabled`.

    - `const DisabledDisabled Disabled = "disabled"`

### Beta Container Network Policy Domain Secret

- `type BetaContainerNetworkPolicyDomainSecret struct{…}`

  - `Domain string`

    The domain associated with the secret.

  - `Name string`

    The name of the secret to inject for the domain.

  - `Value string`

    The secret value to inject for the domain.

### Beta Container Reference

- `type BetaContainerReference struct{…}`

  - `ContainerID string`

    The ID of the referenced container.

  - `Type ContainerReference`

    References a container created with the /v1/containers endpoint

    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

### Beta Custom Tool

- `type BetaCustomTool struct{…}`

  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

  - `Name string`

    The name of the custom tool, used to identify it in tool calls.

  - `Type Custom`

    The type of the custom tool. Always `custom`.

    - `const CustomCustom Custom = "custom"`

  - `AllowedCallers []string`

    The tool invocation context(s).

    - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

    - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

  - `DeferLoading bool`

    Whether this tool should be deferred and discovered via tool search.

  - `Description string`

    Optional description of the custom tool, used to provide more context.

  - `Format BetaCustomToolFormatUnion`

    The input format for the custom tool. Default is unconstrained text.

    - `type BetaCustomToolFormatText struct{…}`

      Unconstrained free-form text.

      - `Type Text`

        Unconstrained text format. Always `text`.

        - `const TextText Text = "text"`

    - `type BetaCustomToolFormatGrammar struct{…}`

      A grammar defined by the user.

      - `Definition string`

        The grammar definition.

      - `Syntax string`

        The syntax of the grammar definition. One of `lark` or `regex`.

        - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

        - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

      - `Type Grammar`

        Grammar format. Always `grammar`.

        - `const GrammarGrammar Grammar = "grammar"`

### Beta Easy Input Message

- `type BetaEasyInputMessage struct{…}`

  A message input to the model with a role indicating instruction following
  hierarchy. Instructions given with the `developer` or `system` role take
  precedence over instructions given with the `user` role. Messages with the
  `assistant` role are presumed to have been generated by the model in previous
  interactions.

  - `Content BetaEasyInputMessageContentUnion`

    Text, image, or audio input to the model, used to generate a response.
    Can also contain previous assistant responses.

    - `string`

    - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

      A list of one or many input items to the model, containing different content
      types.

      - `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`.

          - `const InputTextInputText InputText = "input_text"`

        - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `Detail BetaResponseInputImageDetail`

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

          - `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`.

          - `const InputImageInputImage InputImage = "input_image"`

        - `FileID string`

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

        - `ImageURL string`

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

        - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

        - `Type InputFile`

          The type of the input item. Always `input_file`.

          - `const InputFileInputFile InputFile = "input_file"`

        - `Detail BetaResponseInputFileDetail`

          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`.

          - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

          - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

          - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

        - `FileData string`

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

        - `FileID string`

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

        - `FileURL string`

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

        - `Filename string`

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

        - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

  - `Role BetaEasyInputMessageRole`

    The role of the message input. One of `user`, `assistant`, `system`, or
    `developer`.

    - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

    - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

    - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

    - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

  - `Phase BetaEasyInputMessagePhase`

    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.

    - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

    - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

  - `Type BetaEasyInputMessageType`

    The type of the message input. Always `message`.

    - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

### Beta File Search Tool

- `type BetaFileSearchTool struct{…}`

  A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

  - `Type FileSearch`

    The type of the file search tool. Always `file_search`.

    - `const FileSearchFileSearch FileSearch = "file_search"`

  - `VectorStoreIDs []string`

    The IDs of the vector stores to search.

  - `Filters BetaFileSearchToolFiltersUnion`

    A filter to apply.

    - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

      - `Key string`

        The key to compare against the value.

      - `Type string`

        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

        - `eq`: equals
        - `ne`: not equal
        - `gt`: greater than
        - `gte`: greater than or equal
        - `lt`: less than
        - `lte`: less than or equal
        - `in`: in
        - `nin`: not in

        - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

        - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

        - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

        - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

        - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

        - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

        - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

        - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

      - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

        The value to compare against the attribute key; supports string, number, or boolean types.

        - `string`

        - `float64`

        - `bool`

        - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

          - `string`

          - `float64`

    - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

      Combine multiple filters using `and` or `or`.

      - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

        Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

        - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

          A filter used to compare a specified attribute key to a given value using a defined comparison operation.

          - `Key string`

            The key to compare against the value.

          - `Type string`

            Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

            - `eq`: equals
            - `ne`: not equal
            - `gt`: greater than
            - `gte`: greater than or equal
            - `lt`: less than
            - `lte`: less than or equal
            - `in`: in
            - `nin`: not in

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

            - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

          - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

            The value to compare against the attribute key; supports string, number, or boolean types.

            - `string`

            - `float64`

            - `bool`

            - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

              - `string`

              - `float64`

      - `Type string`

        Type of operation: `and` or `or`.

        - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

        - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

  - `MaxNumResults int64`

    The maximum number of results to return. This number should be between 1 and 50 inclusive.

  - `RankingOptions BetaFileSearchToolRankingOptions`

    Ranking options for search.

    - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

      Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

      - `EmbeddingWeight float64`

        The weight of the embedding in the reciprocal ranking fusion.

      - `TextWeight float64`

        The weight of the text in the reciprocal ranking fusion.

    - `Ranker string`

      The ranker to use for the file search.

      - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

      - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

    - `ScoreThreshold float64`

      The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

### Beta Function Shell Tool

- `type BetaFunctionShellTool struct{…}`

  A tool that allows the model to execute shell commands.

  - `Type Shell`

    The type of the shell tool. Always `shell`.

    - `const ShellShell Shell = "shell"`

  - `AllowedCallers []string`

    The tool invocation context(s).

    - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

    - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

  - `Environment BetaFunctionShellToolEnvironmentUnion`

    - `type BetaContainerAuto struct{…}`

      - `Type ContainerAuto`

        Automatically creates a container for this request

        - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

      - `FileIDs []string`

        An optional list of uploaded files to make available to your code.

      - `MemoryLimit BetaContainerAutoMemoryLimit`

        The memory limit for the container.

        - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

        - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

        - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

        - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

      - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

        Network access policy for the container.

        - `type BetaContainerNetworkPolicyDisabled struct{…}`

          - `Type Disabled`

            Disable outbound network access. Always `disabled`.

            - `const DisabledDisabled Disabled = "disabled"`

        - `type BetaContainerNetworkPolicyAllowlist struct{…}`

          - `AllowedDomains []string`

            A list of allowed domains when type is `allowlist`.

          - `Type Allowlist`

            Allow outbound network access only to specified domains. Always `allowlist`.

            - `const AllowlistAllowlist Allowlist = "allowlist"`

          - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

            Optional domain-scoped secrets for allowlisted domains.

            - `Domain string`

              The domain associated with the secret.

            - `Name string`

              The name of the secret to inject for the domain.

            - `Value string`

              The secret value to inject for the domain.

      - `Skills []BetaContainerAutoSkillUnion`

        An optional list of skills referenced by id or inline data.

        - `type BetaSkillReference struct{…}`

          - `SkillID string`

            The ID of the referenced skill.

          - `Type SkillReference`

            References a skill created with the /v1/skills endpoint.

            - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

          - `Version string`

            Optional skill version. Use a positive integer or 'latest'. Omit for default.

        - `type BetaInlineSkill struct{…}`

          - `Description string`

            The description of the skill.

          - `Name string`

            The name of the skill.

          - `Source BetaInlineSkillSource`

            Inline skill payload

            - `Data string`

              Base64-encoded skill zip bundle.

            - `MediaType ApplicationZip`

              The media type of the inline skill payload. Must be `application/zip`.

              - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

            - `Type Base64`

              The type of the inline skill source. Must be `base64`.

              - `const Base64Base64 Base64 = "base64"`

          - `Type Inline`

            Defines an inline skill for this request.

            - `const InlineInline Inline = "inline"`

    - `type BetaLocalEnvironment struct{…}`

      - `Type Local`

        Use a local computer environment.

        - `const LocalLocal Local = "local"`

      - `Skills []BetaLocalSkill`

        An optional list of skills.

        - `Description string`

          The description of the skill.

        - `Name string`

          The name of the skill.

        - `Path string`

          The path to the directory containing the skill.

    - `type BetaContainerReference struct{…}`

      - `ContainerID string`

        The ID of the referenced container.

      - `Type ContainerReference`

        References a container created with the /v1/containers endpoint

        - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

### Beta Function Tool

- `type BetaFunctionTool struct{…}`

  Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

  - `Name string`

    The name of the function to call.

  - `Parameters map[string, any]`

    A JSON schema object describing the parameters of the function.

  - `Strict bool`

    Whether strict parameter validation is enforced for this function tool.

  - `Type Function`

    The type of the function tool. Always `function`.

    - `const FunctionFunction Function = "function"`

  - `AllowedCallers []string`

    The tool invocation context(s).

    - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

    - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

  - `DeferLoading bool`

    Whether this function is deferred and loaded via tool search.

  - `Description string`

    A description of the function. Used by the model to determine whether or not to call the function.

  - `OutputSchema map[string, any]`

    A JSON schema object describing the JSON value encoded in string outputs for this function.

### Beta Inline Skill

- `type BetaInlineSkill struct{…}`

  - `Description string`

    The description of the skill.

  - `Name string`

    The name of the skill.

  - `Source BetaInlineSkillSource`

    Inline skill payload

    - `Data string`

      Base64-encoded skill zip bundle.

    - `MediaType ApplicationZip`

      The media type of the inline skill payload. Must be `application/zip`.

      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

    - `Type Base64`

      The type of the inline skill source. Must be `base64`.

      - `const Base64Base64 Base64 = "base64"`

  - `Type Inline`

    Defines an inline skill for this request.

    - `const InlineInline Inline = "inline"`

### Beta Inline Skill Source

- `type BetaInlineSkillSource struct{…}`

  Inline skill payload

  - `Data string`

    Base64-encoded skill zip bundle.

  - `MediaType ApplicationZip`

    The media type of the inline skill payload. Must be `application/zip`.

    - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

  - `Type Base64`

    The type of the inline skill source. Must be `base64`.

    - `const Base64Base64 Base64 = "base64"`

### Beta Local Environment

- `type BetaLocalEnvironment struct{…}`

  - `Type Local`

    Use a local computer environment.

    - `const LocalLocal Local = "local"`

  - `Skills []BetaLocalSkill`

    An optional list of skills.

    - `Description string`

      The description of the skill.

    - `Name string`

      The name of the skill.

    - `Path string`

      The path to the directory containing the skill.

### Beta Local Skill

- `type BetaLocalSkill struct{…}`

  - `Description string`

    The description of the skill.

  - `Name string`

    The name of the skill.

  - `Path string`

    The path to the directory containing the skill.

### Beta Namespace Tool

- `type BetaNamespaceTool struct{…}`

  Groups function/custom tools under a shared namespace.

  - `Description string`

    A description of the namespace shown to the model.

  - `Name string`

    The namespace name used in tool calls (for example, `crm`).

  - `Tools []BetaNamespaceToolToolUnion`

    The function/custom tools available inside this namespace.

    - `type BetaNamespaceToolToolFunction struct{…}`

      - `Name string`

      - `Type Function`

        - `const FunctionFunction Function = "function"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

        - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

      - `DeferLoading bool`

        Whether this function should be deferred and discovered via tool search.

      - `Description string`

      - `OutputSchema map[string, any]`

        A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

      - `Parameters any`

      - `Strict bool`

        Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `Name string`

        The name of the custom tool, used to identify it in tool calls.

      - `Type Custom`

        The type of the custom tool. Always `custom`.

        - `const CustomCustom Custom = "custom"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

        - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

      - `DeferLoading bool`

        Whether this tool should be deferred and discovered via tool search.

      - `Description string`

        Optional description of the custom tool, used to provide more context.

      - `Format BetaCustomToolFormatUnion`

        The input format for the custom tool. Default is unconstrained text.

        - `type BetaCustomToolFormatText struct{…}`

          Unconstrained free-form text.

          - `Type Text`

            Unconstrained text format. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaCustomToolFormatGrammar struct{…}`

          A grammar defined by the user.

          - `Definition string`

            The grammar definition.

          - `Syntax string`

            The syntax of the grammar definition. One of `lark` or `regex`.

            - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

            - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

          - `Type Grammar`

            Grammar format. Always `grammar`.

            - `const GrammarGrammar Grammar = "grammar"`

  - `Type Namespace`

    The type of the tool. Always `namespace`.

    - `const NamespaceNamespace Namespace = "namespace"`

### Beta Response

- `type BetaResponse struct{…}`

  - `ID string`

    Unique identifier for this Response.

  - `CreatedAt float64`

    Unix timestamp (in seconds) of when this Response was created.

  - `Error BetaResponseError`

    An error object returned when the model fails to generate a Response.

    - `Code BetaResponseErrorCode`

      The error code for the response.

      - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

      - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

      - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

      - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

      - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

      - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

      - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

      - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

      - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

      - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

      - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

      - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

      - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

      - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

      - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

      - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

      - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

      - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

      - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

      - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

    - `Message string`

      A human-readable description of the error.

  - `IncompleteDetails BetaResponseIncompleteDetails`

    Details about why the response is incomplete.

    - `Reason string`

      The reason why the response is incomplete.

      - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

      - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

  - `Instructions BetaResponseInstructionsUnion`

    A system (or developer) message inserted into the model's context.

    When using along with `previous_response_id`, the instructions from a previous
    response will not be carried over to the next response. This makes it simple
    to swap out system (or developer) messages in new responses.

    - `string`

    - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

      A list of one or many input items to the model, containing
      different content types.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

        - `Content BetaEasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail BetaResponseInputImageDetail`

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

                - `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`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileDetail`

                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`.

                - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

              - `FileData string`

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

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Role BetaEasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

          - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

          - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

          - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

        - `Phase BetaEasyInputMessagePhase`

          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.

          - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

          - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

        - `Type BetaEasyInputMessageType`

          The type of the message input. Always `message`.

          - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

        - `Content BetaResponseInputMessageContentList`

          A list of one or many input items to the model, containing different content
          types.

        - `Role string`

          The role of the message input. One of `user`, `system`, or `developer`.

          - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

          - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

          - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

        - `Agent BetaResponseInputItemMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

          - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

          - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

      - `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.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `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`.

                  - `const FileCitationFileCitation FileCitation = "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`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the web resource.

              - `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`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []BetaResponseOutputTextLogprob`

              - `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`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          The role of the output message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status BetaResponseOutputMessageStatus`

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

          - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

          - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

          - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Agent BetaResponseOutputMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Phase BetaResponseOutputMessagePhase`

          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.

          - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

          - `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`.

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Agent BetaResponseFileSearchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Results []BetaResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

            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.

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

            The unique ID of the file.

          - `Filename string`

            The name of the file.

          - `Score float64`

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

          - `Text string`

            The text that was retrieved from the file.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

            The type of the pending safety check.

          - `Message string`

            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.

          - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

          - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

          - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

        - `Type BetaResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

        - `Action BetaComputerActionUnion`

          A click action.

          - `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`.

              - `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`.

              - `const ClickClick Click = "click"`

            - `X int64`

              The x-coordinate where the click occurred.

            - `Y int64`

              The y-coordinate where the click occurred.

            - `Keys []string`

              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`.

              - `const DoubleClickDoubleClick DoubleClick = "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`.

              - `const DragDrag Drag = "drag"`

            - `Keys []string`

              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`.

              - `const KeypressKeypress Keypress = "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`.

              - `const MoveMove Move = "move"`

            - `X int64`

              The x-coordinate to move to.

            - `Y int64`

              The y-coordinate to move to.

            - `Keys []string`

              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`.

              - `const ScreenshotScreenshot Screenshot = "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`.

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

              The x-coordinate where the scroll occurred.

            - `Y int64`

              The y-coordinate where the scroll occurred.

            - `Keys []string`

              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`.

              - `const TypeType Type = "type"`

          - `type BetaComputerActionWait struct{…}`

            A wait action.

            - `Type Wait`

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

              - `const WaitWait Wait = "wait"`

        - `Actions BetaComputerActionList`

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

          - `type BetaComputerActionClick struct{…}`

            A click action.

          - `type BetaComputerActionDoubleClick struct{…}`

            A double click action.

          - `type BetaComputerActionDrag struct{…}`

            A drag action.

          - `type BetaComputerActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

          - `type BetaComputerActionMove struct{…}`

            A mouse move action.

          - `type BetaComputerActionScreenshot struct{…}`

            A screenshot action.

          - `type BetaComputerActionScroll struct{…}`

            A scroll action.

          - `type BetaComputerActionType struct{…}`

            An action to type in text.

          - `type BetaComputerActionWait struct{…}`

            A wait action.

        - `Agent BetaResponseComputerToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

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

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          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`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

        - `Type ComputerCallOutput`

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

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

          The ID of the computer tool call output.

        - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseInputItemComputerCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

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

          - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

          - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action BetaResponseFunctionWebSearchActionUnion`

          An object describing the specific action taken in this web search call.
          Includes details on how the model used the web (search, open_page, find_in_page).

          - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

            Action type "search" - Performs a web search query.

            - `Type Search`

              The action type.

              - `const SearchSearch Search = "search"`

            - `Queries []string`

              The search queries.

            - `Query string`

              The search query.

            - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

              The sources used in the search.

              - `Type URL`

                The type of source. Always `url`.

                - `const URLURL URL = "url"`

              - `URL string`

                The URL of the source.

          - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

            Action type "open_page" - Opens a specific URL from search results.

            - `Type OpenPage`

              The action type.

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

              The URL opened by the model.

          - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

            Action type "find_in_page": Searches for a pattern within a loaded page.

            - `Pattern string`

              The pattern or text to search for within the page.

            - `Type FindInPage`

              The action type.

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

              The URL of the page searched for the pattern.

        - `Status BetaResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

          - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

          - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

          - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          The type of the web search tool call. Always `web_search_call`.

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

        - `Agent BetaResponseFunctionWebSearchAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

          The unique ID of the function tool call.

        - `Agent BetaResponseFunctionToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the function to run.

        - `Status BetaResponseFunctionToolCallStatus`

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

          - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

          - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

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

        - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type BetaResponseInputTextContent 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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail BetaResponseInputImageContentDetail`

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

                - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

              - `FileID string`

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

              - `ImageURL string`

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

              - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileContentDetail`

                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`.

                - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

              - `FileID string`

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

              - `FileURL string`

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

              - `Filename string`

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

              - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Type FunctionCallOutput`

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

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

          The unique ID of the function tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemFunctionCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Status string`

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

          - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

        - `Author string`

          The sending agent identity.

        - `Content []BetaResponseInputItemAgentMessageContentUnion`

          Plaintext, image, or encrypted content sent between agents.

          - `type BetaResponseInputTextContent struct{…}`

            A text input to the model.

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The item type. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `ID string`

          The unique ID of this agent message item.

        - `Agent BetaResponseInputItemAgentMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

        - `Action string`

          The multi-agent action that was executed.

          - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

        - `Arguments string`

          The action arguments as a JSON string.

        - `CallID string`

          The unique ID linking this call to its output.

        - `Type MultiAgentCall`

          The item type. Always `multi_agent_call`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `ID string`

          The unique ID of this multi-agent call.

        - `Agent BetaResponseInputItemMultiAgentCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

        - `Action string`

          The multi-agent action that produced this result.

          - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

        - `CallID string`

          The unique ID of the multi-agent call.

        - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

          Text output returned by the multi-agent action.

          - `Text string`

            The text content.

          - `Type OutputText`

            The content type. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

            Citations associated with the text content.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

              - `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 citation type. Always `file_citation`.

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

              - `EndIndex int64`

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

              - `StartIndex int64`

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

              - `Title string`

                The title of the cited resource.

              - `Type URLCitation`

                The citation type. Always `url_citation`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the cited resource.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

              - `ContainerID string`

                The ID of the container.

              - `EndIndex int64`

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

              - `FileID string`

                The ID of the container file.

              - `Filename string`

                The filename of the container file cited.

              - `StartIndex int64`

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

              - `Type ContainerFileCitation`

                The citation type. Always `container_file_citation`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `Type MultiAgentCallOutput`

          The item type. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `ID string`

          The unique ID of this multi-agent call output.

        - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemToolSearchCall struct{…}`

        - `Arguments any`

          The arguments supplied to the tool search call.

        - `Type ToolSearchCall`

          The item type. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `ID string`

          The unique ID of this tool search call.

        - `Agent BetaResponseInputItemToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

          - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

          - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by the tool search output.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `Name string`

              The name of the function to call.

            - `Parameters map[string, any]`

              A JSON schema object describing the parameters of the function.

            - `Strict bool`

              Whether strict parameter validation is enforced for this function tool.

            - `Type Function`

              The type of the function tool. Always `function`.

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

              - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function is deferred and loaded via tool search.

            - `Description string`

              A description of the function. Used by the model to determine whether or not to call the function.

            - `OutputSchema map[string, any]`

              A JSON schema object describing the JSON value encoded in string outputs for this function.

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `Type FileSearch`

              The type of the file search tool. Always `file_search`.

              - `const FileSearchFileSearch FileSearch = "file_search"`

            - `VectorStoreIDs []string`

              The IDs of the vector stores to search.

            - `Filters BetaFileSearchToolFiltersUnion`

              A filter to apply.

              - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                - `Type string`

                  Type of operation: `and` or `or`.

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions BetaFileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                - `EmbeddingWeight float64`

                  The weight of the embedding in the reciprocal ranking fusion.

                - `TextWeight float64`

                  The weight of the text in the reciprocal ranking fusion.

              - `Ranker string`

                The ranker to use for the file search.

                - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

              - `ScoreThreshold float64`

                The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment BetaComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

              - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

              - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

              - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

              - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

            - `Filters BetaWebSearchToolFilters`

              Filters for the search.

              - `AllowedDomains []string`

                Allowed domains for the search. If not provided, all domains are allowed.
                Subdomains of the provided domains are allowed as well.

                Example: `["pubmed.ncbi.nlm.nih.gov"]`

            - `SearchContextSize BetaWebSearchToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

              - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

              - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchToolUserLocation`

              The approximate location of the user.

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `Type string`

                The type of location approximation. Always `approximate`.

                - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `ServerLabel string`

              A label for this MCP server, used to identify it in tool calls.

            - `Type Mcp`

              The type of the MCP tool. Always `mcp`.

              - `const McpMcp Mcp = "mcp"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

              - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools BetaToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `Authorization string`

              An OAuth access token that can be used with a remote MCP server, either
              with a custom MCP server URL or a service connector. Your application
              must handle the OAuth authorization flow and provide the token here.

            - `ConnectorID string`

              Identifier for service connectors, like those available in ChatGPT. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
              about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

              Currently supported `connector_id` values are:

              - Dropbox: `connector_dropbox`
              - Gmail: `connector_gmail`
              - Google Calendar: `connector_googlecalendar`
              - Google Drive: `connector_googledrive`
              - Microsoft Teams: `connector_microsoftteams`
              - Outlook Calendar: `connector_outlookcalendar`
              - Outlook Email: `connector_outlookemail`
              - SharePoint: `connector_sharepoint`

              - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

              - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

              - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

              - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

              - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

              - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

              - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

              - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

            - `DeferLoading bool`

              Whether this MCP tool is deferred and discovered via tool search.

            - `Headers map[string, string]`

              Optional HTTP headers to send to the MCP server. Use for authentication
              or other purposes.

            - `RequireApproval BetaToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                Specify which of the MCP server's tools require approval. Can be
                `always`, `never`, or a filter object associated with tools
                that require approval.

                - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

                - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                Specify a single approval policy for all tools. One of `always` or
                `never`. When set to `always`, all tools will require approval. When
                set to `never`, all tools will not require approval.

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

            - `ServerDescription string`

              Optional description of the MCP server, used to provide more context.

            - `ServerURL string`

              The URL for the MCP server. One of `server_url`, `connector_id`, or
              `tunnel_id` must be provided.

            - `TunnelID string`

              The Secure MCP Tunnel ID to use instead of a direct server URL. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided.

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container BetaToolCodeInterpreterContainerUnion`

              The code interpreter container. Can be a container ID or an object that
              specifies uploaded file IDs to make available to your code, along with an
              optional `memory_limit` setting.

              - `string`

              - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                - `Type Auto`

                  Always `auto`.

                  - `const AutoAuto Auto = "auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      - `Domain string`

                        The domain associated with the secret.

                      - `Name string`

                        The name of the secret to inject for the domain.

                      - `Value string`

                        The secret value to inject for the domain.

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

              - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type BetaToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

            - `Type ImageGeneration`

              The type of the image generation tool. Always `image_generation`.

              - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

            - `Action string`

              Whether to generate a new image or edit an existing image. Default: `auto`.

              - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

              - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

              - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s).
              This parameter is only supported for GPT image models that support
              transparent backgrounds. Must be one of `transparent`, `opaque`, or
              `auto` (default value). When `auto` is used, the model will
              automatically determine the best background for the image.

              `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
              transparent backgrounds. Requests with `background` set to
              `transparent` will return an error for these models; use `opaque` or
              `auto` instead.

              If `transparent`, the output format needs to support transparency,
              so it should be set to either `png` (default value) or `webp`.

              - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

              - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

              - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

              - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

              - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

            - `InputImageMask BetaToolImageGenerationInputImageMask`

              Optional mask for inpainting. Contains `image_url`
              (string, optional) and `file_id` (string, optional).

              - `FileID string`

                File ID for the mask image.

              - `ImageURL string`

                Base64-encoded mask image.

            - `Model string`

              The image generation model to use. Default: `gpt-image-1`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

              - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

              - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

              - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

            - `Quality string`

              The quality of the generated image. One of `low`, `medium`, `high`,
              or `auto`. Default: `auto`.

              - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

              - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

              - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

              - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

            - `Type LocalShell`

              The type of the local shell tool. Always `local_shell`.

              - `const LocalShellLocalShell LocalShell = "local_shell"`

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

            - `Type Shell`

              The type of the shell tool. Always `shell`.

              - `const ShellShell Shell = "shell"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

              - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

            - `Environment BetaFunctionShellToolEnvironmentUnion`

              - `type BetaContainerAuto struct{…}`

                - `Type ContainerAuto`

                  Automatically creates a container for this request

                  - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit BetaContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                  - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                  - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                  - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []BetaContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  - `type BetaSkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                    - `Type SkillReference`

                      References a skill created with the /v1/skills endpoint.

                      - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                    - `Version string`

                      Optional skill version. Use a positive integer or 'latest'. Omit for default.

                  - `type BetaInlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source BetaInlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                      - `MediaType ApplicationZip`

                        The media type of the inline skill payload. Must be `application/zip`.

                        - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                      - `Type Base64`

                        The type of the inline skill source. Must be `base64`.

                        - `const Base64Base64 Base64 = "base64"`

                    - `Type Inline`

                      Defines an inline skill for this request.

                      - `const InlineInline Inline = "inline"`

              - `type BetaLocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []BetaLocalSkill`

                  An optional list of skills.

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Path string`

                    The path to the directory containing the skill.

              - `type BetaContainerReference struct{…}`

                - `ContainerID string`

                  The ID of the referenced container.

                - `Type ContainerReference`

                  References a container created with the /v1/containers endpoint

                  - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Name string`

              The name of the custom tool, used to identify it in tool calls.

            - `Type Custom`

              The type of the custom tool. Always `custom`.

              - `const CustomCustom Custom = "custom"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

              - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this tool should be deferred and discovered via tool search.

            - `Description string`

              Optional description of the custom tool, used to provide more context.

            - `Format BetaCustomToolFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type BetaCustomToolFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type BetaCustomToolFormatGrammar struct{…}`

                A grammar defined by the user.

                - `Definition string`

                  The grammar definition.

                - `Syntax string`

                  The syntax of the grammar definition. One of `lark` or `regex`.

                  - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                  - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

            - `Description string`

              A description of the namespace shown to the model.

            - `Name string`

              The namespace name used in tool calls (for example, `crm`).

            - `Tools []BetaNamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              - `type BetaNamespaceToolToolFunction struct{…}`

                - `Name string`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function should be deferred and discovered via tool search.

                - `Description string`

                - `OutputSchema map[string, any]`

                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                - `Parameters any`

                - `Strict bool`

                  Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

            - `Type ToolSearch`

              The type of the tool. Always `tool_search`.

              - `const ToolSearchToolSearch ToolSearch = "tool_search"`

            - `Description string`

              Description shown to the model for a client-executed tool search tool.

            - `Execution BetaToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

              - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

              - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

              - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

              - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchPreviewToolUserLocation`

              The user's location.

              - `Type Approximate`

                The type of location approximation. Always `approximate`.

                - `const ApproximateApproximate Approximate = "approximate"`

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

            - `Type ApplyPatch`

              The type of the tool. Always `apply_patch`.

              - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

              - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

        - `Type ToolSearchOutput`

          The item type. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `ID string`

          The unique ID of this tool search output.

        - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

          - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []BetaToolUnion`

          A list of additional tools made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The item type. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `ID string`

          The unique ID of this additional tools item.

        - `Agent BetaResponseInputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

        - `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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          The type of the object. Always `reasoning`.

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Agent BetaResponseReasoningItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Content []BetaResponseReasoningItemContent`

          Reasoning text content.

          - `Text string`

            The reasoning text from the model.

          - `Type ReasoningText`

            The type of the reasoning text. Always `reasoning_text`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

          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.

        - `Status BetaResponseReasoningItemStatus`

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

          - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

          - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

          - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

        - `Agent BetaResponseCompactionItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseInputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

          The unique ID of the code interpreter tool call.

        - `Code string`

          The code to run, or null if not available.

        - `ContainerID string`

          The ID of the container used to run the code.

        - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

              The logs output from the code interpreter.

            - `Type Logs`

              The type of the output. Always `logs`.

              - `const LogsLogs Logs = "logs"`

          - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              The type of the output. Always `image`.

              - `const ImageImage Image = "image"`

            - `URL string`

              The URL of the image output from the code interpreter.

        - `Status BetaResponseCodeInterpreterToolCallStatus`

          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

          - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

          - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          The type of the code interpreter tool call. Always `code_interpreter_call`.

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Agent BetaResponseCodeInterpreterToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseInputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action BetaResponseInputItemShellCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

            Ordered shell commands for the execution environment to run.

          - `MaxOutputLength int64`

            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

          - `TimeoutMs int64`

            Maximum wall-clock time in milliseconds to allow the shell commands to run.

        - `CallID string`

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

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type BetaLocalEnvironment struct{…}`

          - `type BetaContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

          - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

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

        - `Output []BetaResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                The exit code returned by the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            Captured stderr output for the shell call.

          - `Stdout string`

            Captured stdout output for the shell call.

        - `Type ShellCallOutput`

          The type of the item. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

          The unique ID of the shell tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `MaxOutputLength int64`

          The maximum number of UTF-8 characters captured for this shell call's combined output.

        - `Status string`

          The status of the shell call output.

          - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

            - `Path string`

              Path of the file to create relative to the workspace root.

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

              Path of the file to delete relative to the workspace root.

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

            - `Path string`

              Path of the file to update relative to the workspace root.

            - `Type UpdateFile`

              The operation type. Always `update_file`.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Output string`

          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseInputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseInputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

          The unique ID of the approval response

        - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseInputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

          - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

          - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

      - `type BetaResponseCustomToolCallOutput struct{…}`

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

        - `CallID string`

          The call ID, used to map this custom tool call output to a custom tool call.

        - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

          - `string`

          - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          The type of the custom tool call output. Always `custom_tool_call_output`.

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

          The unique ID of the custom tool call output in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

          An identifier used to map this custom tool call to a tool call output.

        - `Input string`

          The input for the custom tool call generated by the model.

        - `Name string`

          The name of the custom tool being called.

        - `Type CustomToolCall`

          The type of the custom tool call. Always `custom_tool_call`.

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

          The unique ID of the custom tool call in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the custom tool being called.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

        - `Type CompactionTrigger`

          The type of the item. Always `compaction_trigger`.

          - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

        - `Agent BetaResponseInputItemCompactionTriggerAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Agent BetaResponseInputItemItemReferenceAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

      - `type BetaResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseInputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output.

          - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

          - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseInputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

  - `Metadata map[string, string]`

    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.

  - `Model BetaResponseModel`

    Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
    offers a wide range of models with different capabilities, performance
    characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
    to browse and compare available models.

    - `type BetaResponseModel string`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

      - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

      - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

      - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

      - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

      - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

      - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

      - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

      - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

      - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

      - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

      - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

      - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

      - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

      - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

      - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

      - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

      - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

      - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

      - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

      - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

      - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

      - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

      - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

      - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

      - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

      - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

      - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

      - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

      - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

      - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

      - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

      - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

      - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

      - `const BetaResponseModelO3 BetaResponseModel = "o3"`

      - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

      - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

      - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

      - `const BetaResponseModelO1 BetaResponseModel = "o1"`

      - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

      - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

      - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

      - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

      - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

      - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

      - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

      - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

      - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

      - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

      - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

      - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

      - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

      - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

      - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

      - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

      - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

      - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

      - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

      - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

      - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

      - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

      - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

      - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

      - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

      - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

      - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

      - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

      - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

      - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

      - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

      - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

      - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

      - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

      - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

      - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

      - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

      - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

      - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

      - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

      - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

      - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

      - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

      - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

      - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

      - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

      - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

      - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

      - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

      - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

      - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

      - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

      - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

      - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

      - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

    - `string`

  - `Object Response`

    The object type of this resource - always set to `response`.

    - `const ResponseResponse Response = "response"`

  - `Output []BetaResponseOutputItemUnion`

    An array of content items generated by the model.

    - The length and order of items in the `output` array is dependent
      on the model's response.
    - Rather than accessing the first item in the `output` array and
      assuming it's an `assistant` message with the content generated by
      the model, you might consider using the `output_text` property where
      supported in SDKs.

    - `type BetaResponseOutputMessage struct{…}`

      An output message from the model.

    - `type BetaResponseFileSearchToolCall struct{…}`

      The results of a file search tool call. See the
      [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

    - `type BetaResponseFunctionToolCallOutputItem struct{…}`

      - `ID string`

        The unique ID of the function call tool output.

      - `CallID string`

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

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

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

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

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

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

    - `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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        A computer screenshot image used with the computer use tool.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

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

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

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

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

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

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

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

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

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

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

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

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

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

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `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.

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

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

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `ParallelToolCalls bool`

    Whether to allow the model to run tool calls in parallel.

  - `Temperature float64`

    What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
    We generally recommend altering this or `top_p` but not both.

  - `ToolChoice BetaResponseToolChoiceUnion`

    How the model should select which tool (or tools) to use when generating
    a response. See the `tools` parameter to see how to specify which tools
    the model can call.

    - `type BetaToolChoiceOptions string`

      Controls which (if any) tool is called by the model.

      `none` means the model will not call any tool and instead generates a message.

      `auto` means the model can pick between generating a message or calling one or
      more tools.

      `required` means the model must call one or more tools.

      - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

      - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

      - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

    - `type BetaToolChoiceAllowed struct{…}`

      Constrains the tools available to the model to a pre-defined set.

      - `Mode BetaToolChoiceAllowedMode`

        Constrains the tools available to the model to a pre-defined set.

        `auto` allows the model to pick from among the allowed tools and generate a
        message.

        `required` requires the model to call one or more of the allowed tools.

        - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

        - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

      - `Tools []map[string, any]`

        A list of tool definitions that the model should be allowed to call.

        For the Responses API, the list of tool definitions might look like:

        ```json
        [
          { "type": "function", "name": "get_weather" },
          { "type": "mcp", "server_label": "deepwiki" },
          { "type": "image_generation" }
        ]
        ```

      - `Type AllowedTools`

        Allowed tool configuration type. Always `allowed_tools`.

        - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

    - `type BetaToolChoiceTypes struct{…}`

      Indicates that the model should use a built-in tool to generate a response.
      [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

      - `Type BetaToolChoiceTypesType`

        The type of hosted tool the model should to use. Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).

        Allowed values are:

        - `file_search`
        - `web_search_preview`
        - `computer`
        - `computer_use_preview`
        - `computer_use`
        - `code_interpreter`
        - `image_generation`

        - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

        - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

        - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

        - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

        - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

        - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

    - `type BetaToolChoiceFunction struct{…}`

      Use this option to force the model to call a specific function.

      - `Name string`

        The name of the function to call.

      - `Type Function`

        For function calling, the type is always `function`.

        - `const FunctionFunction Function = "function"`

    - `type BetaToolChoiceMcp struct{…}`

      Use this option to force the model to call a specific tool on a remote MCP server.

      - `ServerLabel string`

        The label of the MCP server to use.

      - `Type Mcp`

        For MCP tools, the type is always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `Name string`

        The name of the tool to call on the server.

    - `type BetaToolChoiceCustom struct{…}`

      Use this option to force the model to call a specific custom tool.

      - `Name string`

        The name of the custom tool to call.

      - `Type Custom`

        For custom tool calling, the type is always `custom`.

        - `const CustomCustom Custom = "custom"`

    - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

      - `Type ProgrammaticToolCalling`

        The tool to call. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolChoiceApplyPatch struct{…}`

      Forces the model to call the apply_patch tool when executing a tool call.

      - `Type ApplyPatch`

        The tool to call. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `type BetaToolChoiceShell struct{…}`

      Forces the model to call the shell tool when a tool call is required.

      - `Type Shell`

        The tool to call. Always `shell`.

        - `const ShellShell Shell = "shell"`

  - `Tools []BetaToolUnion`

    An array of tools the model may call while generating a response. You
    can specify which tool to use by setting the `tool_choice` parameter.

    We support the following categories of tools:

    - **Built-in tools**: Tools that are provided by OpenAI that extend the
      model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
      or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
      [built-in tools](https://platform.openai.com/docs/guides/tools).
    - **MCP Tools**: Integrations with third-party systems via custom MCP servers
      or predefined connectors such as Google Drive and SharePoint. Learn more about
      [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
    - **Function calls (custom tools)**: Functions that are defined by you,
      enabling the model to call your own code with strongly typed arguments
      and outputs. Learn more about
      [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
      custom tools to call your own code.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

    - `type BetaToolProgrammaticToolCalling struct{…}`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

  - `TopP float64`

    An alternative to sampling with temperature, called nucleus sampling,
    where the model considers the results of the tokens with top_p probability
    mass. So 0.1 means only the tokens comprising the top 10% probability mass
    are considered.

    We generally recommend altering this or `temperature` but not both.

  - `Background bool`

    Whether to run the model response in the background.
    [Learn more](https://platform.openai.com/docs/guides/background).

  - `CompletedAt float64`

    Unix timestamp (in seconds) of when this Response was completed.
    Only present when the status is `completed`.

  - `Conversation BetaResponseConversation`

    The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

    - `ID string`

      The unique ID of the conversation that this response was associated with.

  - `MaxOutputTokens int64`

    An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

  - `MaxToolCalls int64`

    The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

  - `Moderation BetaResponseModeration`

    Moderation results for the response input and output, if moderated completions were requested.

    - `Input BetaResponseModerationInputUnion`

      Moderation for the response input.

      - `type BetaResponseModerationInputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationInputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

    - `Output BetaResponseModerationOutputUnion`

      Moderation for the response output.

      - `type BetaResponseModerationOutputModerationResult struct{…}`

        A moderation result produced for the response input or output.

        - `Categories map[string, bool]`

          A dictionary of moderation categories to booleans, True if the input is flagged under this category.

        - `CategoryAppliedInputTypes map[string, []string]`

          Which modalities of input are reflected by the score for each category.

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

          - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

        - `CategoryScores map[string, float64]`

          A dictionary of moderation categories to scores.

        - `Flagged bool`

          A boolean indicating whether the content was flagged by any category.

        - `Model string`

          The moderation model that produced this result.

        - `Type ModerationResult`

          The object type, which was always `moderation_result` for successful moderation results.

          - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

      - `type BetaResponseModerationOutputError struct{…}`

        An error produced while attempting moderation for the response input or output.

        - `Code string`

          The error code.

        - `Message string`

          The error message.

        - `Type Error`

          The object type, which was always `error` for moderation failures.

          - `const ErrorError Error = "error"`

  - `PreviousResponseID string`

    The unique ID of the previous response to the model. Use this to
    create multi-turn conversations. Learn more about
    [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

  - `Prompt BetaResponsePrompt`

    Reference to a prompt template and its variables.
    [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

    - `ID string`

      The unique identifier of the prompt template to use.

    - `Variables map[string, BetaResponsePromptVariableUnion]`

      Optional map of values to substitute in for variables in your
      prompt. The substitution values can either be strings, or other
      Response input types like images or files.

      - `string`

      - `type BetaResponseInputText struct{…}`

        A text input to the model.

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

    - `Version string`

      Optional version of the prompt template.

  - `PromptCacheKey string`

    Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

  - `PromptCacheOptions BetaResponsePromptCacheOptions`

    The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

    - `Mode string`

      Whether implicit prompt-cache breakpoints were enabled.

      - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

      - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

    - `Ttl string`

      The minimum lifetime applied to each cache breakpoint.

      - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

  - `PromptCacheRetention BetaResponsePromptCacheRetention`

    Deprecated. Use `prompt_cache_options.ttl` instead.

    The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
    This field expresses a maximum retention policy, while
    `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
    fields are independent and do not interact.
    For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

    For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

    - Organizations without ZDR enabled default to `24h`.
    - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

    - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

    - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

  - `Reasoning BetaResponseReasoning`

    **gpt-5 and o-series models only**

    Configuration options for
    [reasoning models](https://platform.openai.com/docs/guides/reasoning).

    - `Context string`

      Controls which reasoning items are rendered back to the model on later turns.
      If omitted or set to `auto`, the model determines the context mode. The
      `gpt-5.6` model family defaults to `all_turns`; earlier models default to
      `current_turn`.

      When returned on a response, this is the effective reasoning context mode
      used for the response.

      - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

      - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

      - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

    - `Effort string`

      Constrains effort on reasoning for reasoning models. Currently supported
      values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
      Reducing reasoning effort can result in faster responses and fewer tokens
      used on reasoning in a response. Not all reasoning models support every
      value. See the
      [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
      for model-specific support.

      - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

      - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

      - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

      - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

      - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

      - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

      - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

    - `GenerateSummary string`

      **Deprecated:** use `summary` instead.

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

      - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

      - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

    - `Mode string`

      Controls the reasoning execution mode for the request.

      When returned on a response, this is the effective execution mode.

      - `string`

      - `string`

        - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

        - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

    - `Summary string`

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

      - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

      - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

      - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

  - `SafetyIdentifier string`

    A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
    The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `ServiceTier BetaResponseServiceTier`

    Specifies the processing type used for serving the request.

    - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
    - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
    - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
    - When not set, the default behavior is 'auto'.

    When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

    - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

    - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

    - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

    - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

    - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

  - `Status BetaResponseStatus`

    The status of the response generation. One of `completed`, `failed`,
    `in_progress`, `cancelled`, `queued`, or `incomplete`.

    - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

    - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

    - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

    - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

    - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

    - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

  - `Text BetaResponseTextConfig`

    Configuration options for a text response from the model. Can be plain
    text or structured JSON data. Learn more:

    - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
    - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

    - `Format BetaResponseFormatTextConfigUnion`

      An object specifying the format that the model must output.

      Configuring `{ "type": "json_schema" }` enables Structured Outputs,
      which ensures the model will match your supplied JSON schema. Learn more in the
      [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

      The default format is `{ "type": "text" }` with no additional options.

      **Not recommended for gpt-4o and newer models:**

      Setting to `{ "type": "json_object" }` enables the older JSON mode, which
      ensures the message the model generates is valid JSON. Using `json_schema`
      is preferred for models that support it.

      - `type BetaResponseFormatTextConfigText struct{…}`

        Default response format. Used to generate text responses.

        - `Type Text`

          The type of response format being defined. Always `text`.

          - `const TextText Text = "text"`

      - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

        JSON Schema response format. Used to generate structured JSON responses.
        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

        - `Name string`

          The name of the response format. Must be a-z, A-Z, 0-9, or contain
          underscores and dashes, with a maximum length of 64.

        - `Schema map[string, any]`

          The schema for the response format, described as a JSON Schema object.
          Learn how to build JSON schemas [here](https://json-schema.org/).

        - `Type JSONSchema`

          The type of response format being defined. Always `json_schema`.

          - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

        - `Description string`

          A description of what the response format is for, used by the model to
          determine how to respond in the format.

        - `Strict bool`

          Whether to enable strict schema adherence when generating the output.
          If set to true, the model will always follow the exact schema defined
          in the `schema` field. Only a subset of JSON Schema is supported when
          `strict` is `true`. To learn more, read the [Structured Outputs
          guide](https://platform.openai.com/docs/guides/structured-outputs).

      - `type BetaResponseFormatTextConfigJSONObject struct{…}`

        JSON object response format. An older method of generating JSON responses.
        Using `json_schema` is recommended for models that support it. Note that the
        model will not generate JSON without a system or user message instructing it
        to do so.

        - `Type JSONObject`

          The type of response format being defined. Always `json_object`.

          - `const JSONObjectJSONObject JSONObject = "json_object"`

    - `Verbosity BetaResponseTextConfigVerbosity`

      Constrains the verbosity of the model's response. Lower values will result in
      more concise responses, while higher values will result in more verbose responses.
      Currently supported values are `low`, `medium`, and `high`. The default is
      `medium`.

      - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

      - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

      - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

  - `TopLogprobs int64`

    An integer between 0 and 20 specifying the maximum number of most likely
    tokens to return at each token position, each with an associated log
    probability. In some cases, the number of returned tokens may be fewer than
    requested.

  - `Truncation BetaResponseTruncation`

    The truncation strategy to use for the model response.

    - `auto`: If the input to this Response exceeds
      the model's context window size, the model will truncate the
      response to fit the context window by dropping items from the beginning of the conversation.
    - `disabled` (default): If the input size will exceed the context window
      size for a model, the request will fail with a 400 error.

    - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

    - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

  - `Usage BetaResponseUsage`

    Represents token usage details including input tokens, output tokens,
    a breakdown of output tokens, and the total tokens used.

    - `InputTokens int64`

      The number of input tokens.

    - `InputTokensDetails BetaResponseUsageInputTokensDetails`

      A detailed breakdown of the input tokens.

      - `CacheWriteTokens int64`

        The number of input tokens that were written to the cache.

      - `CachedTokens int64`

        The number of tokens that were retrieved from the cache.
        [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

    - `OutputTokens int64`

      The number of output tokens.

    - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

      A detailed breakdown of the output tokens.

      - `ReasoningTokens int64`

        The number of reasoning tokens.

    - `TotalTokens int64`

      The total number of tokens used.

  - `User string`

    This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
    A stable identifier for your end-users.
    Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

### Beta Response Apply Patch Tool Call

- `type BetaResponseApplyPatchToolCall struct{…}`

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

  - `ID string`

    The unique ID of the apply patch tool call. Populated when this item is returned via API.

  - `CallID string`

    The unique ID of the apply patch tool call generated by the model.

  - `Operation BetaResponseApplyPatchToolCallOperationUnion`

    One of the create_file, delete_file, or update_file operations applied via apply_patch.

    - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

      Instruction describing how to create a file via the apply_patch tool.

      - `Diff string`

        Diff to apply.

      - `Path string`

        Path of the file to create.

      - `Type CreateFile`

        Create a new file with the provided diff.

        - `const CreateFileCreateFile CreateFile = "create_file"`

    - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

      Instruction describing how to delete a file via the apply_patch tool.

      - `Path string`

        Path of the file to delete.

      - `Type DeleteFile`

        Delete the specified file.

        - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

    - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

      Instruction describing how to update a file via the apply_patch tool.

      - `Diff string`

        Diff to apply.

      - `Path string`

        Path of the file to update.

      - `Type UpdateFile`

        Update an existing file with the provided diff.

        - `const UpdateFileUpdateFile UpdateFile = "update_file"`

  - `Status BetaResponseApplyPatchToolCallStatus`

    The status of the apply patch tool call. One of `in_progress` or `completed`.

    - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

    - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

  - `Type ApplyPatchCall`

    The type of the item. Always `apply_patch_call`.

    - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

  - `Agent BetaResponseApplyPatchToolCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseApplyPatchToolCallCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

      - `Type Direct`

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        - `const ProgramProgram Program = "program"`

  - `CreatedBy string`

    The ID of the entity that created this tool call.

### Beta Response Apply Patch Tool Call Output

- `type BetaResponseApplyPatchToolCallOutput struct{…}`

  The output emitted by an apply patch tool call.

  - `ID string`

    The unique ID of the apply patch tool call output. Populated when this item is returned via API.

  - `CallID string`

    The unique ID of the apply patch tool call generated by the model.

  - `Status BetaResponseApplyPatchToolCallOutputStatus`

    The status of the apply patch tool call output. One of `completed` or `failed`.

    - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

    - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

  - `Type ApplyPatchCallOutput`

    The type of the item. Always `apply_patch_call_output`.

    - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

  - `Agent BetaResponseApplyPatchToolCallOutputAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

      - `Type Direct`

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        - `const ProgramProgram Program = "program"`

  - `CreatedBy string`

    The ID of the entity that created this tool call output.

  - `Output string`

    Optional textual output returned by the apply patch tool.

### Beta Response Audio Delta Event

- `type BetaResponseAudioDeltaEvent struct{…}`

  Emitted when there is a partial audio response.

  - `Delta string`

    A chunk of Base64 encoded response audio bytes.

  - `SequenceNumber int64`

    A sequence number for this chunk of the stream response.

  - `Type ResponseAudioDelta`

    The type of the event. Always `response.audio.delta`.

    - `const ResponseAudioDeltaResponseAudioDelta ResponseAudioDelta = "response.audio.delta"`

  - `Agent BetaResponseAudioDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Audio Done Event

- `type BetaResponseAudioDoneEvent struct{…}`

  Emitted when the audio response is complete.

  - `SequenceNumber int64`

    The sequence number of the delta.

  - `Type ResponseAudioDone`

    The type of the event. Always `response.audio.done`.

    - `const ResponseAudioDoneResponseAudioDone ResponseAudioDone = "response.audio.done"`

  - `Agent BetaResponseAudioDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Audio Transcript Delta Event

- `type BetaResponseAudioTranscriptDeltaEvent struct{…}`

  Emitted when there is a partial transcript of audio.

  - `Delta string`

    The partial transcript of the audio response.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseAudioTranscriptDelta`

    The type of the event. Always `response.audio.transcript.delta`.

    - `const ResponseAudioTranscriptDeltaResponseAudioTranscriptDelta ResponseAudioTranscriptDelta = "response.audio.transcript.delta"`

  - `Agent BetaResponseAudioTranscriptDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Audio Transcript Done Event

- `type BetaResponseAudioTranscriptDoneEvent struct{…}`

  Emitted when the full audio transcript is completed.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseAudioTranscriptDone`

    The type of the event. Always `response.audio.transcript.done`.

    - `const ResponseAudioTranscriptDoneResponseAudioTranscriptDone ResponseAudioTranscriptDone = "response.audio.transcript.done"`

  - `Agent BetaResponseAudioTranscriptDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Code Interpreter Call Code Delta Event

- `type BetaResponseCodeInterpreterCallCodeDeltaEvent struct{…}`

  Emitted when a partial code snippet is streamed by the code interpreter.

  - `Delta string`

    The partial code snippet being streamed by the code interpreter.

  - `ItemID string`

    The unique identifier of the code interpreter tool call item.

  - `OutputIndex int64`

    The index of the output item in the response for which the code is being streamed.

  - `SequenceNumber int64`

    The sequence number of this event, used to order streaming events.

  - `Type ResponseCodeInterpreterCallCodeDelta`

    The type of the event. Always `response.code_interpreter_call_code.delta`.

    - `const ResponseCodeInterpreterCallCodeDeltaResponseCodeInterpreterCallCodeDelta ResponseCodeInterpreterCallCodeDelta = "response.code_interpreter_call_code.delta"`

  - `Agent BetaResponseCodeInterpreterCallCodeDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Code Interpreter Call Code Done Event

- `type BetaResponseCodeInterpreterCallCodeDoneEvent struct{…}`

  Emitted when the code snippet is finalized by the code interpreter.

  - `Code string`

    The final code snippet output by the code interpreter.

  - `ItemID string`

    The unique identifier of the code interpreter tool call item.

  - `OutputIndex int64`

    The index of the output item in the response for which the code is finalized.

  - `SequenceNumber int64`

    The sequence number of this event, used to order streaming events.

  - `Type ResponseCodeInterpreterCallCodeDone`

    The type of the event. Always `response.code_interpreter_call_code.done`.

    - `const ResponseCodeInterpreterCallCodeDoneResponseCodeInterpreterCallCodeDone ResponseCodeInterpreterCallCodeDone = "response.code_interpreter_call_code.done"`

  - `Agent BetaResponseCodeInterpreterCallCodeDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Code Interpreter Call Completed Event

- `type BetaResponseCodeInterpreterCallCompletedEvent struct{…}`

  Emitted when the code interpreter call is completed.

  - `ItemID string`

    The unique identifier of the code interpreter tool call item.

  - `OutputIndex int64`

    The index of the output item in the response for which the code interpreter call is completed.

  - `SequenceNumber int64`

    The sequence number of this event, used to order streaming events.

  - `Type ResponseCodeInterpreterCallCompleted`

    The type of the event. Always `response.code_interpreter_call.completed`.

    - `const ResponseCodeInterpreterCallCompletedResponseCodeInterpreterCallCompleted ResponseCodeInterpreterCallCompleted = "response.code_interpreter_call.completed"`

  - `Agent BetaResponseCodeInterpreterCallCompletedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Code Interpreter Call In Progress Event

- `type BetaResponseCodeInterpreterCallInProgressEvent struct{…}`

  Emitted when a code interpreter call is in progress.

  - `ItemID string`

    The unique identifier of the code interpreter tool call item.

  - `OutputIndex int64`

    The index of the output item in the response for which the code interpreter call is in progress.

  - `SequenceNumber int64`

    The sequence number of this event, used to order streaming events.

  - `Type ResponseCodeInterpreterCallInProgress`

    The type of the event. Always `response.code_interpreter_call.in_progress`.

    - `const ResponseCodeInterpreterCallInProgressResponseCodeInterpreterCallInProgress ResponseCodeInterpreterCallInProgress = "response.code_interpreter_call.in_progress"`

  - `Agent BetaResponseCodeInterpreterCallInProgressEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Code Interpreter Call Interpreting Event

- `type BetaResponseCodeInterpreterCallInterpretingEvent struct{…}`

  Emitted when the code interpreter is actively interpreting the code snippet.

  - `ItemID string`

    The unique identifier of the code interpreter tool call item.

  - `OutputIndex int64`

    The index of the output item in the response for which the code interpreter is interpreting code.

  - `SequenceNumber int64`

    The sequence number of this event, used to order streaming events.

  - `Type ResponseCodeInterpreterCallInterpreting`

    The type of the event. Always `response.code_interpreter_call.interpreting`.

    - `const ResponseCodeInterpreterCallInterpretingResponseCodeInterpreterCallInterpreting ResponseCodeInterpreterCallInterpreting = "response.code_interpreter_call.interpreting"`

  - `Agent BetaResponseCodeInterpreterCallInterpretingEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Code Interpreter Tool Call

- `type BetaResponseCodeInterpreterToolCall struct{…}`

  A tool call to run code.

  - `ID string`

    The unique ID of the code interpreter tool call.

  - `Code string`

    The code to run, or null if not available.

  - `ContainerID string`

    The ID of the container used to run the code.

  - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

    The outputs generated by the code interpreter, such as logs or images.
    Can be null if no outputs are available.

    - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

      The logs output from the code interpreter.

      - `Logs string`

        The logs output from the code interpreter.

      - `Type Logs`

        The type of the output. Always `logs`.

        - `const LogsLogs Logs = "logs"`

    - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

      The image output from the code interpreter.

      - `Type Image`

        The type of the output. Always `image`.

        - `const ImageImage Image = "image"`

      - `URL string`

        The URL of the image output from the code interpreter.

  - `Status BetaResponseCodeInterpreterToolCallStatus`

    The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

    - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

    - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

    - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

    - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

    - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

  - `Type CodeInterpreterCall`

    The type of the code interpreter tool call. Always `code_interpreter_call`.

    - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

  - `Agent BetaResponseCodeInterpreterToolCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Compaction Item

- `type BetaResponseCompactionItem struct{…}`

  A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

  - `ID string`

    The unique ID of the compaction item.

  - `EncryptedContent string`

    The encrypted content that was produced by compaction.

  - `Type Compaction`

    The type of the item. Always `compaction`.

    - `const CompactionCompaction Compaction = "compaction"`

  - `Agent BetaResponseCompactionItemAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Compaction Item Param

- `type BetaResponseCompactionItemParamResp struct{…}`

  A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

  - `EncryptedContent string`

    The encrypted content of the compaction summary.

  - `Type Compaction`

    The type of the item. Always `compaction`.

    - `const CompactionCompaction Compaction = "compaction"`

  - `ID string`

    The ID of the compaction item.

  - `Agent BetaResponseCompactionItemParamAgentResp`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Completed Event

- `type BetaResponseCompletedEvent struct{…}`

  Emitted when the model response is complete.

  - `Response BetaResponse`

    Properties of the completed response.

    - `ID string`

      Unique identifier for this Response.

    - `CreatedAt float64`

      Unix timestamp (in seconds) of when this Response was created.

    - `Error BetaResponseError`

      An error object returned when the model fails to generate a Response.

      - `Code BetaResponseErrorCode`

        The error code for the response.

        - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

        - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

        - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

        - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

        - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

        - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

        - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

        - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

        - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

        - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

        - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

        - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

        - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

        - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

        - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

        - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

        - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

        - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

        - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

        - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

      - `Message string`

        A human-readable description of the error.

    - `IncompleteDetails BetaResponseIncompleteDetails`

      Details about why the response is incomplete.

      - `Reason string`

        The reason why the response is incomplete.

        - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

        - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

    - `Instructions BetaResponseInstructionsUnion`

      A system (or developer) message inserted into the model's context.

      When using along with `previous_response_id`, the instructions from a previous
      response will not be carried over to the next response. This makes it simple
      to swap out system (or developer) messages in new responses.

      - `string`

      - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

        A list of one or many input items to the model, containing
        different content types.

        - `type BetaEasyInputMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role. Messages with the
          `assistant` role are presumed to have been generated by the model in previous
          interactions.

          - `Content BetaEasyInputMessageContentUnion`

            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.

            - `string`

            - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

              A list of one or many input items to the model, containing different content
              types.

              - `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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail BetaResponseInputImageDetail`

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

                  - `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`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileDetail`

                  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`.

                  - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                  - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                  - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                - `FileData string`

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

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Role BetaEasyInputMessageRole`

            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.

            - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

            - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

            - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

            - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

          - `Phase BetaEasyInputMessagePhase`

            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.

            - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

            - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

          - `Type BetaEasyInputMessageType`

            The type of the message input. Always `message`.

            - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

        - `type BetaResponseInputItemMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role.

          - `Content BetaResponseInputMessageContentList`

            A list of one or many input items to the model, containing different content
            types.

          - `Role string`

            The role of the message input. One of `user`, `system`, or `developer`.

            - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

            - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

            - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

          - `Agent BetaResponseInputItemMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

            - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

            - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

          - `Type string`

            The type of the message input. Always set to `message`.

            - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

        - `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.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

              - `Annotations []BetaResponseOutputTextAnnotationUnion`

                The annotations of the text output.

                - `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`.

                    - `const FileCitationFileCitation FileCitation = "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`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the web resource.

                - `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`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                    - `const FilePathFilePath FilePath = "file_path"`

              - `Text string`

                The text output from the model.

              - `Type OutputText`

                The type of the output text. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Logprobs []BetaResponseOutputTextLogprob`

                - `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`.

                - `const RefusalRefusal Refusal = "refusal"`

          - `Role Assistant`

            The role of the output message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `Status BetaResponseOutputMessageStatus`

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

            - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

            - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

            - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

          - `Type Message`

            The type of the output message. Always `message`.

            - `const MessageMessage Message = "message"`

          - `Agent BetaResponseOutputMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Phase BetaResponseOutputMessagePhase`

            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.

            - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

            - `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`.

            - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

          - `Agent BetaResponseFileSearchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Results []BetaResponseFileSearchToolCallResult`

            The results of the file search tool call.

            - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

              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.

              - `string`

              - `float64`

              - `bool`

            - `FileID string`

              The unique ID of the file.

            - `Filename string`

              The name of the file.

            - `Score float64`

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

            - `Text string`

              The text that was retrieved from the file.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

              The type of the pending safety check.

            - `Message string`

              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.

            - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

            - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

            - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

          - `Type BetaResponseComputerToolCallType`

            The type of the computer call. Always `computer_call`.

            - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

          - `Action BetaComputerActionUnion`

            A click action.

            - `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`.

                - `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`.

                - `const ClickClick Click = "click"`

              - `X int64`

                The x-coordinate where the click occurred.

              - `Y int64`

                The y-coordinate where the click occurred.

              - `Keys []string`

                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`.

                - `const DoubleClickDoubleClick DoubleClick = "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`.

                - `const DragDrag Drag = "drag"`

              - `Keys []string`

                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`.

                - `const KeypressKeypress Keypress = "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`.

                - `const MoveMove Move = "move"`

              - `X int64`

                The x-coordinate to move to.

              - `Y int64`

                The y-coordinate to move to.

              - `Keys []string`

                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`.

                - `const ScreenshotScreenshot Screenshot = "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`.

                - `const ScrollScroll Scroll = "scroll"`

              - `X int64`

                The x-coordinate where the scroll occurred.

              - `Y int64`

                The y-coordinate where the scroll occurred.

              - `Keys []string`

                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`.

                - `const TypeType Type = "type"`

            - `type BetaComputerActionWait struct{…}`

              A wait action.

              - `Type Wait`

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

                - `const WaitWait Wait = "wait"`

          - `Actions BetaComputerActionList`

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

            - `type BetaComputerActionClick struct{…}`

              A click action.

            - `type BetaComputerActionDoubleClick struct{…}`

              A double click action.

            - `type BetaComputerActionDrag struct{…}`

              A drag action.

            - `type BetaComputerActionKeypress struct{…}`

              A collection of keypresses the model would like to perform.

            - `type BetaComputerActionMove struct{…}`

              A mouse move action.

            - `type BetaComputerActionScreenshot struct{…}`

              A screenshot action.

            - `type BetaComputerActionScroll struct{…}`

              A scroll action.

            - `type BetaComputerActionType struct{…}`

              An action to type in text.

            - `type BetaComputerActionWait struct{…}`

              A wait action.

          - `Agent BetaResponseComputerToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

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

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            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`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

              The identifier of an uploaded file that contains the screenshot.

            - `ImageURL string`

              The URL of the screenshot image.

          - `Type ComputerCallOutput`

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

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

            The ID of the computer tool call output.

          - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseInputItemComputerCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

            - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

          - `ID string`

            The unique ID of the web search tool call.

          - `Action BetaResponseFunctionWebSearchActionUnion`

            An object describing the specific action taken in this web search call.
            Includes details on how the model used the web (search, open_page, find_in_page).

            - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

              Action type "search" - Performs a web search query.

              - `Type Search`

                The action type.

                - `const SearchSearch Search = "search"`

              - `Queries []string`

                The search queries.

              - `Query string`

                The search query.

              - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                The sources used in the search.

                - `Type URL`

                  The type of source. Always `url`.

                  - `const URLURL URL = "url"`

                - `URL string`

                  The URL of the source.

            - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

              Action type "open_page" - Opens a specific URL from search results.

              - `Type OpenPage`

                The action type.

                - `const OpenPageOpenPage OpenPage = "open_page"`

              - `URL string`

                The URL opened by the model.

            - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

              Action type "find_in_page": Searches for a pattern within a loaded page.

              - `Pattern string`

                The pattern or text to search for within the page.

              - `Type FindInPage`

                The action type.

                - `const FindInPageFindInPage FindInPage = "find_in_page"`

              - `URL string`

                The URL of the page searched for the pattern.

          - `Status BetaResponseFunctionWebSearchStatus`

            The status of the web search tool call.

            - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

            - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

            - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

            - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

          - `Type WebSearchCall`

            The type of the web search tool call. Always `web_search_call`.

            - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

          - `Agent BetaResponseFunctionWebSearchAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

            - `const FunctionCallFunctionCall FunctionCall = "function_call"`

          - `ID string`

            The unique ID of the function tool call.

          - `Agent BetaResponseFunctionToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the function to run.

          - `Status BetaResponseFunctionToolCallStatus`

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

            - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

            - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

        - `type BetaResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

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

          - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

              An array of content outputs (text, image, file) for the function tool call.

              - `type BetaResponseInputTextContent 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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  The type of the input item. Always `input_image`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail BetaResponseInputImageContentDetail`

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

                  - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                  - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                  - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                  - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileContentDetail`

                  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`.

                  - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                  - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                  - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                - `FileData string`

                  The base64-encoded data of the file to be sent to the model.

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Type FunctionCallOutput`

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

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

            The unique ID of the function tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemFunctionCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Status string`

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

            - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemAgentMessage struct{…}`

          A message routed between agents.

          - `Author string`

            The sending agent identity.

          - `Content []BetaResponseInputItemAgentMessageContentUnion`

            Plaintext, image, or encrypted content sent between agents.

            - `type BetaResponseInputTextContent struct{…}`

              A text input to the model.

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The item type. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `ID string`

            The unique ID of this agent message item.

          - `Agent BetaResponseInputItemAgentMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCall struct{…}`

          - `Action string`

            The multi-agent action that was executed.

            - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

          - `Arguments string`

            The action arguments as a JSON string.

          - `CallID string`

            The unique ID linking this call to its output.

          - `Type MultiAgentCall`

            The item type. Always `multi_agent_call`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `ID string`

            The unique ID of this multi-agent call.

          - `Agent BetaResponseInputItemMultiAgentCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

          - `Action string`

            The multi-agent action that produced this result.

            - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

          - `CallID string`

            The unique ID of the multi-agent call.

          - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

            Text output returned by the multi-agent action.

            - `Text string`

              The text content.

            - `Type OutputText`

              The content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

              Citations associated with the text content.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                - `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 citation type. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                - `EndIndex int64`

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

                - `StartIndex int64`

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

                - `Title string`

                  The title of the cited resource.

                - `Type URLCitation`

                  The citation type. Always `url_citation`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the cited resource.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                - `ContainerID string`

                  The ID of the container.

                - `EndIndex int64`

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

                - `FileID string`

                  The ID of the container file.

                - `Filename string`

                  The filename of the container file cited.

                - `StartIndex int64`

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

                - `Type ContainerFileCitation`

                  The citation type. Always `container_file_citation`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

          - `Type MultiAgentCallOutput`

            The item type. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `ID string`

            The unique ID of this multi-agent call output.

          - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemToolSearchCall struct{…}`

          - `Arguments any`

            The arguments supplied to the tool search call.

          - `Type ToolSearchCall`

            The item type. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `ID string`

            The unique ID of this tool search call.

          - `Agent BetaResponseInputItemToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution string`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

            - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

          - `Status string`

            The status of the tool search call.

            - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

            - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

            - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

        - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by the tool search output.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `Name string`

                The name of the function to call.

              - `Parameters map[string, any]`

                A JSON schema object describing the parameters of the function.

              - `Strict bool`

                Whether strict parameter validation is enforced for this function tool.

              - `Type Function`

                The type of the function tool. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function is deferred and loaded via tool search.

              - `Description string`

                A description of the function. Used by the model to determine whether or not to call the function.

              - `OutputSchema map[string, any]`

                A JSON schema object describing the JSON value encoded in string outputs for this function.

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `Type FileSearch`

                The type of the file search tool. Always `file_search`.

                - `const FileSearchFileSearch FileSearch = "file_search"`

              - `VectorStoreIDs []string`

                The IDs of the vector stores to search.

              - `Filters BetaFileSearchToolFiltersUnion`

                A filter to apply.

                - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

                - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                  Combine multiple filters using `and` or `or`.

                  - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                    Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                    - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                      - `Key string`

                        The key to compare against the value.

                      - `Type string`

                        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                        - `eq`: equals
                        - `ne`: not equal
                        - `gt`: greater than
                        - `gte`: greater than or equal
                        - `lt`: less than
                        - `lte`: less than or equal
                        - `in`: in
                        - `nin`: not in

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                      - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                        The value to compare against the attribute key; supports string, number, or boolean types.

                        - `string`

                        - `float64`

                        - `bool`

                        - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                          - `string`

                          - `float64`

                  - `Type string`

                    Type of operation: `and` or `or`.

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

              - `MaxNumResults int64`

                The maximum number of results to return. This number should be between 1 and 50 inclusive.

              - `RankingOptions BetaFileSearchToolRankingOptions`

                Ranking options for search.

                - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                  Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                  - `EmbeddingWeight float64`

                    The weight of the embedding in the reciprocal ranking fusion.

                  - `TextWeight float64`

                    The weight of the text in the reciprocal ranking fusion.

                - `Ranker string`

                  The ranker to use for the file search.

                  - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                  - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                - `ScoreThreshold float64`

                  The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `Type Computer`

                The type of the computer tool. Always `computer`.

                - `const ComputerComputer Computer = "computer"`

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `DisplayHeight int64`

                The height of the computer display.

              - `DisplayWidth int64`

                The width of the computer display.

              - `Environment BetaComputerUsePreviewToolEnvironment`

                The type of computer environment to control.

                - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

              - `Type ComputerUsePreview`

                The type of the computer use tool. Always `computer_use_preview`.

                - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchToolType`

                The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

              - `Filters BetaWebSearchToolFilters`

                Filters for the search.

                - `AllowedDomains []string`

                  Allowed domains for the search. If not provided, all domains are allowed.
                  Subdomains of the provided domains are allowed as well.

                  Example: `["pubmed.ncbi.nlm.nih.gov"]`

              - `SearchContextSize BetaWebSearchToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchToolUserLocation`

                The approximate location of the user.

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                - `Type string`

                  The type of location approximation. Always `approximate`.

                  - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `ServerLabel string`

                A label for this MCP server, used to identify it in tool calls.

              - `Type Mcp`

                The type of the MCP tool. Always `mcp`.

                - `const McpMcp Mcp = "mcp"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

              - `AllowedTools BetaToolMcpAllowedToolsUnion`

                List of allowed tool names or a filter object.

                - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                  A string array of allowed tool names

                - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `Authorization string`

                An OAuth access token that can be used with a remote MCP server, either
                with a custom MCP server URL or a service connector. Your application
                must handle the OAuth authorization flow and provide the token here.

              - `ConnectorID string`

                Identifier for service connectors, like those available in ChatGPT. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                Currently supported `connector_id` values are:

                - Dropbox: `connector_dropbox`
                - Gmail: `connector_gmail`
                - Google Calendar: `connector_googlecalendar`
                - Google Drive: `connector_googledrive`
                - Microsoft Teams: `connector_microsoftteams`
                - Outlook Calendar: `connector_outlookcalendar`
                - Outlook Email: `connector_outlookemail`
                - SharePoint: `connector_sharepoint`

                - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

              - `DeferLoading bool`

                Whether this MCP tool is deferred and discovered via tool search.

              - `Headers map[string, string]`

                Optional HTTP headers to send to the MCP server. Use for authentication
                or other purposes.

              - `RequireApproval BetaToolMcpRequireApprovalUnion`

                Specify which of the MCP server's tools require approval.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                  Specify which of the MCP server's tools require approval. Can be
                  `always`, `never`, or a filter object associated with tools
                  that require approval.

                  - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                  - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                  Specify a single approval policy for all tools. One of `always` or
                  `never`. When set to `always`, all tools will require approval. When
                  set to `never`, all tools will not require approval.

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

              - `ServerDescription string`

                Optional description of the MCP server, used to provide more context.

              - `ServerURL string`

                The URL for the MCP server. One of `server_url`, `connector_id`, or
                `tunnel_id` must be provided.

              - `TunnelID string`

                The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided.

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

              - `Container BetaToolCodeInterpreterContainerUnion`

                The code interpreter container. Can be a container ID or an object that
                specifies uploaded file IDs to make available to your code, along with an
                optional `memory_limit` setting.

                - `string`

                - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                  Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                  - `Type Auto`

                    Always `auto`.

                    - `const AutoAuto Auto = "auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit string`

                    The memory limit for the code interpreter container.

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `Type Disabled`

                        Disable outbound network access. Always `disabled`.

                        - `const DisabledDisabled Disabled = "disabled"`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                      - `AllowedDomains []string`

                        A list of allowed domains when type is `allowlist`.

                      - `Type Allowlist`

                        Allow outbound network access only to specified domains. Always `allowlist`.

                        - `const AllowlistAllowlist Allowlist = "allowlist"`

                      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                        Optional domain-scoped secrets for allowlisted domains.

                        - `Domain string`

                          The domain associated with the secret.

                        - `Name string`

                          The name of the secret to inject for the domain.

                        - `Value string`

                          The secret value to inject for the domain.

              - `Type CodeInterpreter`

                The type of the code interpreter tool. Always `code_interpreter`.

                - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

            - `type BetaToolProgrammaticToolCalling struct{…}`

              - `Type ProgrammaticToolCalling`

                The type of the tool. Always `programmatic_tool_calling`.

                - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

              - `Type ImageGeneration`

                The type of the image generation tool. Always `image_generation`.

                - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

              - `Action string`

                Whether to generate a new image or edit an existing image. Default: `auto`.

                - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

              - `Background string`

                Allows to set transparency for the background of the generated image(s).
                This parameter is only supported for GPT image models that support
                transparent backgrounds. Must be one of `transparent`, `opaque`, or
                `auto` (default value). When `auto` is used, the model will
                automatically determine the best background for the image.

                `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                transparent backgrounds. Requests with `background` set to
                `transparent` will return an error for these models; use `opaque` or
                `auto` instead.

                If `transparent`, the output format needs to support transparency,
                so it should be set to either `png` (default value) or `webp`.

                - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

              - `InputFidelity string`

                Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

              - `InputImageMask BetaToolImageGenerationInputImageMask`

                Optional mask for inpainting. Contains `image_url`
                (string, optional) and `file_id` (string, optional).

                - `FileID string`

                  File ID for the mask image.

                - `ImageURL string`

                  Base64-encoded mask image.

              - `Model string`

                The image generation model to use. Default: `gpt-image-1`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                  - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                  - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                  - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                  - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                  - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

              - `Moderation string`

                Moderation level for the generated image. Default: `auto`.

                - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

              - `OutputCompression int64`

                Compression level for the output image. Default: 100.

              - `OutputFormat string`

                The output format of the generated image. One of `png`, `webp`, or
                `jpeg`. Default: `png`.

                - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

              - `PartialImages int64`

                Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              - `Quality string`

                The quality of the generated image. One of `low`, `medium`, `high`,
                or `auto`. Default: `auto`.

                - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

              - `Size string`

                The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                  - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                  - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                  - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

              - `Type LocalShell`

                The type of the local shell tool. Always `local_shell`.

                - `const LocalShellLocalShell LocalShell = "local_shell"`

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

              - `Type Shell`

                The type of the shell tool. Always `shell`.

                - `const ShellShell Shell = "shell"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

              - `Environment BetaFunctionShellToolEnvironmentUnion`

                - `type BetaContainerAuto struct{…}`

                  - `Type ContainerAuto`

                    Automatically creates a container for this request

                    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit BetaContainerAutoMemoryLimit`

                    The memory limit for the container.

                    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `Skills []BetaContainerAutoSkillUnion`

                    An optional list of skills referenced by id or inline data.

                    - `type BetaSkillReference struct{…}`

                      - `SkillID string`

                        The ID of the referenced skill.

                      - `Type SkillReference`

                        References a skill created with the /v1/skills endpoint.

                        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                      - `Version string`

                        Optional skill version. Use a positive integer or 'latest'. Omit for default.

                    - `type BetaInlineSkill struct{…}`

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Source BetaInlineSkillSource`

                        Inline skill payload

                        - `Data string`

                          Base64-encoded skill zip bundle.

                        - `MediaType ApplicationZip`

                          The media type of the inline skill payload. Must be `application/zip`.

                          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                        - `Type Base64`

                          The type of the inline skill source. Must be `base64`.

                          - `const Base64Base64 Base64 = "base64"`

                      - `Type Inline`

                        Defines an inline skill for this request.

                        - `const InlineInline Inline = "inline"`

                - `type BetaLocalEnvironment struct{…}`

                  - `Type Local`

                    Use a local computer environment.

                    - `const LocalLocal Local = "local"`

                  - `Skills []BetaLocalSkill`

                    An optional list of skills.

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Path string`

                      The path to the directory containing the skill.

                - `type BetaContainerReference struct{…}`

                  - `ContainerID string`

                    The ID of the referenced container.

                  - `Type ContainerReference`

                    References a container created with the /v1/containers endpoint

                    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Name string`

                The name of the custom tool, used to identify it in tool calls.

              - `Type Custom`

                The type of the custom tool. Always `custom`.

                - `const CustomCustom Custom = "custom"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this tool should be deferred and discovered via tool search.

              - `Description string`

                Optional description of the custom tool, used to provide more context.

              - `Format BetaCustomToolFormatUnion`

                The input format for the custom tool. Default is unconstrained text.

                - `type BetaCustomToolFormatText struct{…}`

                  Unconstrained free-form text.

                  - `Type Text`

                    Unconstrained text format. Always `text`.

                    - `const TextText Text = "text"`

                - `type BetaCustomToolFormatGrammar struct{…}`

                  A grammar defined by the user.

                  - `Definition string`

                    The grammar definition.

                  - `Syntax string`

                    The syntax of the grammar definition. One of `lark` or `regex`.

                    - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                    - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                  - `Type Grammar`

                    Grammar format. Always `grammar`.

                    - `const GrammarGrammar Grammar = "grammar"`

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

              - `Description string`

                A description of the namespace shown to the model.

              - `Name string`

                The namespace name used in tool calls (for example, `crm`).

              - `Tools []BetaNamespaceToolToolUnion`

                The function/custom tools available inside this namespace.

                - `type BetaNamespaceToolToolFunction struct{…}`

                  - `Name string`

                  - `Type Function`

                    - `const FunctionFunction Function = "function"`

                  - `AllowedCallers []string`

                    The tool invocation context(s).

                    - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                    - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                  - `DeferLoading bool`

                    Whether this function should be deferred and discovered via tool search.

                  - `Description string`

                  - `OutputSchema map[string, any]`

                    A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                  - `Parameters any`

                  - `Strict bool`

                    Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                - `type BetaCustomTool struct{…}`

                  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Type Namespace`

                The type of the tool. Always `namespace`.

                - `const NamespaceNamespace Namespace = "namespace"`

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

              - `Type ToolSearch`

                The type of the tool. Always `tool_search`.

                - `const ToolSearchToolSearch ToolSearch = "tool_search"`

              - `Description string`

                Description shown to the model for a client-executed tool search tool.

              - `Execution BetaToolSearchToolExecution`

                Whether tool search is executed by the server or by the client.

                - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

              - `Parameters any`

                Parameter schema for a client-executed tool search tool.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchPreviewToolType`

                The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

              - `SearchContentTypes []string`

                - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

              - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchPreviewToolUserLocation`

                The user's location.

                - `Type Approximate`

                  The type of location approximation. Always `approximate`.

                  - `const ApproximateApproximate Approximate = "approximate"`

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

              - `Type ApplyPatch`

                The type of the tool. Always `apply_patch`.

                - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

          - `Type ToolSearchOutput`

            The item type. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `ID string`

            The unique ID of this tool search output.

          - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution BetaResponseToolSearchOutputItemParamExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

            - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemParamStatus`

            The status of the tool search output.

            - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

        - `type BetaResponseInputItemAdditionalTools struct{…}`

          - `Role Developer`

            The role that provided the additional tools. Only `developer` is supported.

            - `const DeveloperDeveloper Developer = "developer"`

          - `Tools []BetaToolUnion`

            A list of additional tools made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The item type. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `ID string`

            The unique ID of this additional tools item.

          - `Agent BetaResponseInputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

          - `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`.

              - `const SummaryTextSummaryText SummaryText = "summary_text"`

          - `Type Reasoning`

            The type of the object. Always `reasoning`.

            - `const ReasoningReasoning Reasoning = "reasoning"`

          - `Agent BetaResponseReasoningItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Content []BetaResponseReasoningItemContent`

            Reasoning text content.

            - `Text string`

              The reasoning text from the model.

            - `Type ReasoningText`

              The type of the reasoning text. Always `reasoning_text`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `EncryptedContent string`

            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.

          - `Status BetaResponseReasoningItemStatus`

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

            - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

            - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

            - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

        - `type BetaResponseCompactionItemParamResp struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `EncryptedContent string`

            The encrypted content of the compaction summary.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

            The ID of the compaction item.

          - `Agent BetaResponseCompactionItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseInputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

          - `ID string`

            The unique ID of the code interpreter tool call.

          - `Code string`

            The code to run, or null if not available.

          - `ContainerID string`

            The ID of the container used to run the code.

          - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

            The outputs generated by the code interpreter, such as logs or images.
            Can be null if no outputs are available.

            - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

              The logs output from the code interpreter.

              - `Logs string`

                The logs output from the code interpreter.

              - `Type Logs`

                The type of the output. Always `logs`.

                - `const LogsLogs Logs = "logs"`

            - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

              The image output from the code interpreter.

              - `Type Image`

                The type of the output. Always `image`.

                - `const ImageImage Image = "image"`

              - `URL string`

                The URL of the image output from the code interpreter.

          - `Status BetaResponseCodeInterpreterToolCallStatus`

            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

            - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

            - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

            - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

            - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

            - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

          - `Type CodeInterpreterCall`

            The type of the code interpreter tool call. Always `code_interpreter_call`.

            - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

          - `Agent BetaResponseCodeInterpreterToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCall struct{…}`

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

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseInputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemShellCall struct{…}`

          A tool representing a request to execute one or more shell commands.

          - `Action BetaResponseInputItemShellCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

              Ordered shell commands for the execution environment to run.

            - `MaxOutputLength int64`

              Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

            - `TimeoutMs int64`

              Maximum wall-clock time in milliseconds to allow the shell commands to run.

          - `CallID string`

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

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

            The environment to execute the shell commands in.

            - `type BetaLocalEnvironment struct{…}`

            - `type BetaContainerReference struct{…}`

          - `Status string`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

            - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

        - `type BetaResponseInputItemShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

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

          - `Output []BetaResponseFunctionShellCallOutputContent`

            Captured chunks of stdout and stderr output, along with their associated outcomes.

            - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

              The exit or timeout outcome associated with this shell call.

              - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  The exit code returned by the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              Captured stderr output for the shell call.

            - `Stdout string`

              Captured stdout output for the shell call.

          - `Type ShellCallOutput`

            The type of the item. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

            The unique ID of the shell tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `MaxOutputLength int64`

            The maximum number of UTF-8 characters captured for this shell call's combined output.

          - `Status string`

            The status of the shell call output.

            - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemApplyPatchCall struct{…}`

          A tool call representing a request to create, delete, or update files using diff patches.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

            The specific create, delete, or update instruction for the apply_patch tool call.

            - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply when creating the file.

              - `Path string`

                Path of the file to create relative to the workspace root.

              - `Type CreateFile`

                The operation type. Always `create_file`.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

                Path of the file to delete relative to the workspace root.

              - `Type DeleteFile`

                The operation type. Always `delete_file`.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply to the existing file.

              - `Path string`

                Path of the file to update relative to the workspace root.

              - `Type UpdateFile`

                The operation type. Always `update_file`.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status string`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

            - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status string`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

            - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Output string`

            Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

        - `type BetaResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseInputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseInputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

            The unique ID of the approval response

          - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `type BetaResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseInputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

            - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

            - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

        - `type BetaResponseCustomToolCallOutput struct{…}`

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

          - `CallID string`

            The call ID, used to map this custom tool call output to a custom tool call.

          - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              Text, image, or file output of the custom tool call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            The type of the custom tool call output. Always `custom_tool_call_output`.

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

            The unique ID of the custom tool call output in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

          - `CallID string`

            An identifier used to map this custom tool call to a tool call output.

          - `Input string`

            The input for the custom tool call generated by the model.

          - `Name string`

            The name of the custom tool being called.

          - `Type CustomToolCall`

            The type of the custom tool call. Always `custom_tool_call`.

            - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

          - `ID string`

            The unique ID of the custom tool call in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the custom tool being called.

        - `type BetaResponseInputItemCompactionTrigger struct{…}`

          Compacts the current context. Must be the final input item.

          - `Type CompactionTrigger`

            The type of the item. Always `compaction_trigger`.

            - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

          - `Agent BetaResponseInputItemCompactionTriggerAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

            The ID of the item to reference.

          - `Agent BetaResponseInputItemItemReferenceAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Type string`

            The type of item to reference. Always `item_reference`.

            - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

        - `type BetaResponseInputItemProgram struct{…}`

          - `ID string`

            The unique ID of this program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The item type. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseInputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of this program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output.

            - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

            - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The item type. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseInputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

    - `Metadata map[string, string]`

      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.

    - `Model BetaResponseModel`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `type BetaResponseModel string`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

        - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

        - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

        - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

        - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

        - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

        - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

        - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

        - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

        - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

        - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

        - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

        - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

        - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

        - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

        - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

        - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

        - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

        - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

        - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

        - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

        - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

        - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

        - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

        - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

        - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

        - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

        - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

        - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

        - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

        - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

        - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

        - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

        - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

        - `const BetaResponseModelO3 BetaResponseModel = "o3"`

        - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

        - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

        - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

        - `const BetaResponseModelO1 BetaResponseModel = "o1"`

        - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

        - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

        - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

        - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

        - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

        - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

        - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

        - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

        - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

        - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

        - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

        - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

        - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

        - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

        - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

        - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

        - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

        - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

        - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

        - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

        - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

        - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

        - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

        - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

        - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

        - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

        - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

        - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

        - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

        - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

        - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

        - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

        - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

        - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

        - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

        - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

        - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

        - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

        - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

        - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

        - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

        - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

        - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

        - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

        - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

        - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

        - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

        - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

        - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

        - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

        - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

      - `string`

    - `Object Response`

      The object type of this resource - always set to `response`.

      - `const ResponseResponse Response = "response"`

    - `Output []BetaResponseOutputItemUnion`

      An array of content items generated by the model.

      - The length and order of items in the `output` array is dependent
        on the model's response.
      - Rather than accessing the first item in the `output` array and
        assuming it's an `assistant` message with the content generated by
        the model, you might consider using the `output_text` property where
        supported in SDKs.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

        - `ID string`

          The unique ID of the function call tool output.

        - `CallID string`

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

        - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

          - `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`.

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `Agent BetaResponseFunctionToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `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.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

          - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

            A text content.

            - `Text string`

            - `Type Text`

              - `const TextText Text = "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`.

              - `const SummaryTextSummaryText SummaryText = "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`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `type BetaResponseOutputRefusal struct{…}`

            A refusal from the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `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`.

              - `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.

            - `Type ComputerScreenshot`

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

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

          - `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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The type of the item. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `Agent BetaResponseOutputItemAgentMessageAgent`

          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.

          - `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`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `Agent BetaResponseOutputItemMultiAgentCallAgent`

          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.

          - `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.

        - `Output []BetaResponseOutputText`

          Text output returned by the multi-agent action.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

          - `Logprobs []BetaResponseOutputTextLogprob`

        - `Type MultiAgentCallOutput`

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

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `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.

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          A computer screenshot image used with the computer use tool.

        - `Status BetaResponseComputerToolCallOutputItemStatus`

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

          - `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`.

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseComputerToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseOutputItemProgram struct{…}`

        - `ID string`

          The unique ID of the program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The type of the item. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseOutputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of the program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output item.

          - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

          - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The type of the item. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseOutputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseToolSearchCall struct{…}`

        - `ID string`

          The unique ID of the tool search call item.

        - `Arguments any`

          Arguments used for the tool search call.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchCallExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

          - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

        - `Status BetaResponseToolSearchCallStatus`

          The status of the tool search call item that was recorded.

          - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

          - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

          - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

        - `Type ToolSearchCall`

          The type of the item. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `Agent BetaResponseToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseToolSearchOutputItem struct{…}`

        - `ID string`

          The unique ID of the tool search output item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

          - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemStatus`

          The status of the tool search output item that was recorded.

          - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by tool search.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ToolSearchOutput`

          The type of the item. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `Agent BetaResponseToolSearchOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemAdditionalTools struct{…}`

        - `ID string`

          The unique ID of the additional tools item.

        - `Role string`

          The role that provided the additional tools.

          - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

          - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

          - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

          - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

          - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

          - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

        - `Tools []BetaToolUnion`

          The additional tool definitions made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The type of the item. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `Agent BetaResponseOutputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCompactionItem struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `ID string`

          The unique ID of the compaction item.

        - `EncryptedContent string`

          The encrypted content that was produced by compaction.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `Agent BetaResponseCompactionItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseOutputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseOutputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseOutputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionShellToolCall struct{…}`

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

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Action BetaResponseFunctionShellToolCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

          - `MaxOutputLength int64`

            Optional maximum number of characters to return from each command.

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the commands.

        - `CallID string`

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

        - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

          Represents the use of a local environment to perform shell actions.

          - `type BetaResponseLocalEnvironment struct{…}`

            Represents the use of a local environment to perform shell actions.

            - `Type Local`

              The environment type. Always `local`.

              - `const LocalLocal Local = "local"`

          - `type BetaResponseContainerReference struct{…}`

            Represents a container created with /v1/containers.

            - `ContainerID string`

            - `Type ContainerReference`

              The environment type. Always `container_reference`.

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `Status BetaResponseFunctionShellToolCallStatus`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `Agent BetaResponseFunctionShellToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

        - `ID string`

          The unique ID of the shell call output. Populated when this item is returned via API.

        - `CallID string`

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

        - `MaxOutputLength int64`

          The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

        - `Output []BetaResponseFunctionShellToolCallOutputOutput`

          An array of shell call output contents

          - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

            Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                Exit code from the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            The standard error output that was captured.

          - `Stdout string`

            The standard output that was captured.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `Status BetaResponseFunctionShellToolCallOutputStatus`

          The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

        - `Type ShellCallOutput`

          The type of the shell call output. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `Agent BetaResponseFunctionShellToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseApplyPatchToolCall struct{…}`

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

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseApplyPatchToolCallOperationUnion`

          One of the create_file, delete_file, or update_file operations applied via apply_patch.

          - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

            Instruction describing how to create a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to create.

            - `Type CreateFile`

              Create a new file with the provided diff.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

            Instruction describing how to delete a file via the apply_patch tool.

            - `Path string`

              Path of the file to delete.

            - `Type DeleteFile`

              Delete the specified file.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

            Instruction describing how to update a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to update.

            - `Type UpdateFile`

              Update an existing file with the provided diff.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status BetaResponseApplyPatchToolCallStatus`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

          - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `Agent BetaResponseApplyPatchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status BetaResponseApplyPatchToolCallOutputStatus`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

          - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `Agent BetaResponseApplyPatchToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call output.

        - `Output string`

          Optional textual output returned by the apply patch tool.

      - `type BetaResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseOutputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

          - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

          - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

      - `type BetaResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseOutputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseOutputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ID string`

          The unique ID of the approval response

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `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.

        - `ID string`

          The unique ID of the custom tool call output item.

        - `Status string`

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

          - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

          - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

          - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

    - `ParallelToolCalls bool`

      Whether to allow the model to run tool calls in parallel.

    - `Temperature float64`

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
      We generally recommend altering this or `top_p` but not both.

    - `ToolChoice BetaResponseToolChoiceUnion`

      How the model should select which tool (or tools) to use when generating
      a response. See the `tools` parameter to see how to specify which tools
      the model can call.

      - `type BetaToolChoiceOptions string`

        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a message.

        `auto` means the model can pick between generating a message or calling one or
        more tools.

        `required` means the model must call one or more tools.

        - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

        - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

        - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

      - `type BetaToolChoiceAllowed struct{…}`

        Constrains the tools available to the model to a pre-defined set.

        - `Mode BetaToolChoiceAllowedMode`

          Constrains the tools available to the model to a pre-defined set.

          `auto` allows the model to pick from among the allowed tools and generate a
          message.

          `required` requires the model to call one or more of the allowed tools.

          - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

          - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

        - `Tools []map[string, any]`

          A list of tool definitions that the model should be allowed to call.

          For the Responses API, the list of tool definitions might look like:

          ```json
          [
            { "type": "function", "name": "get_weather" },
            { "type": "mcp", "server_label": "deepwiki" },
            { "type": "image_generation" }
          ]
          ```

        - `Type AllowedTools`

          Allowed tool configuration type. Always `allowed_tools`.

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type BetaToolChoiceTypes struct{…}`

        Indicates that the model should use a built-in tool to generate a response.
        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

        - `Type BetaToolChoiceTypesType`

          The type of hosted tool the model should to use. Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).

          Allowed values are:

          - `file_search`
          - `web_search_preview`
          - `computer`
          - `computer_use_preview`
          - `computer_use`
          - `code_interpreter`
          - `image_generation`

          - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

          - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

          - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

          - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

          - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

      - `type BetaToolChoiceFunction struct{…}`

        Use this option to force the model to call a specific function.

        - `Name string`

          The name of the function to call.

        - `Type Function`

          For function calling, the type is always `function`.

          - `const FunctionFunction Function = "function"`

      - `type BetaToolChoiceMcp struct{…}`

        Use this option to force the model to call a specific tool on a remote MCP server.

        - `ServerLabel string`

          The label of the MCP server to use.

        - `Type Mcp`

          For MCP tools, the type is always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

          The name of the tool to call on the server.

      - `type BetaToolChoiceCustom struct{…}`

        Use this option to force the model to call a specific custom tool.

        - `Name string`

          The name of the custom tool to call.

        - `Type Custom`

          For custom tool calling, the type is always `custom`.

          - `const CustomCustom Custom = "custom"`

      - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

        - `Type ProgrammaticToolCalling`

          The tool to call. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolChoiceApplyPatch struct{…}`

        Forces the model to call the apply_patch tool when executing a tool call.

        - `Type ApplyPatch`

          The tool to call. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type BetaToolChoiceShell struct{…}`

        Forces the model to call the shell tool when a tool call is required.

        - `Type Shell`

          The tool to call. Always `shell`.

          - `const ShellShell Shell = "shell"`

    - `Tools []BetaToolUnion`

      An array of tools the model may call while generating a response. You
      can specify which tool to use by setting the `tool_choice` parameter.

      We support the following categories of tools:

      - **Built-in tools**: Tools that are provided by OpenAI that extend the
        model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
        or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).
      - **MCP Tools**: Integrations with third-party systems via custom MCP servers
        or predefined connectors such as Google Drive and SharePoint. Learn more about
        [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
      - **Function calls (custom tools)**: Functions that are defined by you,
        enabling the model to call your own code with strongly typed arguments
        and outputs. Learn more about
        [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
        custom tools to call your own code.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `TopP float64`

      An alternative to sampling with temperature, called nucleus sampling,
      where the model considers the results of the tokens with top_p probability
      mass. So 0.1 means only the tokens comprising the top 10% probability mass
      are considered.

      We generally recommend altering this or `temperature` but not both.

    - `Background bool`

      Whether to run the model response in the background.
      [Learn more](https://platform.openai.com/docs/guides/background).

    - `CompletedAt float64`

      Unix timestamp (in seconds) of when this Response was completed.
      Only present when the status is `completed`.

    - `Conversation BetaResponseConversation`

      The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

      - `ID string`

        The unique ID of the conversation that this response was associated with.

    - `MaxOutputTokens int64`

      An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

    - `MaxToolCalls int64`

      The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

    - `Moderation BetaResponseModeration`

      Moderation results for the response input and output, if moderated completions were requested.

      - `Input BetaResponseModerationInputUnion`

        Moderation for the response input.

        - `type BetaResponseModerationInputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationInputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

      - `Output BetaResponseModerationOutputUnion`

        Moderation for the response output.

        - `type BetaResponseModerationOutputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationOutputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

    - `PreviousResponseID string`

      The unique ID of the previous response to the model. Use this to
      create multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

    - `Prompt BetaResponsePrompt`

      Reference to a prompt template and its variables.
      [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

      - `ID string`

        The unique identifier of the prompt template to use.

      - `Variables map[string, BetaResponsePromptVariableUnion]`

        Optional map of values to substitute in for variables in your
        prompt. The substitution values can either be strings, or other
        Response input types like images or files.

        - `string`

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

        Optional version of the prompt template.

    - `PromptCacheKey string`

      Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

    - `PromptCacheOptions BetaResponsePromptCacheOptions`

      The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

      - `Mode string`

        Whether implicit prompt-cache breakpoints were enabled.

        - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

        - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

      - `Ttl string`

        The minimum lifetime applied to each cache breakpoint.

        - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

    - `PromptCacheRetention BetaResponsePromptCacheRetention`

      Deprecated. Use `prompt_cache_options.ttl` instead.

      The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
      This field expresses a maximum retention policy, while
      `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
      fields are independent and do not interact.
      For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

      For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

      - Organizations without ZDR enabled default to `24h`.
      - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

      - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

      - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

    - `Reasoning BetaResponseReasoning`

      **gpt-5 and o-series models only**

      Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

      - `Context string`

        Controls which reasoning items are rendered back to the model on later turns.
        If omitted or set to `auto`, the model determines the context mode. The
        `gpt-5.6` model family defaults to `all_turns`; earlier models default to
        `current_turn`.

        When returned on a response, this is the effective reasoning context mode
        used for the response.

        - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

        - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

        - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

      - `Effort string`

        Constrains effort on reasoning for reasoning models. Currently supported
        values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
        Reducing reasoning effort can result in faster responses and fewer tokens
        used on reasoning in a response. Not all reasoning models support every
        value. See the
        [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
        for model-specific support.

        - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

        - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

        - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

        - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

        - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

        - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

        - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

      - `GenerateSummary string`

        **Deprecated:** use `summary` instead.

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

        - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

        - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

      - `Mode string`

        Controls the reasoning execution mode for the request.

        When returned on a response, this is the effective execution mode.

        - `string`

        - `string`

          - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

          - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

      - `Summary string`

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

        - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

        - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

        - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

      A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
      The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `ServiceTier BetaResponseServiceTier`

      Specifies the processing type used for serving the request.

      - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
      - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
      - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
      - When not set, the default behavior is 'auto'.

      When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

      - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

      - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

      - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

      - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

      - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

    - `Status BetaResponseStatus`

      The status of the response generation. One of `completed`, `failed`,
      `in_progress`, `cancelled`, `queued`, or `incomplete`.

      - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

      - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

      - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

      - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

      - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

      - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

    - `Text BetaResponseTextConfig`

      Configuration options for a text response from the model. Can be plain
      text or structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

      - `Format BetaResponseFormatTextConfigUnion`

        An object specifying the format that the model must output.

        Configuring `{ "type": "json_schema" }` enables Structured Outputs,
        which ensures the model will match your supplied JSON schema. Learn more in the
        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

        The default format is `{ "type": "text" }` with no additional options.

        **Not recommended for gpt-4o and newer models:**

        Setting to `{ "type": "json_object" }` enables the older JSON mode, which
        ensures the message the model generates is valid JSON. Using `json_schema`
        is preferred for models that support it.

        - `type BetaResponseFormatTextConfigText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            The type of response format being defined. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

          JSON Schema response format. Used to generate structured JSON responses.
          Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

          - `Name string`

            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.

          - `Schema map[string, any]`

            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).

          - `Type JSONSchema`

            The type of response format being defined. Always `json_schema`.

            - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

          - `Description string`

            A description of what the response format is for, used by the model to
            determine how to respond in the format.

          - `Strict bool`

            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).

        - `type BetaResponseFormatTextConfigJSONObject struct{…}`

          JSON object response format. An older method of generating JSON responses.
          Using `json_schema` is recommended for models that support it. Note that the
          model will not generate JSON without a system or user message instructing it
          to do so.

          - `Type JSONObject`

            The type of response format being defined. Always `json_object`.

            - `const JSONObjectJSONObject JSONObject = "json_object"`

      - `Verbosity BetaResponseTextConfigVerbosity`

        Constrains the verbosity of the model's response. Lower values will result in
        more concise responses, while higher values will result in more verbose responses.
        Currently supported values are `low`, `medium`, and `high`. The default is
        `medium`.

        - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

        - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

        - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

    - `TopLogprobs int64`

      An integer between 0 and 20 specifying the maximum number of most likely
      tokens to return at each token position, each with an associated log
      probability. In some cases, the number of returned tokens may be fewer than
      requested.

    - `Truncation BetaResponseTruncation`

      The truncation strategy to use for the model response.

      - `auto`: If the input to this Response exceeds
        the model's context window size, the model will truncate the
        response to fit the context window by dropping items from the beginning of the conversation.
      - `disabled` (default): If the input size will exceed the context window
        size for a model, the request will fail with a 400 error.

      - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

      - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

    - `Usage BetaResponseUsage`

      Represents token usage details including input tokens, output tokens,
      a breakdown of output tokens, and the total tokens used.

      - `InputTokens int64`

        The number of input tokens.

      - `InputTokensDetails BetaResponseUsageInputTokensDetails`

        A detailed breakdown of the input tokens.

        - `CacheWriteTokens int64`

          The number of input tokens that were written to the cache.

        - `CachedTokens int64`

          The number of tokens that were retrieved from the cache.
          [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

      - `OutputTokens int64`

        The number of output tokens.

      - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

        A detailed breakdown of the output tokens.

        - `ReasoningTokens int64`

          The number of reasoning tokens.

      - `TotalTokens int64`

        The total number of tokens used.

    - `User string`

      This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
      A stable identifier for your end-users.
      Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `SequenceNumber int64`

    The sequence number for this event.

  - `Type ResponseCompleted`

    The type of the event. Always `response.completed`.

    - `const ResponseCompletedResponseCompleted ResponseCompleted = "response.completed"`

  - `Agent BetaResponseCompletedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Computer Tool Call

- `type BetaResponseComputerToolCall struct{…}`

  A tool call to a computer use tool. See the
  [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

      The type of the pending safety check.

    - `Message string`

      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.

    - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

    - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

    - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

  - `Type BetaResponseComputerToolCallType`

    The type of the computer call. Always `computer_call`.

    - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

  - `Action BetaComputerActionUnion`

    A click action.

    - `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`.

        - `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`.

        - `const ClickClick Click = "click"`

      - `X int64`

        The x-coordinate where the click occurred.

      - `Y int64`

        The y-coordinate where the click occurred.

      - `Keys []string`

        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`.

        - `const DoubleClickDoubleClick DoubleClick = "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`.

        - `const DragDrag Drag = "drag"`

      - `Keys []string`

        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`.

        - `const KeypressKeypress Keypress = "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`.

        - `const MoveMove Move = "move"`

      - `X int64`

        The x-coordinate to move to.

      - `Y int64`

        The y-coordinate to move to.

      - `Keys []string`

        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`.

        - `const ScreenshotScreenshot Screenshot = "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`.

        - `const ScrollScroll Scroll = "scroll"`

      - `X int64`

        The x-coordinate where the scroll occurred.

      - `Y int64`

        The y-coordinate where the scroll occurred.

      - `Keys []string`

        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`.

        - `const TypeType Type = "type"`

    - `type BetaComputerActionWait struct{…}`

      A wait action.

      - `Type Wait`

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

        - `const WaitWait Wait = "wait"`

  - `Actions BetaComputerActionList`

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

    - `type BetaComputerActionClick struct{…}`

      A click action.

    - `type BetaComputerActionDoubleClick struct{…}`

      A double click action.

    - `type BetaComputerActionDrag struct{…}`

      A drag action.

    - `type BetaComputerActionKeypress struct{…}`

      A collection of keypresses the model would like to perform.

    - `type BetaComputerActionMove struct{…}`

      A mouse move action.

    - `type BetaComputerActionScreenshot struct{…}`

      A screenshot action.

    - `type BetaComputerActionScroll struct{…}`

      A scroll action.

    - `type BetaComputerActionType struct{…}`

      An action to type in text.

    - `type BetaComputerActionWait struct{…}`

      A wait action.

  - `Agent BetaResponseComputerToolCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Computer Tool Call Output 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.

  - `Output BetaResponseComputerToolCallOutputScreenshot`

    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`.

      - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

    - `FileID string`

      The identifier of an uploaded file that contains the screenshot.

    - `ImageURL string`

      The URL of the screenshot image.

  - `Status BetaResponseComputerToolCallOutputItemStatus`

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

    - `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`.

    - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

  - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

    - `ID string`

      The ID of the pending safety check.

    - `Code string`

      The type of the pending safety check.

    - `Message string`

      Details about the pending safety check.

  - `Agent BetaResponseComputerToolCallOutputItemAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Computer Tool Call Output Screenshot

- `type BetaResponseComputerToolCallOutputScreenshot struct{…}`

  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`.

    - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

  - `FileID string`

    The identifier of an uploaded file that contains the screenshot.

  - `ImageURL string`

    The URL of the screenshot image.

### Beta Response Container Reference

- `type BetaResponseContainerReference struct{…}`

  Represents a container created with /v1/containers.

  - `ContainerID string`

  - `Type ContainerReference`

    The environment type. Always `container_reference`.

    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

### Beta Response Content

- `type BetaResponseContentUnion interface{…}`

  Multi-modal input and output contents.

  - `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`.

      - `const InputTextInputText InputText = "input_text"`

    - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputImage struct{…}`

    An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

    - `Detail BetaResponseInputImageDetail`

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

      - `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`.

      - `const InputImageInputImage InputImage = "input_image"`

    - `FileID string`

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

    - `ImageURL string`

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

    - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputFile struct{…}`

    A file input to the model.

    - `Type InputFile`

      The type of the input item. Always `input_file`.

      - `const InputFileInputFile InputFile = "input_file"`

    - `Detail BetaResponseInputFileDetail`

      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`.

      - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

      - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

      - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

    - `FileData string`

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

    - `FileID string`

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

    - `FileURL string`

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

    - `Filename string`

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

    - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseOutputText struct{…}`

    A text output from the model.

    - `Annotations []BetaResponseOutputTextAnnotationUnion`

      The annotations of the text output.

      - `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`.

          - `const FileCitationFileCitation FileCitation = "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`.

          - `const URLCitationURLCitation URLCitation = "url_citation"`

        - `URL string`

          The URL of the web resource.

      - `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`.

          - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

          - `const FilePathFilePath FilePath = "file_path"`

    - `Text string`

      The text output from the model.

    - `Type OutputText`

      The type of the output text. Always `output_text`.

      - `const OutputTextOutputText OutputText = "output_text"`

    - `Logprobs []BetaResponseOutputTextLogprob`

      - `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`.

      - `const RefusalRefusal Refusal = "refusal"`

  - `BetaResponseContentReasoningText`

    - `Text string`

      The reasoning text from the model.

    - `Type ReasoningText`

      The type of the reasoning text. Always `reasoning_text`.

      - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

### Beta Response Content Part Added Event

- `type BetaResponseContentPartAddedEvent struct{…}`

  Emitted when a new content part is added.

  - `ContentIndex int64`

    The index of the content part that was added.

  - `ItemID string`

    The ID of the output item that the content part was added to.

  - `OutputIndex int64`

    The index of the output item that the content part was added to.

  - `Part BetaResponseContentPartAddedEventPartUnion`

    The content part that was added.

    - `type BetaResponseOutputText struct{…}`

      A text output from the model.

      - `Annotations []BetaResponseOutputTextAnnotationUnion`

        The annotations of the text output.

        - `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`.

            - `const FileCitationFileCitation FileCitation = "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`.

            - `const URLCitationURLCitation URLCitation = "url_citation"`

          - `URL string`

            The URL of the web resource.

        - `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`.

            - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

            - `const FilePathFilePath FilePath = "file_path"`

      - `Text string`

        The text output from the model.

      - `Type OutputText`

        The type of the output text. Always `output_text`.

        - `const OutputTextOutputText OutputText = "output_text"`

      - `Logprobs []BetaResponseOutputTextLogprob`

        - `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`.

        - `const RefusalRefusal Refusal = "refusal"`

    - `type BetaResponseContentPartAddedEventPartReasoningText 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`.

        - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseContentPartAdded`

    The type of the event. Always `response.content_part.added`.

    - `const ResponseContentPartAddedResponseContentPartAdded ResponseContentPartAdded = "response.content_part.added"`

  - `Agent BetaResponseContentPartAddedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Content Part Done Event

- `type BetaResponseContentPartDoneEvent struct{…}`

  Emitted when a content part is done.

  - `ContentIndex int64`

    The index of the content part that is done.

  - `ItemID string`

    The ID of the output item that the content part was added to.

  - `OutputIndex int64`

    The index of the output item that the content part was added to.

  - `Part BetaResponseContentPartDoneEventPartUnion`

    The content part that is done.

    - `type BetaResponseOutputText struct{…}`

      A text output from the model.

      - `Annotations []BetaResponseOutputTextAnnotationUnion`

        The annotations of the text output.

        - `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`.

            - `const FileCitationFileCitation FileCitation = "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`.

            - `const URLCitationURLCitation URLCitation = "url_citation"`

          - `URL string`

            The URL of the web resource.

        - `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`.

            - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

            - `const FilePathFilePath FilePath = "file_path"`

      - `Text string`

        The text output from the model.

      - `Type OutputText`

        The type of the output text. Always `output_text`.

        - `const OutputTextOutputText OutputText = "output_text"`

      - `Logprobs []BetaResponseOutputTextLogprob`

        - `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`.

        - `const RefusalRefusal Refusal = "refusal"`

    - `type BetaResponseContentPartDoneEventPartReasoningText 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`.

        - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseContentPartDone`

    The type of the event. Always `response.content_part.done`.

    - `const ResponseContentPartDoneResponseContentPartDone ResponseContentPartDone = "response.content_part.done"`

  - `Agent BetaResponseContentPartDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Conversation Param

- `type BetaResponseConversationParamResp struct{…}`

  The conversation that this response belongs to.

  - `ID string`

    The unique ID of the conversation.

### Beta Response Created Event

- `type BetaResponseCreatedEvent struct{…}`

  An event that is emitted when a response is created.

  - `Response BetaResponse`

    The response that was created.

    - `ID string`

      Unique identifier for this Response.

    - `CreatedAt float64`

      Unix timestamp (in seconds) of when this Response was created.

    - `Error BetaResponseError`

      An error object returned when the model fails to generate a Response.

      - `Code BetaResponseErrorCode`

        The error code for the response.

        - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

        - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

        - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

        - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

        - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

        - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

        - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

        - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

        - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

        - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

        - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

        - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

        - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

        - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

        - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

        - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

        - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

        - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

        - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

        - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

      - `Message string`

        A human-readable description of the error.

    - `IncompleteDetails BetaResponseIncompleteDetails`

      Details about why the response is incomplete.

      - `Reason string`

        The reason why the response is incomplete.

        - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

        - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

    - `Instructions BetaResponseInstructionsUnion`

      A system (or developer) message inserted into the model's context.

      When using along with `previous_response_id`, the instructions from a previous
      response will not be carried over to the next response. This makes it simple
      to swap out system (or developer) messages in new responses.

      - `string`

      - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

        A list of one or many input items to the model, containing
        different content types.

        - `type BetaEasyInputMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role. Messages with the
          `assistant` role are presumed to have been generated by the model in previous
          interactions.

          - `Content BetaEasyInputMessageContentUnion`

            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.

            - `string`

            - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

              A list of one or many input items to the model, containing different content
              types.

              - `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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail BetaResponseInputImageDetail`

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

                  - `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`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileDetail`

                  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`.

                  - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                  - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                  - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                - `FileData string`

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

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Role BetaEasyInputMessageRole`

            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.

            - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

            - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

            - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

            - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

          - `Phase BetaEasyInputMessagePhase`

            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.

            - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

            - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

          - `Type BetaEasyInputMessageType`

            The type of the message input. Always `message`.

            - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

        - `type BetaResponseInputItemMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role.

          - `Content BetaResponseInputMessageContentList`

            A list of one or many input items to the model, containing different content
            types.

          - `Role string`

            The role of the message input. One of `user`, `system`, or `developer`.

            - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

            - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

            - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

          - `Agent BetaResponseInputItemMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

            - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

            - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

          - `Type string`

            The type of the message input. Always set to `message`.

            - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

        - `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.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

              - `Annotations []BetaResponseOutputTextAnnotationUnion`

                The annotations of the text output.

                - `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`.

                    - `const FileCitationFileCitation FileCitation = "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`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the web resource.

                - `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`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                    - `const FilePathFilePath FilePath = "file_path"`

              - `Text string`

                The text output from the model.

              - `Type OutputText`

                The type of the output text. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Logprobs []BetaResponseOutputTextLogprob`

                - `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`.

                - `const RefusalRefusal Refusal = "refusal"`

          - `Role Assistant`

            The role of the output message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `Status BetaResponseOutputMessageStatus`

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

            - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

            - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

            - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

          - `Type Message`

            The type of the output message. Always `message`.

            - `const MessageMessage Message = "message"`

          - `Agent BetaResponseOutputMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Phase BetaResponseOutputMessagePhase`

            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.

            - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

            - `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`.

            - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

          - `Agent BetaResponseFileSearchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Results []BetaResponseFileSearchToolCallResult`

            The results of the file search tool call.

            - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

              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.

              - `string`

              - `float64`

              - `bool`

            - `FileID string`

              The unique ID of the file.

            - `Filename string`

              The name of the file.

            - `Score float64`

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

            - `Text string`

              The text that was retrieved from the file.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

              The type of the pending safety check.

            - `Message string`

              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.

            - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

            - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

            - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

          - `Type BetaResponseComputerToolCallType`

            The type of the computer call. Always `computer_call`.

            - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

          - `Action BetaComputerActionUnion`

            A click action.

            - `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`.

                - `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`.

                - `const ClickClick Click = "click"`

              - `X int64`

                The x-coordinate where the click occurred.

              - `Y int64`

                The y-coordinate where the click occurred.

              - `Keys []string`

                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`.

                - `const DoubleClickDoubleClick DoubleClick = "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`.

                - `const DragDrag Drag = "drag"`

              - `Keys []string`

                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`.

                - `const KeypressKeypress Keypress = "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`.

                - `const MoveMove Move = "move"`

              - `X int64`

                The x-coordinate to move to.

              - `Y int64`

                The y-coordinate to move to.

              - `Keys []string`

                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`.

                - `const ScreenshotScreenshot Screenshot = "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`.

                - `const ScrollScroll Scroll = "scroll"`

              - `X int64`

                The x-coordinate where the scroll occurred.

              - `Y int64`

                The y-coordinate where the scroll occurred.

              - `Keys []string`

                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`.

                - `const TypeType Type = "type"`

            - `type BetaComputerActionWait struct{…}`

              A wait action.

              - `Type Wait`

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

                - `const WaitWait Wait = "wait"`

          - `Actions BetaComputerActionList`

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

            - `type BetaComputerActionClick struct{…}`

              A click action.

            - `type BetaComputerActionDoubleClick struct{…}`

              A double click action.

            - `type BetaComputerActionDrag struct{…}`

              A drag action.

            - `type BetaComputerActionKeypress struct{…}`

              A collection of keypresses the model would like to perform.

            - `type BetaComputerActionMove struct{…}`

              A mouse move action.

            - `type BetaComputerActionScreenshot struct{…}`

              A screenshot action.

            - `type BetaComputerActionScroll struct{…}`

              A scroll action.

            - `type BetaComputerActionType struct{…}`

              An action to type in text.

            - `type BetaComputerActionWait struct{…}`

              A wait action.

          - `Agent BetaResponseComputerToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

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

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            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`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

              The identifier of an uploaded file that contains the screenshot.

            - `ImageURL string`

              The URL of the screenshot image.

          - `Type ComputerCallOutput`

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

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

            The ID of the computer tool call output.

          - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseInputItemComputerCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

            - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

          - `ID string`

            The unique ID of the web search tool call.

          - `Action BetaResponseFunctionWebSearchActionUnion`

            An object describing the specific action taken in this web search call.
            Includes details on how the model used the web (search, open_page, find_in_page).

            - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

              Action type "search" - Performs a web search query.

              - `Type Search`

                The action type.

                - `const SearchSearch Search = "search"`

              - `Queries []string`

                The search queries.

              - `Query string`

                The search query.

              - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                The sources used in the search.

                - `Type URL`

                  The type of source. Always `url`.

                  - `const URLURL URL = "url"`

                - `URL string`

                  The URL of the source.

            - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

              Action type "open_page" - Opens a specific URL from search results.

              - `Type OpenPage`

                The action type.

                - `const OpenPageOpenPage OpenPage = "open_page"`

              - `URL string`

                The URL opened by the model.

            - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

              Action type "find_in_page": Searches for a pattern within a loaded page.

              - `Pattern string`

                The pattern or text to search for within the page.

              - `Type FindInPage`

                The action type.

                - `const FindInPageFindInPage FindInPage = "find_in_page"`

              - `URL string`

                The URL of the page searched for the pattern.

          - `Status BetaResponseFunctionWebSearchStatus`

            The status of the web search tool call.

            - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

            - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

            - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

            - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

          - `Type WebSearchCall`

            The type of the web search tool call. Always `web_search_call`.

            - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

          - `Agent BetaResponseFunctionWebSearchAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

            - `const FunctionCallFunctionCall FunctionCall = "function_call"`

          - `ID string`

            The unique ID of the function tool call.

          - `Agent BetaResponseFunctionToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the function to run.

          - `Status BetaResponseFunctionToolCallStatus`

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

            - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

            - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

        - `type BetaResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

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

          - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

              An array of content outputs (text, image, file) for the function tool call.

              - `type BetaResponseInputTextContent 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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  The type of the input item. Always `input_image`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail BetaResponseInputImageContentDetail`

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

                  - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                  - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                  - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                  - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileContentDetail`

                  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`.

                  - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                  - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                  - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                - `FileData string`

                  The base64-encoded data of the file to be sent to the model.

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Type FunctionCallOutput`

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

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

            The unique ID of the function tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemFunctionCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Status string`

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

            - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemAgentMessage struct{…}`

          A message routed between agents.

          - `Author string`

            The sending agent identity.

          - `Content []BetaResponseInputItemAgentMessageContentUnion`

            Plaintext, image, or encrypted content sent between agents.

            - `type BetaResponseInputTextContent struct{…}`

              A text input to the model.

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The item type. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `ID string`

            The unique ID of this agent message item.

          - `Agent BetaResponseInputItemAgentMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCall struct{…}`

          - `Action string`

            The multi-agent action that was executed.

            - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

          - `Arguments string`

            The action arguments as a JSON string.

          - `CallID string`

            The unique ID linking this call to its output.

          - `Type MultiAgentCall`

            The item type. Always `multi_agent_call`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `ID string`

            The unique ID of this multi-agent call.

          - `Agent BetaResponseInputItemMultiAgentCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

          - `Action string`

            The multi-agent action that produced this result.

            - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

          - `CallID string`

            The unique ID of the multi-agent call.

          - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

            Text output returned by the multi-agent action.

            - `Text string`

              The text content.

            - `Type OutputText`

              The content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

              Citations associated with the text content.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                - `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 citation type. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                - `EndIndex int64`

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

                - `StartIndex int64`

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

                - `Title string`

                  The title of the cited resource.

                - `Type URLCitation`

                  The citation type. Always `url_citation`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the cited resource.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                - `ContainerID string`

                  The ID of the container.

                - `EndIndex int64`

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

                - `FileID string`

                  The ID of the container file.

                - `Filename string`

                  The filename of the container file cited.

                - `StartIndex int64`

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

                - `Type ContainerFileCitation`

                  The citation type. Always `container_file_citation`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

          - `Type MultiAgentCallOutput`

            The item type. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `ID string`

            The unique ID of this multi-agent call output.

          - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemToolSearchCall struct{…}`

          - `Arguments any`

            The arguments supplied to the tool search call.

          - `Type ToolSearchCall`

            The item type. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `ID string`

            The unique ID of this tool search call.

          - `Agent BetaResponseInputItemToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution string`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

            - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

          - `Status string`

            The status of the tool search call.

            - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

            - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

            - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

        - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by the tool search output.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `Name string`

                The name of the function to call.

              - `Parameters map[string, any]`

                A JSON schema object describing the parameters of the function.

              - `Strict bool`

                Whether strict parameter validation is enforced for this function tool.

              - `Type Function`

                The type of the function tool. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function is deferred and loaded via tool search.

              - `Description string`

                A description of the function. Used by the model to determine whether or not to call the function.

              - `OutputSchema map[string, any]`

                A JSON schema object describing the JSON value encoded in string outputs for this function.

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `Type FileSearch`

                The type of the file search tool. Always `file_search`.

                - `const FileSearchFileSearch FileSearch = "file_search"`

              - `VectorStoreIDs []string`

                The IDs of the vector stores to search.

              - `Filters BetaFileSearchToolFiltersUnion`

                A filter to apply.

                - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

                - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                  Combine multiple filters using `and` or `or`.

                  - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                    Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                    - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                      - `Key string`

                        The key to compare against the value.

                      - `Type string`

                        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                        - `eq`: equals
                        - `ne`: not equal
                        - `gt`: greater than
                        - `gte`: greater than or equal
                        - `lt`: less than
                        - `lte`: less than or equal
                        - `in`: in
                        - `nin`: not in

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                      - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                        The value to compare against the attribute key; supports string, number, or boolean types.

                        - `string`

                        - `float64`

                        - `bool`

                        - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                          - `string`

                          - `float64`

                  - `Type string`

                    Type of operation: `and` or `or`.

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

              - `MaxNumResults int64`

                The maximum number of results to return. This number should be between 1 and 50 inclusive.

              - `RankingOptions BetaFileSearchToolRankingOptions`

                Ranking options for search.

                - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                  Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                  - `EmbeddingWeight float64`

                    The weight of the embedding in the reciprocal ranking fusion.

                  - `TextWeight float64`

                    The weight of the text in the reciprocal ranking fusion.

                - `Ranker string`

                  The ranker to use for the file search.

                  - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                  - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                - `ScoreThreshold float64`

                  The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `Type Computer`

                The type of the computer tool. Always `computer`.

                - `const ComputerComputer Computer = "computer"`

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `DisplayHeight int64`

                The height of the computer display.

              - `DisplayWidth int64`

                The width of the computer display.

              - `Environment BetaComputerUsePreviewToolEnvironment`

                The type of computer environment to control.

                - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

              - `Type ComputerUsePreview`

                The type of the computer use tool. Always `computer_use_preview`.

                - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchToolType`

                The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

              - `Filters BetaWebSearchToolFilters`

                Filters for the search.

                - `AllowedDomains []string`

                  Allowed domains for the search. If not provided, all domains are allowed.
                  Subdomains of the provided domains are allowed as well.

                  Example: `["pubmed.ncbi.nlm.nih.gov"]`

              - `SearchContextSize BetaWebSearchToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchToolUserLocation`

                The approximate location of the user.

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                - `Type string`

                  The type of location approximation. Always `approximate`.

                  - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `ServerLabel string`

                A label for this MCP server, used to identify it in tool calls.

              - `Type Mcp`

                The type of the MCP tool. Always `mcp`.

                - `const McpMcp Mcp = "mcp"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

              - `AllowedTools BetaToolMcpAllowedToolsUnion`

                List of allowed tool names or a filter object.

                - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                  A string array of allowed tool names

                - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `Authorization string`

                An OAuth access token that can be used with a remote MCP server, either
                with a custom MCP server URL or a service connector. Your application
                must handle the OAuth authorization flow and provide the token here.

              - `ConnectorID string`

                Identifier for service connectors, like those available in ChatGPT. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                Currently supported `connector_id` values are:

                - Dropbox: `connector_dropbox`
                - Gmail: `connector_gmail`
                - Google Calendar: `connector_googlecalendar`
                - Google Drive: `connector_googledrive`
                - Microsoft Teams: `connector_microsoftteams`
                - Outlook Calendar: `connector_outlookcalendar`
                - Outlook Email: `connector_outlookemail`
                - SharePoint: `connector_sharepoint`

                - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

              - `DeferLoading bool`

                Whether this MCP tool is deferred and discovered via tool search.

              - `Headers map[string, string]`

                Optional HTTP headers to send to the MCP server. Use for authentication
                or other purposes.

              - `RequireApproval BetaToolMcpRequireApprovalUnion`

                Specify which of the MCP server's tools require approval.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                  Specify which of the MCP server's tools require approval. Can be
                  `always`, `never`, or a filter object associated with tools
                  that require approval.

                  - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                  - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                  Specify a single approval policy for all tools. One of `always` or
                  `never`. When set to `always`, all tools will require approval. When
                  set to `never`, all tools will not require approval.

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

              - `ServerDescription string`

                Optional description of the MCP server, used to provide more context.

              - `ServerURL string`

                The URL for the MCP server. One of `server_url`, `connector_id`, or
                `tunnel_id` must be provided.

              - `TunnelID string`

                The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided.

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

              - `Container BetaToolCodeInterpreterContainerUnion`

                The code interpreter container. Can be a container ID or an object that
                specifies uploaded file IDs to make available to your code, along with an
                optional `memory_limit` setting.

                - `string`

                - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                  Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                  - `Type Auto`

                    Always `auto`.

                    - `const AutoAuto Auto = "auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit string`

                    The memory limit for the code interpreter container.

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `Type Disabled`

                        Disable outbound network access. Always `disabled`.

                        - `const DisabledDisabled Disabled = "disabled"`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                      - `AllowedDomains []string`

                        A list of allowed domains when type is `allowlist`.

                      - `Type Allowlist`

                        Allow outbound network access only to specified domains. Always `allowlist`.

                        - `const AllowlistAllowlist Allowlist = "allowlist"`

                      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                        Optional domain-scoped secrets for allowlisted domains.

                        - `Domain string`

                          The domain associated with the secret.

                        - `Name string`

                          The name of the secret to inject for the domain.

                        - `Value string`

                          The secret value to inject for the domain.

              - `Type CodeInterpreter`

                The type of the code interpreter tool. Always `code_interpreter`.

                - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

            - `type BetaToolProgrammaticToolCalling struct{…}`

              - `Type ProgrammaticToolCalling`

                The type of the tool. Always `programmatic_tool_calling`.

                - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

              - `Type ImageGeneration`

                The type of the image generation tool. Always `image_generation`.

                - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

              - `Action string`

                Whether to generate a new image or edit an existing image. Default: `auto`.

                - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

              - `Background string`

                Allows to set transparency for the background of the generated image(s).
                This parameter is only supported for GPT image models that support
                transparent backgrounds. Must be one of `transparent`, `opaque`, or
                `auto` (default value). When `auto` is used, the model will
                automatically determine the best background for the image.

                `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                transparent backgrounds. Requests with `background` set to
                `transparent` will return an error for these models; use `opaque` or
                `auto` instead.

                If `transparent`, the output format needs to support transparency,
                so it should be set to either `png` (default value) or `webp`.

                - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

              - `InputFidelity string`

                Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

              - `InputImageMask BetaToolImageGenerationInputImageMask`

                Optional mask for inpainting. Contains `image_url`
                (string, optional) and `file_id` (string, optional).

                - `FileID string`

                  File ID for the mask image.

                - `ImageURL string`

                  Base64-encoded mask image.

              - `Model string`

                The image generation model to use. Default: `gpt-image-1`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                  - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                  - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                  - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                  - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                  - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

              - `Moderation string`

                Moderation level for the generated image. Default: `auto`.

                - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

              - `OutputCompression int64`

                Compression level for the output image. Default: 100.

              - `OutputFormat string`

                The output format of the generated image. One of `png`, `webp`, or
                `jpeg`. Default: `png`.

                - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

              - `PartialImages int64`

                Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              - `Quality string`

                The quality of the generated image. One of `low`, `medium`, `high`,
                or `auto`. Default: `auto`.

                - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

              - `Size string`

                The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                  - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                  - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                  - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

              - `Type LocalShell`

                The type of the local shell tool. Always `local_shell`.

                - `const LocalShellLocalShell LocalShell = "local_shell"`

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

              - `Type Shell`

                The type of the shell tool. Always `shell`.

                - `const ShellShell Shell = "shell"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

              - `Environment BetaFunctionShellToolEnvironmentUnion`

                - `type BetaContainerAuto struct{…}`

                  - `Type ContainerAuto`

                    Automatically creates a container for this request

                    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit BetaContainerAutoMemoryLimit`

                    The memory limit for the container.

                    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `Skills []BetaContainerAutoSkillUnion`

                    An optional list of skills referenced by id or inline data.

                    - `type BetaSkillReference struct{…}`

                      - `SkillID string`

                        The ID of the referenced skill.

                      - `Type SkillReference`

                        References a skill created with the /v1/skills endpoint.

                        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                      - `Version string`

                        Optional skill version. Use a positive integer or 'latest'. Omit for default.

                    - `type BetaInlineSkill struct{…}`

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Source BetaInlineSkillSource`

                        Inline skill payload

                        - `Data string`

                          Base64-encoded skill zip bundle.

                        - `MediaType ApplicationZip`

                          The media type of the inline skill payload. Must be `application/zip`.

                          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                        - `Type Base64`

                          The type of the inline skill source. Must be `base64`.

                          - `const Base64Base64 Base64 = "base64"`

                      - `Type Inline`

                        Defines an inline skill for this request.

                        - `const InlineInline Inline = "inline"`

                - `type BetaLocalEnvironment struct{…}`

                  - `Type Local`

                    Use a local computer environment.

                    - `const LocalLocal Local = "local"`

                  - `Skills []BetaLocalSkill`

                    An optional list of skills.

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Path string`

                      The path to the directory containing the skill.

                - `type BetaContainerReference struct{…}`

                  - `ContainerID string`

                    The ID of the referenced container.

                  - `Type ContainerReference`

                    References a container created with the /v1/containers endpoint

                    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Name string`

                The name of the custom tool, used to identify it in tool calls.

              - `Type Custom`

                The type of the custom tool. Always `custom`.

                - `const CustomCustom Custom = "custom"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this tool should be deferred and discovered via tool search.

              - `Description string`

                Optional description of the custom tool, used to provide more context.

              - `Format BetaCustomToolFormatUnion`

                The input format for the custom tool. Default is unconstrained text.

                - `type BetaCustomToolFormatText struct{…}`

                  Unconstrained free-form text.

                  - `Type Text`

                    Unconstrained text format. Always `text`.

                    - `const TextText Text = "text"`

                - `type BetaCustomToolFormatGrammar struct{…}`

                  A grammar defined by the user.

                  - `Definition string`

                    The grammar definition.

                  - `Syntax string`

                    The syntax of the grammar definition. One of `lark` or `regex`.

                    - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                    - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                  - `Type Grammar`

                    Grammar format. Always `grammar`.

                    - `const GrammarGrammar Grammar = "grammar"`

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

              - `Description string`

                A description of the namespace shown to the model.

              - `Name string`

                The namespace name used in tool calls (for example, `crm`).

              - `Tools []BetaNamespaceToolToolUnion`

                The function/custom tools available inside this namespace.

                - `type BetaNamespaceToolToolFunction struct{…}`

                  - `Name string`

                  - `Type Function`

                    - `const FunctionFunction Function = "function"`

                  - `AllowedCallers []string`

                    The tool invocation context(s).

                    - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                    - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                  - `DeferLoading bool`

                    Whether this function should be deferred and discovered via tool search.

                  - `Description string`

                  - `OutputSchema map[string, any]`

                    A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                  - `Parameters any`

                  - `Strict bool`

                    Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                - `type BetaCustomTool struct{…}`

                  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Type Namespace`

                The type of the tool. Always `namespace`.

                - `const NamespaceNamespace Namespace = "namespace"`

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

              - `Type ToolSearch`

                The type of the tool. Always `tool_search`.

                - `const ToolSearchToolSearch ToolSearch = "tool_search"`

              - `Description string`

                Description shown to the model for a client-executed tool search tool.

              - `Execution BetaToolSearchToolExecution`

                Whether tool search is executed by the server or by the client.

                - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

              - `Parameters any`

                Parameter schema for a client-executed tool search tool.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchPreviewToolType`

                The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

              - `SearchContentTypes []string`

                - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

              - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchPreviewToolUserLocation`

                The user's location.

                - `Type Approximate`

                  The type of location approximation. Always `approximate`.

                  - `const ApproximateApproximate Approximate = "approximate"`

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

              - `Type ApplyPatch`

                The type of the tool. Always `apply_patch`.

                - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

          - `Type ToolSearchOutput`

            The item type. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `ID string`

            The unique ID of this tool search output.

          - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution BetaResponseToolSearchOutputItemParamExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

            - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemParamStatus`

            The status of the tool search output.

            - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

        - `type BetaResponseInputItemAdditionalTools struct{…}`

          - `Role Developer`

            The role that provided the additional tools. Only `developer` is supported.

            - `const DeveloperDeveloper Developer = "developer"`

          - `Tools []BetaToolUnion`

            A list of additional tools made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The item type. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `ID string`

            The unique ID of this additional tools item.

          - `Agent BetaResponseInputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

          - `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`.

              - `const SummaryTextSummaryText SummaryText = "summary_text"`

          - `Type Reasoning`

            The type of the object. Always `reasoning`.

            - `const ReasoningReasoning Reasoning = "reasoning"`

          - `Agent BetaResponseReasoningItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Content []BetaResponseReasoningItemContent`

            Reasoning text content.

            - `Text string`

              The reasoning text from the model.

            - `Type ReasoningText`

              The type of the reasoning text. Always `reasoning_text`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `EncryptedContent string`

            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.

          - `Status BetaResponseReasoningItemStatus`

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

            - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

            - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

            - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

        - `type BetaResponseCompactionItemParamResp struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `EncryptedContent string`

            The encrypted content of the compaction summary.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

            The ID of the compaction item.

          - `Agent BetaResponseCompactionItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseInputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

          - `ID string`

            The unique ID of the code interpreter tool call.

          - `Code string`

            The code to run, or null if not available.

          - `ContainerID string`

            The ID of the container used to run the code.

          - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

            The outputs generated by the code interpreter, such as logs or images.
            Can be null if no outputs are available.

            - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

              The logs output from the code interpreter.

              - `Logs string`

                The logs output from the code interpreter.

              - `Type Logs`

                The type of the output. Always `logs`.

                - `const LogsLogs Logs = "logs"`

            - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

              The image output from the code interpreter.

              - `Type Image`

                The type of the output. Always `image`.

                - `const ImageImage Image = "image"`

              - `URL string`

                The URL of the image output from the code interpreter.

          - `Status BetaResponseCodeInterpreterToolCallStatus`

            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

            - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

            - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

            - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

            - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

            - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

          - `Type CodeInterpreterCall`

            The type of the code interpreter tool call. Always `code_interpreter_call`.

            - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

          - `Agent BetaResponseCodeInterpreterToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCall struct{…}`

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

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseInputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemShellCall struct{…}`

          A tool representing a request to execute one or more shell commands.

          - `Action BetaResponseInputItemShellCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

              Ordered shell commands for the execution environment to run.

            - `MaxOutputLength int64`

              Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

            - `TimeoutMs int64`

              Maximum wall-clock time in milliseconds to allow the shell commands to run.

          - `CallID string`

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

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

            The environment to execute the shell commands in.

            - `type BetaLocalEnvironment struct{…}`

            - `type BetaContainerReference struct{…}`

          - `Status string`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

            - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

        - `type BetaResponseInputItemShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

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

          - `Output []BetaResponseFunctionShellCallOutputContent`

            Captured chunks of stdout and stderr output, along with their associated outcomes.

            - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

              The exit or timeout outcome associated with this shell call.

              - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  The exit code returned by the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              Captured stderr output for the shell call.

            - `Stdout string`

              Captured stdout output for the shell call.

          - `Type ShellCallOutput`

            The type of the item. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

            The unique ID of the shell tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `MaxOutputLength int64`

            The maximum number of UTF-8 characters captured for this shell call's combined output.

          - `Status string`

            The status of the shell call output.

            - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemApplyPatchCall struct{…}`

          A tool call representing a request to create, delete, or update files using diff patches.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

            The specific create, delete, or update instruction for the apply_patch tool call.

            - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply when creating the file.

              - `Path string`

                Path of the file to create relative to the workspace root.

              - `Type CreateFile`

                The operation type. Always `create_file`.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

                Path of the file to delete relative to the workspace root.

              - `Type DeleteFile`

                The operation type. Always `delete_file`.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply to the existing file.

              - `Path string`

                Path of the file to update relative to the workspace root.

              - `Type UpdateFile`

                The operation type. Always `update_file`.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status string`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

            - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status string`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

            - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Output string`

            Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

        - `type BetaResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseInputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseInputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

            The unique ID of the approval response

          - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `type BetaResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseInputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

            - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

            - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

        - `type BetaResponseCustomToolCallOutput struct{…}`

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

          - `CallID string`

            The call ID, used to map this custom tool call output to a custom tool call.

          - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              Text, image, or file output of the custom tool call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            The type of the custom tool call output. Always `custom_tool_call_output`.

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

            The unique ID of the custom tool call output in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

          - `CallID string`

            An identifier used to map this custom tool call to a tool call output.

          - `Input string`

            The input for the custom tool call generated by the model.

          - `Name string`

            The name of the custom tool being called.

          - `Type CustomToolCall`

            The type of the custom tool call. Always `custom_tool_call`.

            - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

          - `ID string`

            The unique ID of the custom tool call in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the custom tool being called.

        - `type BetaResponseInputItemCompactionTrigger struct{…}`

          Compacts the current context. Must be the final input item.

          - `Type CompactionTrigger`

            The type of the item. Always `compaction_trigger`.

            - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

          - `Agent BetaResponseInputItemCompactionTriggerAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

            The ID of the item to reference.

          - `Agent BetaResponseInputItemItemReferenceAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Type string`

            The type of item to reference. Always `item_reference`.

            - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

        - `type BetaResponseInputItemProgram struct{…}`

          - `ID string`

            The unique ID of this program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The item type. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseInputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of this program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output.

            - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

            - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The item type. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseInputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

    - `Metadata map[string, string]`

      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.

    - `Model BetaResponseModel`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `type BetaResponseModel string`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

        - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

        - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

        - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

        - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

        - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

        - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

        - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

        - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

        - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

        - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

        - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

        - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

        - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

        - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

        - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

        - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

        - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

        - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

        - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

        - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

        - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

        - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

        - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

        - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

        - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

        - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

        - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

        - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

        - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

        - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

        - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

        - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

        - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

        - `const BetaResponseModelO3 BetaResponseModel = "o3"`

        - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

        - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

        - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

        - `const BetaResponseModelO1 BetaResponseModel = "o1"`

        - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

        - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

        - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

        - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

        - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

        - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

        - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

        - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

        - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

        - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

        - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

        - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

        - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

        - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

        - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

        - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

        - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

        - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

        - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

        - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

        - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

        - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

        - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

        - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

        - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

        - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

        - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

        - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

        - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

        - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

        - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

        - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

        - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

        - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

        - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

        - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

        - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

        - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

        - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

        - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

        - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

        - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

        - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

        - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

        - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

        - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

        - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

        - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

        - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

        - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

        - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

      - `string`

    - `Object Response`

      The object type of this resource - always set to `response`.

      - `const ResponseResponse Response = "response"`

    - `Output []BetaResponseOutputItemUnion`

      An array of content items generated by the model.

      - The length and order of items in the `output` array is dependent
        on the model's response.
      - Rather than accessing the first item in the `output` array and
        assuming it's an `assistant` message with the content generated by
        the model, you might consider using the `output_text` property where
        supported in SDKs.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

        - `ID string`

          The unique ID of the function call tool output.

        - `CallID string`

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

        - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

          - `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`.

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `Agent BetaResponseFunctionToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `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.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

          - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

            A text content.

            - `Text string`

            - `Type Text`

              - `const TextText Text = "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`.

              - `const SummaryTextSummaryText SummaryText = "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`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `type BetaResponseOutputRefusal struct{…}`

            A refusal from the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `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`.

              - `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.

            - `Type ComputerScreenshot`

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

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

          - `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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The type of the item. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `Agent BetaResponseOutputItemAgentMessageAgent`

          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.

          - `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`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `Agent BetaResponseOutputItemMultiAgentCallAgent`

          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.

          - `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.

        - `Output []BetaResponseOutputText`

          Text output returned by the multi-agent action.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

          - `Logprobs []BetaResponseOutputTextLogprob`

        - `Type MultiAgentCallOutput`

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

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `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.

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          A computer screenshot image used with the computer use tool.

        - `Status BetaResponseComputerToolCallOutputItemStatus`

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

          - `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`.

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseComputerToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseOutputItemProgram struct{…}`

        - `ID string`

          The unique ID of the program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The type of the item. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseOutputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of the program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output item.

          - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

          - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The type of the item. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseOutputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseToolSearchCall struct{…}`

        - `ID string`

          The unique ID of the tool search call item.

        - `Arguments any`

          Arguments used for the tool search call.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchCallExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

          - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

        - `Status BetaResponseToolSearchCallStatus`

          The status of the tool search call item that was recorded.

          - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

          - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

          - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

        - `Type ToolSearchCall`

          The type of the item. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `Agent BetaResponseToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseToolSearchOutputItem struct{…}`

        - `ID string`

          The unique ID of the tool search output item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

          - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemStatus`

          The status of the tool search output item that was recorded.

          - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by tool search.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ToolSearchOutput`

          The type of the item. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `Agent BetaResponseToolSearchOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemAdditionalTools struct{…}`

        - `ID string`

          The unique ID of the additional tools item.

        - `Role string`

          The role that provided the additional tools.

          - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

          - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

          - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

          - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

          - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

          - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

        - `Tools []BetaToolUnion`

          The additional tool definitions made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The type of the item. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `Agent BetaResponseOutputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCompactionItem struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `ID string`

          The unique ID of the compaction item.

        - `EncryptedContent string`

          The encrypted content that was produced by compaction.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `Agent BetaResponseCompactionItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseOutputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseOutputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseOutputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionShellToolCall struct{…}`

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

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Action BetaResponseFunctionShellToolCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

          - `MaxOutputLength int64`

            Optional maximum number of characters to return from each command.

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the commands.

        - `CallID string`

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

        - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

          Represents the use of a local environment to perform shell actions.

          - `type BetaResponseLocalEnvironment struct{…}`

            Represents the use of a local environment to perform shell actions.

            - `Type Local`

              The environment type. Always `local`.

              - `const LocalLocal Local = "local"`

          - `type BetaResponseContainerReference struct{…}`

            Represents a container created with /v1/containers.

            - `ContainerID string`

            - `Type ContainerReference`

              The environment type. Always `container_reference`.

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `Status BetaResponseFunctionShellToolCallStatus`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `Agent BetaResponseFunctionShellToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

        - `ID string`

          The unique ID of the shell call output. Populated when this item is returned via API.

        - `CallID string`

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

        - `MaxOutputLength int64`

          The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

        - `Output []BetaResponseFunctionShellToolCallOutputOutput`

          An array of shell call output contents

          - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

            Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                Exit code from the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            The standard error output that was captured.

          - `Stdout string`

            The standard output that was captured.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `Status BetaResponseFunctionShellToolCallOutputStatus`

          The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

        - `Type ShellCallOutput`

          The type of the shell call output. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `Agent BetaResponseFunctionShellToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseApplyPatchToolCall struct{…}`

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

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseApplyPatchToolCallOperationUnion`

          One of the create_file, delete_file, or update_file operations applied via apply_patch.

          - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

            Instruction describing how to create a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to create.

            - `Type CreateFile`

              Create a new file with the provided diff.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

            Instruction describing how to delete a file via the apply_patch tool.

            - `Path string`

              Path of the file to delete.

            - `Type DeleteFile`

              Delete the specified file.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

            Instruction describing how to update a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to update.

            - `Type UpdateFile`

              Update an existing file with the provided diff.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status BetaResponseApplyPatchToolCallStatus`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

          - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `Agent BetaResponseApplyPatchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status BetaResponseApplyPatchToolCallOutputStatus`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

          - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `Agent BetaResponseApplyPatchToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call output.

        - `Output string`

          Optional textual output returned by the apply patch tool.

      - `type BetaResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseOutputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

          - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

          - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

      - `type BetaResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseOutputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseOutputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ID string`

          The unique ID of the approval response

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `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.

        - `ID string`

          The unique ID of the custom tool call output item.

        - `Status string`

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

          - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

          - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

          - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

    - `ParallelToolCalls bool`

      Whether to allow the model to run tool calls in parallel.

    - `Temperature float64`

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
      We generally recommend altering this or `top_p` but not both.

    - `ToolChoice BetaResponseToolChoiceUnion`

      How the model should select which tool (or tools) to use when generating
      a response. See the `tools` parameter to see how to specify which tools
      the model can call.

      - `type BetaToolChoiceOptions string`

        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a message.

        `auto` means the model can pick between generating a message or calling one or
        more tools.

        `required` means the model must call one or more tools.

        - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

        - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

        - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

      - `type BetaToolChoiceAllowed struct{…}`

        Constrains the tools available to the model to a pre-defined set.

        - `Mode BetaToolChoiceAllowedMode`

          Constrains the tools available to the model to a pre-defined set.

          `auto` allows the model to pick from among the allowed tools and generate a
          message.

          `required` requires the model to call one or more of the allowed tools.

          - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

          - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

        - `Tools []map[string, any]`

          A list of tool definitions that the model should be allowed to call.

          For the Responses API, the list of tool definitions might look like:

          ```json
          [
            { "type": "function", "name": "get_weather" },
            { "type": "mcp", "server_label": "deepwiki" },
            { "type": "image_generation" }
          ]
          ```

        - `Type AllowedTools`

          Allowed tool configuration type. Always `allowed_tools`.

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type BetaToolChoiceTypes struct{…}`

        Indicates that the model should use a built-in tool to generate a response.
        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

        - `Type BetaToolChoiceTypesType`

          The type of hosted tool the model should to use. Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).

          Allowed values are:

          - `file_search`
          - `web_search_preview`
          - `computer`
          - `computer_use_preview`
          - `computer_use`
          - `code_interpreter`
          - `image_generation`

          - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

          - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

          - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

          - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

          - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

      - `type BetaToolChoiceFunction struct{…}`

        Use this option to force the model to call a specific function.

        - `Name string`

          The name of the function to call.

        - `Type Function`

          For function calling, the type is always `function`.

          - `const FunctionFunction Function = "function"`

      - `type BetaToolChoiceMcp struct{…}`

        Use this option to force the model to call a specific tool on a remote MCP server.

        - `ServerLabel string`

          The label of the MCP server to use.

        - `Type Mcp`

          For MCP tools, the type is always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

          The name of the tool to call on the server.

      - `type BetaToolChoiceCustom struct{…}`

        Use this option to force the model to call a specific custom tool.

        - `Name string`

          The name of the custom tool to call.

        - `Type Custom`

          For custom tool calling, the type is always `custom`.

          - `const CustomCustom Custom = "custom"`

      - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

        - `Type ProgrammaticToolCalling`

          The tool to call. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolChoiceApplyPatch struct{…}`

        Forces the model to call the apply_patch tool when executing a tool call.

        - `Type ApplyPatch`

          The tool to call. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type BetaToolChoiceShell struct{…}`

        Forces the model to call the shell tool when a tool call is required.

        - `Type Shell`

          The tool to call. Always `shell`.

          - `const ShellShell Shell = "shell"`

    - `Tools []BetaToolUnion`

      An array of tools the model may call while generating a response. You
      can specify which tool to use by setting the `tool_choice` parameter.

      We support the following categories of tools:

      - **Built-in tools**: Tools that are provided by OpenAI that extend the
        model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
        or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).
      - **MCP Tools**: Integrations with third-party systems via custom MCP servers
        or predefined connectors such as Google Drive and SharePoint. Learn more about
        [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
      - **Function calls (custom tools)**: Functions that are defined by you,
        enabling the model to call your own code with strongly typed arguments
        and outputs. Learn more about
        [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
        custom tools to call your own code.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `TopP float64`

      An alternative to sampling with temperature, called nucleus sampling,
      where the model considers the results of the tokens with top_p probability
      mass. So 0.1 means only the tokens comprising the top 10% probability mass
      are considered.

      We generally recommend altering this or `temperature` but not both.

    - `Background bool`

      Whether to run the model response in the background.
      [Learn more](https://platform.openai.com/docs/guides/background).

    - `CompletedAt float64`

      Unix timestamp (in seconds) of when this Response was completed.
      Only present when the status is `completed`.

    - `Conversation BetaResponseConversation`

      The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

      - `ID string`

        The unique ID of the conversation that this response was associated with.

    - `MaxOutputTokens int64`

      An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

    - `MaxToolCalls int64`

      The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

    - `Moderation BetaResponseModeration`

      Moderation results for the response input and output, if moderated completions were requested.

      - `Input BetaResponseModerationInputUnion`

        Moderation for the response input.

        - `type BetaResponseModerationInputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationInputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

      - `Output BetaResponseModerationOutputUnion`

        Moderation for the response output.

        - `type BetaResponseModerationOutputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationOutputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

    - `PreviousResponseID string`

      The unique ID of the previous response to the model. Use this to
      create multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

    - `Prompt BetaResponsePrompt`

      Reference to a prompt template and its variables.
      [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

      - `ID string`

        The unique identifier of the prompt template to use.

      - `Variables map[string, BetaResponsePromptVariableUnion]`

        Optional map of values to substitute in for variables in your
        prompt. The substitution values can either be strings, or other
        Response input types like images or files.

        - `string`

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

        Optional version of the prompt template.

    - `PromptCacheKey string`

      Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

    - `PromptCacheOptions BetaResponsePromptCacheOptions`

      The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

      - `Mode string`

        Whether implicit prompt-cache breakpoints were enabled.

        - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

        - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

      - `Ttl string`

        The minimum lifetime applied to each cache breakpoint.

        - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

    - `PromptCacheRetention BetaResponsePromptCacheRetention`

      Deprecated. Use `prompt_cache_options.ttl` instead.

      The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
      This field expresses a maximum retention policy, while
      `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
      fields are independent and do not interact.
      For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

      For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

      - Organizations without ZDR enabled default to `24h`.
      - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

      - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

      - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

    - `Reasoning BetaResponseReasoning`

      **gpt-5 and o-series models only**

      Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

      - `Context string`

        Controls which reasoning items are rendered back to the model on later turns.
        If omitted or set to `auto`, the model determines the context mode. The
        `gpt-5.6` model family defaults to `all_turns`; earlier models default to
        `current_turn`.

        When returned on a response, this is the effective reasoning context mode
        used for the response.

        - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

        - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

        - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

      - `Effort string`

        Constrains effort on reasoning for reasoning models. Currently supported
        values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
        Reducing reasoning effort can result in faster responses and fewer tokens
        used on reasoning in a response. Not all reasoning models support every
        value. See the
        [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
        for model-specific support.

        - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

        - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

        - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

        - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

        - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

        - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

        - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

      - `GenerateSummary string`

        **Deprecated:** use `summary` instead.

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

        - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

        - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

      - `Mode string`

        Controls the reasoning execution mode for the request.

        When returned on a response, this is the effective execution mode.

        - `string`

        - `string`

          - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

          - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

      - `Summary string`

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

        - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

        - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

        - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

      A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
      The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `ServiceTier BetaResponseServiceTier`

      Specifies the processing type used for serving the request.

      - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
      - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
      - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
      - When not set, the default behavior is 'auto'.

      When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

      - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

      - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

      - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

      - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

      - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

    - `Status BetaResponseStatus`

      The status of the response generation. One of `completed`, `failed`,
      `in_progress`, `cancelled`, `queued`, or `incomplete`.

      - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

      - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

      - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

      - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

      - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

      - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

    - `Text BetaResponseTextConfig`

      Configuration options for a text response from the model. Can be plain
      text or structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

      - `Format BetaResponseFormatTextConfigUnion`

        An object specifying the format that the model must output.

        Configuring `{ "type": "json_schema" }` enables Structured Outputs,
        which ensures the model will match your supplied JSON schema. Learn more in the
        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

        The default format is `{ "type": "text" }` with no additional options.

        **Not recommended for gpt-4o and newer models:**

        Setting to `{ "type": "json_object" }` enables the older JSON mode, which
        ensures the message the model generates is valid JSON. Using `json_schema`
        is preferred for models that support it.

        - `type BetaResponseFormatTextConfigText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            The type of response format being defined. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

          JSON Schema response format. Used to generate structured JSON responses.
          Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

          - `Name string`

            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.

          - `Schema map[string, any]`

            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).

          - `Type JSONSchema`

            The type of response format being defined. Always `json_schema`.

            - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

          - `Description string`

            A description of what the response format is for, used by the model to
            determine how to respond in the format.

          - `Strict bool`

            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).

        - `type BetaResponseFormatTextConfigJSONObject struct{…}`

          JSON object response format. An older method of generating JSON responses.
          Using `json_schema` is recommended for models that support it. Note that the
          model will not generate JSON without a system or user message instructing it
          to do so.

          - `Type JSONObject`

            The type of response format being defined. Always `json_object`.

            - `const JSONObjectJSONObject JSONObject = "json_object"`

      - `Verbosity BetaResponseTextConfigVerbosity`

        Constrains the verbosity of the model's response. Lower values will result in
        more concise responses, while higher values will result in more verbose responses.
        Currently supported values are `low`, `medium`, and `high`. The default is
        `medium`.

        - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

        - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

        - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

    - `TopLogprobs int64`

      An integer between 0 and 20 specifying the maximum number of most likely
      tokens to return at each token position, each with an associated log
      probability. In some cases, the number of returned tokens may be fewer than
      requested.

    - `Truncation BetaResponseTruncation`

      The truncation strategy to use for the model response.

      - `auto`: If the input to this Response exceeds
        the model's context window size, the model will truncate the
        response to fit the context window by dropping items from the beginning of the conversation.
      - `disabled` (default): If the input size will exceed the context window
        size for a model, the request will fail with a 400 error.

      - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

      - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

    - `Usage BetaResponseUsage`

      Represents token usage details including input tokens, output tokens,
      a breakdown of output tokens, and the total tokens used.

      - `InputTokens int64`

        The number of input tokens.

      - `InputTokensDetails BetaResponseUsageInputTokensDetails`

        A detailed breakdown of the input tokens.

        - `CacheWriteTokens int64`

          The number of input tokens that were written to the cache.

        - `CachedTokens int64`

          The number of tokens that were retrieved from the cache.
          [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

      - `OutputTokens int64`

        The number of output tokens.

      - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

        A detailed breakdown of the output tokens.

        - `ReasoningTokens int64`

          The number of reasoning tokens.

      - `TotalTokens int64`

        The total number of tokens used.

    - `User string`

      This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
      A stable identifier for your end-users.
      Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `SequenceNumber int64`

    The sequence number for this event.

  - `Type ResponseCreated`

    The type of the event. Always `response.created`.

    - `const ResponseCreatedResponseCreated ResponseCreated = "response.created"`

  - `Agent BetaResponseCreatedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Custom Tool Call

- `type BetaResponseCustomToolCall struct{…}`

  A call to a custom tool created by the model.

  - `CallID string`

    An identifier used to map this custom tool call to a tool call output.

  - `Input string`

    The input for the custom tool call generated by the model.

  - `Name string`

    The name of the custom tool being called.

  - `Type CustomToolCall`

    The type of the custom tool call. Always `custom_tool_call`.

    - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

  - `ID string`

    The unique ID of the custom tool call in the OpenAI platform.

  - `Agent BetaResponseCustomToolCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseCustomToolCallCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseCustomToolCallCallerDirect struct{…}`

      - `Type Direct`

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseCustomToolCallCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        - `const ProgramProgram Program = "program"`

  - `Namespace string`

    The namespace of the custom tool being called.

### Beta Response Custom Tool Call Input Delta Event

- `type BetaResponseCustomToolCallInputDeltaEvent struct{…}`

  Event representing a delta (partial update) to the input of a custom tool call.

  - `Delta string`

    The incremental input data (delta) for the custom tool call.

  - `ItemID string`

    Unique identifier for the API item associated with this event.

  - `OutputIndex int64`

    The index of the output this delta applies to.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseCustomToolCallInputDelta`

    The event type identifier.

    - `const ResponseCustomToolCallInputDeltaResponseCustomToolCallInputDelta ResponseCustomToolCallInputDelta = "response.custom_tool_call_input.delta"`

  - `Agent BetaResponseCustomToolCallInputDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Custom Tool Call Input Done Event

- `type BetaResponseCustomToolCallInputDoneEvent struct{…}`

  Event indicating that input for a custom tool call is complete.

  - `Input string`

    The complete input data for the custom tool call.

  - `ItemID string`

    Unique identifier for the API item associated with this event.

  - `OutputIndex int64`

    The index of the output this event applies to.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseCustomToolCallInputDone`

    The event type identifier.

    - `const ResponseCustomToolCallInputDoneResponseCustomToolCallInputDone ResponseCustomToolCallInputDone = "response.custom_tool_call_input.done"`

  - `Agent BetaResponseCustomToolCallInputDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Custom Tool Call Item

- `type BetaResponseCustomToolCallItem struct{…}`

  A call to a custom tool created by the model.

  - `ID string`

    The unique ID of the custom tool call item.

  - `Status string`

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

    - `const BetaResponseCustomToolCallItemStatusInProgress BetaResponseCustomToolCallItemStatus = "in_progress"`

    - `const BetaResponseCustomToolCallItemStatusCompleted BetaResponseCustomToolCallItemStatus = "completed"`

    - `const BetaResponseCustomToolCallItemStatusIncomplete BetaResponseCustomToolCallItemStatus = "incomplete"`

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Custom Tool Call Output

- `type BetaResponseCustomToolCallOutput struct{…}`

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

  - `CallID string`

    The call ID, used to map this custom tool call output to a custom tool call.

  - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

    - `string`

    - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

      Text, image, or file output of the custom tool call.

      - `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`.

          - `const InputTextInputText InputText = "input_text"`

        - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `Detail BetaResponseInputImageDetail`

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

          - `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`.

          - `const InputImageInputImage InputImage = "input_image"`

        - `FileID string`

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

        - `ImageURL string`

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

        - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

        - `Type InputFile`

          The type of the input item. Always `input_file`.

          - `const InputFileInputFile InputFile = "input_file"`

        - `Detail BetaResponseInputFileDetail`

          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`.

          - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

          - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

          - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

        - `FileData string`

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

        - `FileID string`

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

        - `FileURL string`

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

        - `Filename string`

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

        - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

  - `Type CustomToolCallOutput`

    The type of the custom tool call output. Always `custom_tool_call_output`.

    - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

  - `ID string`

    The unique ID of the custom tool call output in the OpenAI platform.

  - `Agent BetaResponseCustomToolCallOutputAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseCustomToolCallOutputCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

      - `Type Direct`

        The caller type. Always `direct`.

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        The caller type. Always `program`.

        - `const ProgramProgram Program = "program"`

### Beta Response Custom Tool Call Output Item

- `type BetaResponseCustomToolCallOutputItem struct{…}`

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

  - `ID string`

    The unique ID of the custom tool call output item.

  - `Status string`

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

    - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

    - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

    - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Error

- `type BetaResponseError struct{…}`

  An error object returned when the model fails to generate a Response.

  - `Code BetaResponseErrorCode`

    The error code for the response.

    - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

    - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

    - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

    - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

    - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

    - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

    - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

    - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

    - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

    - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

    - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

    - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

    - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

    - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

    - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

    - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

    - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

    - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

    - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

    - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

  - `Message string`

    A human-readable description of the error.

### Beta Response Error Event

- `type BetaResponseErrorEvent struct{…}`

  Emitted when an error occurs.

  - `Code string`

    The error code.

  - `Message string`

    The error message.

  - `Param string`

    The error parameter.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type Error`

    The type of the event. Always `error`.

    - `const ErrorError Error = "error"`

  - `Agent BetaResponseErrorEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Failed Event

- `type BetaResponseFailedEvent struct{…}`

  An event that is emitted when a response fails.

  - `Response BetaResponse`

    The response that failed.

    - `ID string`

      Unique identifier for this Response.

    - `CreatedAt float64`

      Unix timestamp (in seconds) of when this Response was created.

    - `Error BetaResponseError`

      An error object returned when the model fails to generate a Response.

      - `Code BetaResponseErrorCode`

        The error code for the response.

        - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

        - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

        - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

        - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

        - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

        - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

        - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

        - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

        - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

        - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

        - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

        - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

        - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

        - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

        - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

        - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

        - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

        - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

        - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

        - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

      - `Message string`

        A human-readable description of the error.

    - `IncompleteDetails BetaResponseIncompleteDetails`

      Details about why the response is incomplete.

      - `Reason string`

        The reason why the response is incomplete.

        - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

        - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

    - `Instructions BetaResponseInstructionsUnion`

      A system (or developer) message inserted into the model's context.

      When using along with `previous_response_id`, the instructions from a previous
      response will not be carried over to the next response. This makes it simple
      to swap out system (or developer) messages in new responses.

      - `string`

      - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

        A list of one or many input items to the model, containing
        different content types.

        - `type BetaEasyInputMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role. Messages with the
          `assistant` role are presumed to have been generated by the model in previous
          interactions.

          - `Content BetaEasyInputMessageContentUnion`

            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.

            - `string`

            - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

              A list of one or many input items to the model, containing different content
              types.

              - `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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail BetaResponseInputImageDetail`

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

                  - `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`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileDetail`

                  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`.

                  - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                  - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                  - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                - `FileData string`

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

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Role BetaEasyInputMessageRole`

            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.

            - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

            - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

            - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

            - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

          - `Phase BetaEasyInputMessagePhase`

            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.

            - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

            - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

          - `Type BetaEasyInputMessageType`

            The type of the message input. Always `message`.

            - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

        - `type BetaResponseInputItemMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role.

          - `Content BetaResponseInputMessageContentList`

            A list of one or many input items to the model, containing different content
            types.

          - `Role string`

            The role of the message input. One of `user`, `system`, or `developer`.

            - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

            - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

            - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

          - `Agent BetaResponseInputItemMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

            - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

            - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

          - `Type string`

            The type of the message input. Always set to `message`.

            - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

        - `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.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

              - `Annotations []BetaResponseOutputTextAnnotationUnion`

                The annotations of the text output.

                - `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`.

                    - `const FileCitationFileCitation FileCitation = "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`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the web resource.

                - `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`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                    - `const FilePathFilePath FilePath = "file_path"`

              - `Text string`

                The text output from the model.

              - `Type OutputText`

                The type of the output text. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Logprobs []BetaResponseOutputTextLogprob`

                - `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`.

                - `const RefusalRefusal Refusal = "refusal"`

          - `Role Assistant`

            The role of the output message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `Status BetaResponseOutputMessageStatus`

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

            - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

            - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

            - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

          - `Type Message`

            The type of the output message. Always `message`.

            - `const MessageMessage Message = "message"`

          - `Agent BetaResponseOutputMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Phase BetaResponseOutputMessagePhase`

            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.

            - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

            - `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`.

            - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

          - `Agent BetaResponseFileSearchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Results []BetaResponseFileSearchToolCallResult`

            The results of the file search tool call.

            - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

              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.

              - `string`

              - `float64`

              - `bool`

            - `FileID string`

              The unique ID of the file.

            - `Filename string`

              The name of the file.

            - `Score float64`

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

            - `Text string`

              The text that was retrieved from the file.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

              The type of the pending safety check.

            - `Message string`

              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.

            - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

            - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

            - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

          - `Type BetaResponseComputerToolCallType`

            The type of the computer call. Always `computer_call`.

            - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

          - `Action BetaComputerActionUnion`

            A click action.

            - `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`.

                - `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`.

                - `const ClickClick Click = "click"`

              - `X int64`

                The x-coordinate where the click occurred.

              - `Y int64`

                The y-coordinate where the click occurred.

              - `Keys []string`

                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`.

                - `const DoubleClickDoubleClick DoubleClick = "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`.

                - `const DragDrag Drag = "drag"`

              - `Keys []string`

                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`.

                - `const KeypressKeypress Keypress = "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`.

                - `const MoveMove Move = "move"`

              - `X int64`

                The x-coordinate to move to.

              - `Y int64`

                The y-coordinate to move to.

              - `Keys []string`

                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`.

                - `const ScreenshotScreenshot Screenshot = "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`.

                - `const ScrollScroll Scroll = "scroll"`

              - `X int64`

                The x-coordinate where the scroll occurred.

              - `Y int64`

                The y-coordinate where the scroll occurred.

              - `Keys []string`

                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`.

                - `const TypeType Type = "type"`

            - `type BetaComputerActionWait struct{…}`

              A wait action.

              - `Type Wait`

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

                - `const WaitWait Wait = "wait"`

          - `Actions BetaComputerActionList`

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

            - `type BetaComputerActionClick struct{…}`

              A click action.

            - `type BetaComputerActionDoubleClick struct{…}`

              A double click action.

            - `type BetaComputerActionDrag struct{…}`

              A drag action.

            - `type BetaComputerActionKeypress struct{…}`

              A collection of keypresses the model would like to perform.

            - `type BetaComputerActionMove struct{…}`

              A mouse move action.

            - `type BetaComputerActionScreenshot struct{…}`

              A screenshot action.

            - `type BetaComputerActionScroll struct{…}`

              A scroll action.

            - `type BetaComputerActionType struct{…}`

              An action to type in text.

            - `type BetaComputerActionWait struct{…}`

              A wait action.

          - `Agent BetaResponseComputerToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

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

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            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`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

              The identifier of an uploaded file that contains the screenshot.

            - `ImageURL string`

              The URL of the screenshot image.

          - `Type ComputerCallOutput`

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

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

            The ID of the computer tool call output.

          - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseInputItemComputerCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

            - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

          - `ID string`

            The unique ID of the web search tool call.

          - `Action BetaResponseFunctionWebSearchActionUnion`

            An object describing the specific action taken in this web search call.
            Includes details on how the model used the web (search, open_page, find_in_page).

            - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

              Action type "search" - Performs a web search query.

              - `Type Search`

                The action type.

                - `const SearchSearch Search = "search"`

              - `Queries []string`

                The search queries.

              - `Query string`

                The search query.

              - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                The sources used in the search.

                - `Type URL`

                  The type of source. Always `url`.

                  - `const URLURL URL = "url"`

                - `URL string`

                  The URL of the source.

            - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

              Action type "open_page" - Opens a specific URL from search results.

              - `Type OpenPage`

                The action type.

                - `const OpenPageOpenPage OpenPage = "open_page"`

              - `URL string`

                The URL opened by the model.

            - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

              Action type "find_in_page": Searches for a pattern within a loaded page.

              - `Pattern string`

                The pattern or text to search for within the page.

              - `Type FindInPage`

                The action type.

                - `const FindInPageFindInPage FindInPage = "find_in_page"`

              - `URL string`

                The URL of the page searched for the pattern.

          - `Status BetaResponseFunctionWebSearchStatus`

            The status of the web search tool call.

            - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

            - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

            - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

            - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

          - `Type WebSearchCall`

            The type of the web search tool call. Always `web_search_call`.

            - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

          - `Agent BetaResponseFunctionWebSearchAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

            - `const FunctionCallFunctionCall FunctionCall = "function_call"`

          - `ID string`

            The unique ID of the function tool call.

          - `Agent BetaResponseFunctionToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the function to run.

          - `Status BetaResponseFunctionToolCallStatus`

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

            - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

            - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

        - `type BetaResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

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

          - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

              An array of content outputs (text, image, file) for the function tool call.

              - `type BetaResponseInputTextContent 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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  The type of the input item. Always `input_image`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail BetaResponseInputImageContentDetail`

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

                  - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                  - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                  - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                  - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileContentDetail`

                  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`.

                  - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                  - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                  - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                - `FileData string`

                  The base64-encoded data of the file to be sent to the model.

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Type FunctionCallOutput`

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

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

            The unique ID of the function tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemFunctionCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Status string`

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

            - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemAgentMessage struct{…}`

          A message routed between agents.

          - `Author string`

            The sending agent identity.

          - `Content []BetaResponseInputItemAgentMessageContentUnion`

            Plaintext, image, or encrypted content sent between agents.

            - `type BetaResponseInputTextContent struct{…}`

              A text input to the model.

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The item type. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `ID string`

            The unique ID of this agent message item.

          - `Agent BetaResponseInputItemAgentMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCall struct{…}`

          - `Action string`

            The multi-agent action that was executed.

            - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

          - `Arguments string`

            The action arguments as a JSON string.

          - `CallID string`

            The unique ID linking this call to its output.

          - `Type MultiAgentCall`

            The item type. Always `multi_agent_call`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `ID string`

            The unique ID of this multi-agent call.

          - `Agent BetaResponseInputItemMultiAgentCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

          - `Action string`

            The multi-agent action that produced this result.

            - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

          - `CallID string`

            The unique ID of the multi-agent call.

          - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

            Text output returned by the multi-agent action.

            - `Text string`

              The text content.

            - `Type OutputText`

              The content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

              Citations associated with the text content.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                - `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 citation type. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                - `EndIndex int64`

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

                - `StartIndex int64`

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

                - `Title string`

                  The title of the cited resource.

                - `Type URLCitation`

                  The citation type. Always `url_citation`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the cited resource.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                - `ContainerID string`

                  The ID of the container.

                - `EndIndex int64`

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

                - `FileID string`

                  The ID of the container file.

                - `Filename string`

                  The filename of the container file cited.

                - `StartIndex int64`

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

                - `Type ContainerFileCitation`

                  The citation type. Always `container_file_citation`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

          - `Type MultiAgentCallOutput`

            The item type. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `ID string`

            The unique ID of this multi-agent call output.

          - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemToolSearchCall struct{…}`

          - `Arguments any`

            The arguments supplied to the tool search call.

          - `Type ToolSearchCall`

            The item type. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `ID string`

            The unique ID of this tool search call.

          - `Agent BetaResponseInputItemToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution string`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

            - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

          - `Status string`

            The status of the tool search call.

            - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

            - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

            - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

        - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by the tool search output.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `Name string`

                The name of the function to call.

              - `Parameters map[string, any]`

                A JSON schema object describing the parameters of the function.

              - `Strict bool`

                Whether strict parameter validation is enforced for this function tool.

              - `Type Function`

                The type of the function tool. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function is deferred and loaded via tool search.

              - `Description string`

                A description of the function. Used by the model to determine whether or not to call the function.

              - `OutputSchema map[string, any]`

                A JSON schema object describing the JSON value encoded in string outputs for this function.

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `Type FileSearch`

                The type of the file search tool. Always `file_search`.

                - `const FileSearchFileSearch FileSearch = "file_search"`

              - `VectorStoreIDs []string`

                The IDs of the vector stores to search.

              - `Filters BetaFileSearchToolFiltersUnion`

                A filter to apply.

                - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

                - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                  Combine multiple filters using `and` or `or`.

                  - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                    Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                    - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                      - `Key string`

                        The key to compare against the value.

                      - `Type string`

                        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                        - `eq`: equals
                        - `ne`: not equal
                        - `gt`: greater than
                        - `gte`: greater than or equal
                        - `lt`: less than
                        - `lte`: less than or equal
                        - `in`: in
                        - `nin`: not in

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                      - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                        The value to compare against the attribute key; supports string, number, or boolean types.

                        - `string`

                        - `float64`

                        - `bool`

                        - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                          - `string`

                          - `float64`

                  - `Type string`

                    Type of operation: `and` or `or`.

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

              - `MaxNumResults int64`

                The maximum number of results to return. This number should be between 1 and 50 inclusive.

              - `RankingOptions BetaFileSearchToolRankingOptions`

                Ranking options for search.

                - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                  Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                  - `EmbeddingWeight float64`

                    The weight of the embedding in the reciprocal ranking fusion.

                  - `TextWeight float64`

                    The weight of the text in the reciprocal ranking fusion.

                - `Ranker string`

                  The ranker to use for the file search.

                  - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                  - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                - `ScoreThreshold float64`

                  The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `Type Computer`

                The type of the computer tool. Always `computer`.

                - `const ComputerComputer Computer = "computer"`

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `DisplayHeight int64`

                The height of the computer display.

              - `DisplayWidth int64`

                The width of the computer display.

              - `Environment BetaComputerUsePreviewToolEnvironment`

                The type of computer environment to control.

                - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

              - `Type ComputerUsePreview`

                The type of the computer use tool. Always `computer_use_preview`.

                - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchToolType`

                The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

              - `Filters BetaWebSearchToolFilters`

                Filters for the search.

                - `AllowedDomains []string`

                  Allowed domains for the search. If not provided, all domains are allowed.
                  Subdomains of the provided domains are allowed as well.

                  Example: `["pubmed.ncbi.nlm.nih.gov"]`

              - `SearchContextSize BetaWebSearchToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchToolUserLocation`

                The approximate location of the user.

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                - `Type string`

                  The type of location approximation. Always `approximate`.

                  - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `ServerLabel string`

                A label for this MCP server, used to identify it in tool calls.

              - `Type Mcp`

                The type of the MCP tool. Always `mcp`.

                - `const McpMcp Mcp = "mcp"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

              - `AllowedTools BetaToolMcpAllowedToolsUnion`

                List of allowed tool names or a filter object.

                - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                  A string array of allowed tool names

                - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `Authorization string`

                An OAuth access token that can be used with a remote MCP server, either
                with a custom MCP server URL or a service connector. Your application
                must handle the OAuth authorization flow and provide the token here.

              - `ConnectorID string`

                Identifier for service connectors, like those available in ChatGPT. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                Currently supported `connector_id` values are:

                - Dropbox: `connector_dropbox`
                - Gmail: `connector_gmail`
                - Google Calendar: `connector_googlecalendar`
                - Google Drive: `connector_googledrive`
                - Microsoft Teams: `connector_microsoftteams`
                - Outlook Calendar: `connector_outlookcalendar`
                - Outlook Email: `connector_outlookemail`
                - SharePoint: `connector_sharepoint`

                - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

              - `DeferLoading bool`

                Whether this MCP tool is deferred and discovered via tool search.

              - `Headers map[string, string]`

                Optional HTTP headers to send to the MCP server. Use for authentication
                or other purposes.

              - `RequireApproval BetaToolMcpRequireApprovalUnion`

                Specify which of the MCP server's tools require approval.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                  Specify which of the MCP server's tools require approval. Can be
                  `always`, `never`, or a filter object associated with tools
                  that require approval.

                  - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                  - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                  Specify a single approval policy for all tools. One of `always` or
                  `never`. When set to `always`, all tools will require approval. When
                  set to `never`, all tools will not require approval.

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

              - `ServerDescription string`

                Optional description of the MCP server, used to provide more context.

              - `ServerURL string`

                The URL for the MCP server. One of `server_url`, `connector_id`, or
                `tunnel_id` must be provided.

              - `TunnelID string`

                The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided.

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

              - `Container BetaToolCodeInterpreterContainerUnion`

                The code interpreter container. Can be a container ID or an object that
                specifies uploaded file IDs to make available to your code, along with an
                optional `memory_limit` setting.

                - `string`

                - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                  Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                  - `Type Auto`

                    Always `auto`.

                    - `const AutoAuto Auto = "auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit string`

                    The memory limit for the code interpreter container.

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `Type Disabled`

                        Disable outbound network access. Always `disabled`.

                        - `const DisabledDisabled Disabled = "disabled"`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                      - `AllowedDomains []string`

                        A list of allowed domains when type is `allowlist`.

                      - `Type Allowlist`

                        Allow outbound network access only to specified domains. Always `allowlist`.

                        - `const AllowlistAllowlist Allowlist = "allowlist"`

                      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                        Optional domain-scoped secrets for allowlisted domains.

                        - `Domain string`

                          The domain associated with the secret.

                        - `Name string`

                          The name of the secret to inject for the domain.

                        - `Value string`

                          The secret value to inject for the domain.

              - `Type CodeInterpreter`

                The type of the code interpreter tool. Always `code_interpreter`.

                - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

            - `type BetaToolProgrammaticToolCalling struct{…}`

              - `Type ProgrammaticToolCalling`

                The type of the tool. Always `programmatic_tool_calling`.

                - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

              - `Type ImageGeneration`

                The type of the image generation tool. Always `image_generation`.

                - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

              - `Action string`

                Whether to generate a new image or edit an existing image. Default: `auto`.

                - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

              - `Background string`

                Allows to set transparency for the background of the generated image(s).
                This parameter is only supported for GPT image models that support
                transparent backgrounds. Must be one of `transparent`, `opaque`, or
                `auto` (default value). When `auto` is used, the model will
                automatically determine the best background for the image.

                `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                transparent backgrounds. Requests with `background` set to
                `transparent` will return an error for these models; use `opaque` or
                `auto` instead.

                If `transparent`, the output format needs to support transparency,
                so it should be set to either `png` (default value) or `webp`.

                - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

              - `InputFidelity string`

                Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

              - `InputImageMask BetaToolImageGenerationInputImageMask`

                Optional mask for inpainting. Contains `image_url`
                (string, optional) and `file_id` (string, optional).

                - `FileID string`

                  File ID for the mask image.

                - `ImageURL string`

                  Base64-encoded mask image.

              - `Model string`

                The image generation model to use. Default: `gpt-image-1`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                  - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                  - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                  - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                  - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                  - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

              - `Moderation string`

                Moderation level for the generated image. Default: `auto`.

                - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

              - `OutputCompression int64`

                Compression level for the output image. Default: 100.

              - `OutputFormat string`

                The output format of the generated image. One of `png`, `webp`, or
                `jpeg`. Default: `png`.

                - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

              - `PartialImages int64`

                Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              - `Quality string`

                The quality of the generated image. One of `low`, `medium`, `high`,
                or `auto`. Default: `auto`.

                - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

              - `Size string`

                The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                  - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                  - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                  - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

              - `Type LocalShell`

                The type of the local shell tool. Always `local_shell`.

                - `const LocalShellLocalShell LocalShell = "local_shell"`

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

              - `Type Shell`

                The type of the shell tool. Always `shell`.

                - `const ShellShell Shell = "shell"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

              - `Environment BetaFunctionShellToolEnvironmentUnion`

                - `type BetaContainerAuto struct{…}`

                  - `Type ContainerAuto`

                    Automatically creates a container for this request

                    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit BetaContainerAutoMemoryLimit`

                    The memory limit for the container.

                    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `Skills []BetaContainerAutoSkillUnion`

                    An optional list of skills referenced by id or inline data.

                    - `type BetaSkillReference struct{…}`

                      - `SkillID string`

                        The ID of the referenced skill.

                      - `Type SkillReference`

                        References a skill created with the /v1/skills endpoint.

                        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                      - `Version string`

                        Optional skill version. Use a positive integer or 'latest'. Omit for default.

                    - `type BetaInlineSkill struct{…}`

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Source BetaInlineSkillSource`

                        Inline skill payload

                        - `Data string`

                          Base64-encoded skill zip bundle.

                        - `MediaType ApplicationZip`

                          The media type of the inline skill payload. Must be `application/zip`.

                          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                        - `Type Base64`

                          The type of the inline skill source. Must be `base64`.

                          - `const Base64Base64 Base64 = "base64"`

                      - `Type Inline`

                        Defines an inline skill for this request.

                        - `const InlineInline Inline = "inline"`

                - `type BetaLocalEnvironment struct{…}`

                  - `Type Local`

                    Use a local computer environment.

                    - `const LocalLocal Local = "local"`

                  - `Skills []BetaLocalSkill`

                    An optional list of skills.

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Path string`

                      The path to the directory containing the skill.

                - `type BetaContainerReference struct{…}`

                  - `ContainerID string`

                    The ID of the referenced container.

                  - `Type ContainerReference`

                    References a container created with the /v1/containers endpoint

                    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Name string`

                The name of the custom tool, used to identify it in tool calls.

              - `Type Custom`

                The type of the custom tool. Always `custom`.

                - `const CustomCustom Custom = "custom"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this tool should be deferred and discovered via tool search.

              - `Description string`

                Optional description of the custom tool, used to provide more context.

              - `Format BetaCustomToolFormatUnion`

                The input format for the custom tool. Default is unconstrained text.

                - `type BetaCustomToolFormatText struct{…}`

                  Unconstrained free-form text.

                  - `Type Text`

                    Unconstrained text format. Always `text`.

                    - `const TextText Text = "text"`

                - `type BetaCustomToolFormatGrammar struct{…}`

                  A grammar defined by the user.

                  - `Definition string`

                    The grammar definition.

                  - `Syntax string`

                    The syntax of the grammar definition. One of `lark` or `regex`.

                    - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                    - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                  - `Type Grammar`

                    Grammar format. Always `grammar`.

                    - `const GrammarGrammar Grammar = "grammar"`

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

              - `Description string`

                A description of the namespace shown to the model.

              - `Name string`

                The namespace name used in tool calls (for example, `crm`).

              - `Tools []BetaNamespaceToolToolUnion`

                The function/custom tools available inside this namespace.

                - `type BetaNamespaceToolToolFunction struct{…}`

                  - `Name string`

                  - `Type Function`

                    - `const FunctionFunction Function = "function"`

                  - `AllowedCallers []string`

                    The tool invocation context(s).

                    - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                    - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                  - `DeferLoading bool`

                    Whether this function should be deferred and discovered via tool search.

                  - `Description string`

                  - `OutputSchema map[string, any]`

                    A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                  - `Parameters any`

                  - `Strict bool`

                    Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                - `type BetaCustomTool struct{…}`

                  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Type Namespace`

                The type of the tool. Always `namespace`.

                - `const NamespaceNamespace Namespace = "namespace"`

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

              - `Type ToolSearch`

                The type of the tool. Always `tool_search`.

                - `const ToolSearchToolSearch ToolSearch = "tool_search"`

              - `Description string`

                Description shown to the model for a client-executed tool search tool.

              - `Execution BetaToolSearchToolExecution`

                Whether tool search is executed by the server or by the client.

                - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

              - `Parameters any`

                Parameter schema for a client-executed tool search tool.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchPreviewToolType`

                The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

              - `SearchContentTypes []string`

                - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

              - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchPreviewToolUserLocation`

                The user's location.

                - `Type Approximate`

                  The type of location approximation. Always `approximate`.

                  - `const ApproximateApproximate Approximate = "approximate"`

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

              - `Type ApplyPatch`

                The type of the tool. Always `apply_patch`.

                - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

          - `Type ToolSearchOutput`

            The item type. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `ID string`

            The unique ID of this tool search output.

          - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution BetaResponseToolSearchOutputItemParamExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

            - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemParamStatus`

            The status of the tool search output.

            - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

        - `type BetaResponseInputItemAdditionalTools struct{…}`

          - `Role Developer`

            The role that provided the additional tools. Only `developer` is supported.

            - `const DeveloperDeveloper Developer = "developer"`

          - `Tools []BetaToolUnion`

            A list of additional tools made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The item type. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `ID string`

            The unique ID of this additional tools item.

          - `Agent BetaResponseInputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

          - `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`.

              - `const SummaryTextSummaryText SummaryText = "summary_text"`

          - `Type Reasoning`

            The type of the object. Always `reasoning`.

            - `const ReasoningReasoning Reasoning = "reasoning"`

          - `Agent BetaResponseReasoningItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Content []BetaResponseReasoningItemContent`

            Reasoning text content.

            - `Text string`

              The reasoning text from the model.

            - `Type ReasoningText`

              The type of the reasoning text. Always `reasoning_text`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `EncryptedContent string`

            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.

          - `Status BetaResponseReasoningItemStatus`

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

            - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

            - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

            - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

        - `type BetaResponseCompactionItemParamResp struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `EncryptedContent string`

            The encrypted content of the compaction summary.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

            The ID of the compaction item.

          - `Agent BetaResponseCompactionItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseInputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

          - `ID string`

            The unique ID of the code interpreter tool call.

          - `Code string`

            The code to run, or null if not available.

          - `ContainerID string`

            The ID of the container used to run the code.

          - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

            The outputs generated by the code interpreter, such as logs or images.
            Can be null if no outputs are available.

            - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

              The logs output from the code interpreter.

              - `Logs string`

                The logs output from the code interpreter.

              - `Type Logs`

                The type of the output. Always `logs`.

                - `const LogsLogs Logs = "logs"`

            - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

              The image output from the code interpreter.

              - `Type Image`

                The type of the output. Always `image`.

                - `const ImageImage Image = "image"`

              - `URL string`

                The URL of the image output from the code interpreter.

          - `Status BetaResponseCodeInterpreterToolCallStatus`

            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

            - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

            - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

            - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

            - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

            - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

          - `Type CodeInterpreterCall`

            The type of the code interpreter tool call. Always `code_interpreter_call`.

            - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

          - `Agent BetaResponseCodeInterpreterToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCall struct{…}`

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

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseInputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemShellCall struct{…}`

          A tool representing a request to execute one or more shell commands.

          - `Action BetaResponseInputItemShellCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

              Ordered shell commands for the execution environment to run.

            - `MaxOutputLength int64`

              Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

            - `TimeoutMs int64`

              Maximum wall-clock time in milliseconds to allow the shell commands to run.

          - `CallID string`

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

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

            The environment to execute the shell commands in.

            - `type BetaLocalEnvironment struct{…}`

            - `type BetaContainerReference struct{…}`

          - `Status string`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

            - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

        - `type BetaResponseInputItemShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

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

          - `Output []BetaResponseFunctionShellCallOutputContent`

            Captured chunks of stdout and stderr output, along with their associated outcomes.

            - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

              The exit or timeout outcome associated with this shell call.

              - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  The exit code returned by the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              Captured stderr output for the shell call.

            - `Stdout string`

              Captured stdout output for the shell call.

          - `Type ShellCallOutput`

            The type of the item. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

            The unique ID of the shell tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `MaxOutputLength int64`

            The maximum number of UTF-8 characters captured for this shell call's combined output.

          - `Status string`

            The status of the shell call output.

            - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemApplyPatchCall struct{…}`

          A tool call representing a request to create, delete, or update files using diff patches.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

            The specific create, delete, or update instruction for the apply_patch tool call.

            - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply when creating the file.

              - `Path string`

                Path of the file to create relative to the workspace root.

              - `Type CreateFile`

                The operation type. Always `create_file`.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

                Path of the file to delete relative to the workspace root.

              - `Type DeleteFile`

                The operation type. Always `delete_file`.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply to the existing file.

              - `Path string`

                Path of the file to update relative to the workspace root.

              - `Type UpdateFile`

                The operation type. Always `update_file`.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status string`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

            - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status string`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

            - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Output string`

            Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

        - `type BetaResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseInputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseInputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

            The unique ID of the approval response

          - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `type BetaResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseInputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

            - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

            - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

        - `type BetaResponseCustomToolCallOutput struct{…}`

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

          - `CallID string`

            The call ID, used to map this custom tool call output to a custom tool call.

          - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              Text, image, or file output of the custom tool call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            The type of the custom tool call output. Always `custom_tool_call_output`.

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

            The unique ID of the custom tool call output in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

          - `CallID string`

            An identifier used to map this custom tool call to a tool call output.

          - `Input string`

            The input for the custom tool call generated by the model.

          - `Name string`

            The name of the custom tool being called.

          - `Type CustomToolCall`

            The type of the custom tool call. Always `custom_tool_call`.

            - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

          - `ID string`

            The unique ID of the custom tool call in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the custom tool being called.

        - `type BetaResponseInputItemCompactionTrigger struct{…}`

          Compacts the current context. Must be the final input item.

          - `Type CompactionTrigger`

            The type of the item. Always `compaction_trigger`.

            - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

          - `Agent BetaResponseInputItemCompactionTriggerAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

            The ID of the item to reference.

          - `Agent BetaResponseInputItemItemReferenceAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Type string`

            The type of item to reference. Always `item_reference`.

            - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

        - `type BetaResponseInputItemProgram struct{…}`

          - `ID string`

            The unique ID of this program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The item type. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseInputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of this program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output.

            - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

            - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The item type. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseInputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

    - `Metadata map[string, string]`

      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.

    - `Model BetaResponseModel`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `type BetaResponseModel string`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

        - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

        - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

        - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

        - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

        - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

        - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

        - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

        - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

        - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

        - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

        - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

        - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

        - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

        - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

        - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

        - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

        - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

        - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

        - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

        - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

        - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

        - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

        - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

        - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

        - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

        - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

        - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

        - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

        - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

        - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

        - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

        - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

        - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

        - `const BetaResponseModelO3 BetaResponseModel = "o3"`

        - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

        - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

        - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

        - `const BetaResponseModelO1 BetaResponseModel = "o1"`

        - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

        - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

        - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

        - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

        - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

        - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

        - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

        - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

        - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

        - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

        - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

        - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

        - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

        - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

        - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

        - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

        - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

        - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

        - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

        - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

        - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

        - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

        - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

        - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

        - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

        - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

        - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

        - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

        - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

        - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

        - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

        - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

        - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

        - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

        - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

        - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

        - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

        - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

        - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

        - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

        - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

        - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

        - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

        - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

        - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

        - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

        - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

        - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

        - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

        - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

        - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

      - `string`

    - `Object Response`

      The object type of this resource - always set to `response`.

      - `const ResponseResponse Response = "response"`

    - `Output []BetaResponseOutputItemUnion`

      An array of content items generated by the model.

      - The length and order of items in the `output` array is dependent
        on the model's response.
      - Rather than accessing the first item in the `output` array and
        assuming it's an `assistant` message with the content generated by
        the model, you might consider using the `output_text` property where
        supported in SDKs.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

        - `ID string`

          The unique ID of the function call tool output.

        - `CallID string`

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

        - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

          - `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`.

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `Agent BetaResponseFunctionToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `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.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

          - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

            A text content.

            - `Text string`

            - `Type Text`

              - `const TextText Text = "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`.

              - `const SummaryTextSummaryText SummaryText = "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`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `type BetaResponseOutputRefusal struct{…}`

            A refusal from the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `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`.

              - `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.

            - `Type ComputerScreenshot`

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

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

          - `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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The type of the item. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `Agent BetaResponseOutputItemAgentMessageAgent`

          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.

          - `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`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `Agent BetaResponseOutputItemMultiAgentCallAgent`

          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.

          - `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.

        - `Output []BetaResponseOutputText`

          Text output returned by the multi-agent action.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

          - `Logprobs []BetaResponseOutputTextLogprob`

        - `Type MultiAgentCallOutput`

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

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `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.

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          A computer screenshot image used with the computer use tool.

        - `Status BetaResponseComputerToolCallOutputItemStatus`

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

          - `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`.

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseComputerToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseOutputItemProgram struct{…}`

        - `ID string`

          The unique ID of the program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The type of the item. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseOutputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of the program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output item.

          - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

          - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The type of the item. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseOutputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseToolSearchCall struct{…}`

        - `ID string`

          The unique ID of the tool search call item.

        - `Arguments any`

          Arguments used for the tool search call.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchCallExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

          - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

        - `Status BetaResponseToolSearchCallStatus`

          The status of the tool search call item that was recorded.

          - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

          - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

          - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

        - `Type ToolSearchCall`

          The type of the item. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `Agent BetaResponseToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseToolSearchOutputItem struct{…}`

        - `ID string`

          The unique ID of the tool search output item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

          - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemStatus`

          The status of the tool search output item that was recorded.

          - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by tool search.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ToolSearchOutput`

          The type of the item. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `Agent BetaResponseToolSearchOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemAdditionalTools struct{…}`

        - `ID string`

          The unique ID of the additional tools item.

        - `Role string`

          The role that provided the additional tools.

          - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

          - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

          - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

          - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

          - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

          - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

        - `Tools []BetaToolUnion`

          The additional tool definitions made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The type of the item. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `Agent BetaResponseOutputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCompactionItem struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `ID string`

          The unique ID of the compaction item.

        - `EncryptedContent string`

          The encrypted content that was produced by compaction.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `Agent BetaResponseCompactionItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseOutputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseOutputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseOutputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionShellToolCall struct{…}`

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

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Action BetaResponseFunctionShellToolCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

          - `MaxOutputLength int64`

            Optional maximum number of characters to return from each command.

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the commands.

        - `CallID string`

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

        - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

          Represents the use of a local environment to perform shell actions.

          - `type BetaResponseLocalEnvironment struct{…}`

            Represents the use of a local environment to perform shell actions.

            - `Type Local`

              The environment type. Always `local`.

              - `const LocalLocal Local = "local"`

          - `type BetaResponseContainerReference struct{…}`

            Represents a container created with /v1/containers.

            - `ContainerID string`

            - `Type ContainerReference`

              The environment type. Always `container_reference`.

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `Status BetaResponseFunctionShellToolCallStatus`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `Agent BetaResponseFunctionShellToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

        - `ID string`

          The unique ID of the shell call output. Populated when this item is returned via API.

        - `CallID string`

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

        - `MaxOutputLength int64`

          The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

        - `Output []BetaResponseFunctionShellToolCallOutputOutput`

          An array of shell call output contents

          - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

            Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                Exit code from the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            The standard error output that was captured.

          - `Stdout string`

            The standard output that was captured.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `Status BetaResponseFunctionShellToolCallOutputStatus`

          The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

        - `Type ShellCallOutput`

          The type of the shell call output. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `Agent BetaResponseFunctionShellToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseApplyPatchToolCall struct{…}`

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

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseApplyPatchToolCallOperationUnion`

          One of the create_file, delete_file, or update_file operations applied via apply_patch.

          - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

            Instruction describing how to create a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to create.

            - `Type CreateFile`

              Create a new file with the provided diff.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

            Instruction describing how to delete a file via the apply_patch tool.

            - `Path string`

              Path of the file to delete.

            - `Type DeleteFile`

              Delete the specified file.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

            Instruction describing how to update a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to update.

            - `Type UpdateFile`

              Update an existing file with the provided diff.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status BetaResponseApplyPatchToolCallStatus`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

          - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `Agent BetaResponseApplyPatchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status BetaResponseApplyPatchToolCallOutputStatus`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

          - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `Agent BetaResponseApplyPatchToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call output.

        - `Output string`

          Optional textual output returned by the apply patch tool.

      - `type BetaResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseOutputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

          - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

          - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

      - `type BetaResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseOutputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseOutputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ID string`

          The unique ID of the approval response

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `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.

        - `ID string`

          The unique ID of the custom tool call output item.

        - `Status string`

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

          - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

          - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

          - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

    - `ParallelToolCalls bool`

      Whether to allow the model to run tool calls in parallel.

    - `Temperature float64`

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
      We generally recommend altering this or `top_p` but not both.

    - `ToolChoice BetaResponseToolChoiceUnion`

      How the model should select which tool (or tools) to use when generating
      a response. See the `tools` parameter to see how to specify which tools
      the model can call.

      - `type BetaToolChoiceOptions string`

        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a message.

        `auto` means the model can pick between generating a message or calling one or
        more tools.

        `required` means the model must call one or more tools.

        - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

        - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

        - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

      - `type BetaToolChoiceAllowed struct{…}`

        Constrains the tools available to the model to a pre-defined set.

        - `Mode BetaToolChoiceAllowedMode`

          Constrains the tools available to the model to a pre-defined set.

          `auto` allows the model to pick from among the allowed tools and generate a
          message.

          `required` requires the model to call one or more of the allowed tools.

          - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

          - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

        - `Tools []map[string, any]`

          A list of tool definitions that the model should be allowed to call.

          For the Responses API, the list of tool definitions might look like:

          ```json
          [
            { "type": "function", "name": "get_weather" },
            { "type": "mcp", "server_label": "deepwiki" },
            { "type": "image_generation" }
          ]
          ```

        - `Type AllowedTools`

          Allowed tool configuration type. Always `allowed_tools`.

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type BetaToolChoiceTypes struct{…}`

        Indicates that the model should use a built-in tool to generate a response.
        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

        - `Type BetaToolChoiceTypesType`

          The type of hosted tool the model should to use. Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).

          Allowed values are:

          - `file_search`
          - `web_search_preview`
          - `computer`
          - `computer_use_preview`
          - `computer_use`
          - `code_interpreter`
          - `image_generation`

          - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

          - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

          - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

          - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

          - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

      - `type BetaToolChoiceFunction struct{…}`

        Use this option to force the model to call a specific function.

        - `Name string`

          The name of the function to call.

        - `Type Function`

          For function calling, the type is always `function`.

          - `const FunctionFunction Function = "function"`

      - `type BetaToolChoiceMcp struct{…}`

        Use this option to force the model to call a specific tool on a remote MCP server.

        - `ServerLabel string`

          The label of the MCP server to use.

        - `Type Mcp`

          For MCP tools, the type is always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

          The name of the tool to call on the server.

      - `type BetaToolChoiceCustom struct{…}`

        Use this option to force the model to call a specific custom tool.

        - `Name string`

          The name of the custom tool to call.

        - `Type Custom`

          For custom tool calling, the type is always `custom`.

          - `const CustomCustom Custom = "custom"`

      - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

        - `Type ProgrammaticToolCalling`

          The tool to call. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolChoiceApplyPatch struct{…}`

        Forces the model to call the apply_patch tool when executing a tool call.

        - `Type ApplyPatch`

          The tool to call. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type BetaToolChoiceShell struct{…}`

        Forces the model to call the shell tool when a tool call is required.

        - `Type Shell`

          The tool to call. Always `shell`.

          - `const ShellShell Shell = "shell"`

    - `Tools []BetaToolUnion`

      An array of tools the model may call while generating a response. You
      can specify which tool to use by setting the `tool_choice` parameter.

      We support the following categories of tools:

      - **Built-in tools**: Tools that are provided by OpenAI that extend the
        model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
        or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).
      - **MCP Tools**: Integrations with third-party systems via custom MCP servers
        or predefined connectors such as Google Drive and SharePoint. Learn more about
        [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
      - **Function calls (custom tools)**: Functions that are defined by you,
        enabling the model to call your own code with strongly typed arguments
        and outputs. Learn more about
        [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
        custom tools to call your own code.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `TopP float64`

      An alternative to sampling with temperature, called nucleus sampling,
      where the model considers the results of the tokens with top_p probability
      mass. So 0.1 means only the tokens comprising the top 10% probability mass
      are considered.

      We generally recommend altering this or `temperature` but not both.

    - `Background bool`

      Whether to run the model response in the background.
      [Learn more](https://platform.openai.com/docs/guides/background).

    - `CompletedAt float64`

      Unix timestamp (in seconds) of when this Response was completed.
      Only present when the status is `completed`.

    - `Conversation BetaResponseConversation`

      The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

      - `ID string`

        The unique ID of the conversation that this response was associated with.

    - `MaxOutputTokens int64`

      An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

    - `MaxToolCalls int64`

      The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

    - `Moderation BetaResponseModeration`

      Moderation results for the response input and output, if moderated completions were requested.

      - `Input BetaResponseModerationInputUnion`

        Moderation for the response input.

        - `type BetaResponseModerationInputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationInputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

      - `Output BetaResponseModerationOutputUnion`

        Moderation for the response output.

        - `type BetaResponseModerationOutputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationOutputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

    - `PreviousResponseID string`

      The unique ID of the previous response to the model. Use this to
      create multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

    - `Prompt BetaResponsePrompt`

      Reference to a prompt template and its variables.
      [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

      - `ID string`

        The unique identifier of the prompt template to use.

      - `Variables map[string, BetaResponsePromptVariableUnion]`

        Optional map of values to substitute in for variables in your
        prompt. The substitution values can either be strings, or other
        Response input types like images or files.

        - `string`

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

        Optional version of the prompt template.

    - `PromptCacheKey string`

      Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

    - `PromptCacheOptions BetaResponsePromptCacheOptions`

      The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

      - `Mode string`

        Whether implicit prompt-cache breakpoints were enabled.

        - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

        - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

      - `Ttl string`

        The minimum lifetime applied to each cache breakpoint.

        - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

    - `PromptCacheRetention BetaResponsePromptCacheRetention`

      Deprecated. Use `prompt_cache_options.ttl` instead.

      The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
      This field expresses a maximum retention policy, while
      `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
      fields are independent and do not interact.
      For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

      For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

      - Organizations without ZDR enabled default to `24h`.
      - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

      - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

      - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

    - `Reasoning BetaResponseReasoning`

      **gpt-5 and o-series models only**

      Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

      - `Context string`

        Controls which reasoning items are rendered back to the model on later turns.
        If omitted or set to `auto`, the model determines the context mode. The
        `gpt-5.6` model family defaults to `all_turns`; earlier models default to
        `current_turn`.

        When returned on a response, this is the effective reasoning context mode
        used for the response.

        - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

        - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

        - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

      - `Effort string`

        Constrains effort on reasoning for reasoning models. Currently supported
        values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
        Reducing reasoning effort can result in faster responses and fewer tokens
        used on reasoning in a response. Not all reasoning models support every
        value. See the
        [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
        for model-specific support.

        - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

        - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

        - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

        - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

        - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

        - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

        - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

      - `GenerateSummary string`

        **Deprecated:** use `summary` instead.

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

        - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

        - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

      - `Mode string`

        Controls the reasoning execution mode for the request.

        When returned on a response, this is the effective execution mode.

        - `string`

        - `string`

          - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

          - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

      - `Summary string`

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

        - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

        - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

        - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

      A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
      The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `ServiceTier BetaResponseServiceTier`

      Specifies the processing type used for serving the request.

      - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
      - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
      - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
      - When not set, the default behavior is 'auto'.

      When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

      - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

      - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

      - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

      - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

      - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

    - `Status BetaResponseStatus`

      The status of the response generation. One of `completed`, `failed`,
      `in_progress`, `cancelled`, `queued`, or `incomplete`.

      - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

      - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

      - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

      - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

      - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

      - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

    - `Text BetaResponseTextConfig`

      Configuration options for a text response from the model. Can be plain
      text or structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

      - `Format BetaResponseFormatTextConfigUnion`

        An object specifying the format that the model must output.

        Configuring `{ "type": "json_schema" }` enables Structured Outputs,
        which ensures the model will match your supplied JSON schema. Learn more in the
        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

        The default format is `{ "type": "text" }` with no additional options.

        **Not recommended for gpt-4o and newer models:**

        Setting to `{ "type": "json_object" }` enables the older JSON mode, which
        ensures the message the model generates is valid JSON. Using `json_schema`
        is preferred for models that support it.

        - `type BetaResponseFormatTextConfigText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            The type of response format being defined. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

          JSON Schema response format. Used to generate structured JSON responses.
          Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

          - `Name string`

            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.

          - `Schema map[string, any]`

            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).

          - `Type JSONSchema`

            The type of response format being defined. Always `json_schema`.

            - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

          - `Description string`

            A description of what the response format is for, used by the model to
            determine how to respond in the format.

          - `Strict bool`

            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).

        - `type BetaResponseFormatTextConfigJSONObject struct{…}`

          JSON object response format. An older method of generating JSON responses.
          Using `json_schema` is recommended for models that support it. Note that the
          model will not generate JSON without a system or user message instructing it
          to do so.

          - `Type JSONObject`

            The type of response format being defined. Always `json_object`.

            - `const JSONObjectJSONObject JSONObject = "json_object"`

      - `Verbosity BetaResponseTextConfigVerbosity`

        Constrains the verbosity of the model's response. Lower values will result in
        more concise responses, while higher values will result in more verbose responses.
        Currently supported values are `low`, `medium`, and `high`. The default is
        `medium`.

        - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

        - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

        - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

    - `TopLogprobs int64`

      An integer between 0 and 20 specifying the maximum number of most likely
      tokens to return at each token position, each with an associated log
      probability. In some cases, the number of returned tokens may be fewer than
      requested.

    - `Truncation BetaResponseTruncation`

      The truncation strategy to use for the model response.

      - `auto`: If the input to this Response exceeds
        the model's context window size, the model will truncate the
        response to fit the context window by dropping items from the beginning of the conversation.
      - `disabled` (default): If the input size will exceed the context window
        size for a model, the request will fail with a 400 error.

      - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

      - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

    - `Usage BetaResponseUsage`

      Represents token usage details including input tokens, output tokens,
      a breakdown of output tokens, and the total tokens used.

      - `InputTokens int64`

        The number of input tokens.

      - `InputTokensDetails BetaResponseUsageInputTokensDetails`

        A detailed breakdown of the input tokens.

        - `CacheWriteTokens int64`

          The number of input tokens that were written to the cache.

        - `CachedTokens int64`

          The number of tokens that were retrieved from the cache.
          [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

      - `OutputTokens int64`

        The number of output tokens.

      - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

        A detailed breakdown of the output tokens.

        - `ReasoningTokens int64`

          The number of reasoning tokens.

      - `TotalTokens int64`

        The total number of tokens used.

    - `User string`

      This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
      A stable identifier for your end-users.
      Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseFailed`

    The type of the event. Always `response.failed`.

    - `const ResponseFailedResponseFailed ResponseFailed = "response.failed"`

  - `Agent BetaResponseFailedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response File Search Call Completed Event

- `type BetaResponseFileSearchCallCompletedEvent struct{…}`

  Emitted when a file search call is completed (results found).

  - `ItemID string`

    The ID of the output item that the file search call is initiated.

  - `OutputIndex int64`

    The index of the output item that the file search call is initiated.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseFileSearchCallCompleted`

    The type of the event. Always `response.file_search_call.completed`.

    - `const ResponseFileSearchCallCompletedResponseFileSearchCallCompleted ResponseFileSearchCallCompleted = "response.file_search_call.completed"`

  - `Agent BetaResponseFileSearchCallCompletedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response File Search Call In Progress Event

- `type BetaResponseFileSearchCallInProgressEvent struct{…}`

  Emitted when a file search call is initiated.

  - `ItemID string`

    The ID of the output item that the file search call is initiated.

  - `OutputIndex int64`

    The index of the output item that the file search call is initiated.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseFileSearchCallInProgress`

    The type of the event. Always `response.file_search_call.in_progress`.

    - `const ResponseFileSearchCallInProgressResponseFileSearchCallInProgress ResponseFileSearchCallInProgress = "response.file_search_call.in_progress"`

  - `Agent BetaResponseFileSearchCallInProgressEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response File Search Call Searching Event

- `type BetaResponseFileSearchCallSearchingEvent struct{…}`

  Emitted when a file search is currently searching.

  - `ItemID string`

    The ID of the output item that the file search call is initiated.

  - `OutputIndex int64`

    The index of the output item that the file search call is searching.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseFileSearchCallSearching`

    The type of the event. Always `response.file_search_call.searching`.

    - `const ResponseFileSearchCallSearchingResponseFileSearchCallSearching ResponseFileSearchCallSearching = "response.file_search_call.searching"`

  - `Agent BetaResponseFileSearchCallSearchingEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response File Search Tool Call

- `type BetaResponseFileSearchToolCall struct{…}`

  The results of a file search tool call. See the
  [file search guide](https://platform.openai.com/docs/guides/tools-file-search) 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`,

    - `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`.

    - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

  - `Agent BetaResponseFileSearchToolCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Results []BetaResponseFileSearchToolCallResult`

    The results of the file search tool call.

    - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

      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.

      - `string`

      - `float64`

      - `bool`

    - `FileID string`

      The unique ID of the file.

    - `Filename string`

      The name of the file.

    - `Score float64`

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

    - `Text string`

      The text that was retrieved from the file.

### Beta Response Format Text Config

- `type BetaResponseFormatTextConfigUnion interface{…}`

  An object specifying the format that the model must output.

  Configuring `{ "type": "json_schema" }` enables Structured Outputs,
  which ensures the model will match your supplied JSON schema. Learn more in the
  [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

  The default format is `{ "type": "text" }` with no additional options.

  **Not recommended for gpt-4o and newer models:**

  Setting to `{ "type": "json_object" }` enables the older JSON mode, which
  ensures the message the model generates is valid JSON. Using `json_schema`
  is preferred for models that support it.

  - `type BetaResponseFormatTextConfigText struct{…}`

    Default response format. Used to generate text responses.

    - `Type Text`

      The type of response format being defined. Always `text`.

      - `const TextText Text = "text"`

  - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

    JSON Schema response format. Used to generate structured JSON responses.
    Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

    - `Name string`

      The name of the response format. Must be a-z, A-Z, 0-9, or contain
      underscores and dashes, with a maximum length of 64.

    - `Schema map[string, any]`

      The schema for the response format, described as a JSON Schema object.
      Learn how to build JSON schemas [here](https://json-schema.org/).

    - `Type JSONSchema`

      The type of response format being defined. Always `json_schema`.

      - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

    - `Description string`

      A description of what the response format is for, used by the model to
      determine how to respond in the format.

    - `Strict bool`

      Whether to enable strict schema adherence when generating the output.
      If set to true, the model will always follow the exact schema defined
      in the `schema` field. Only a subset of JSON Schema is supported when
      `strict` is `true`. To learn more, read the [Structured Outputs
      guide](https://platform.openai.com/docs/guides/structured-outputs).

  - `type BetaResponseFormatTextConfigJSONObject struct{…}`

    JSON object response format. An older method of generating JSON responses.
    Using `json_schema` is recommended for models that support it. Note that the
    model will not generate JSON without a system or user message instructing it
    to do so.

    - `Type JSONObject`

      The type of response format being defined. Always `json_object`.

      - `const JSONObjectJSONObject JSONObject = "json_object"`

### Beta Response Format Text JSON Schema Config

- `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

  JSON Schema response format. Used to generate structured JSON responses.
  Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

  - `Name string`

    The name of the response format. Must be a-z, A-Z, 0-9, or contain
    underscores and dashes, with a maximum length of 64.

  - `Schema map[string, any]`

    The schema for the response format, described as a JSON Schema object.
    Learn how to build JSON schemas [here](https://json-schema.org/).

  - `Type JSONSchema`

    The type of response format being defined. Always `json_schema`.

    - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

  - `Description string`

    A description of what the response format is for, used by the model to
    determine how to respond in the format.

  - `Strict bool`

    Whether to enable strict schema adherence when generating the output.
    If set to true, the model will always follow the exact schema defined
    in the `schema` field. Only a subset of JSON Schema is supported when
    `strict` is `true`. To learn more, read the [Structured Outputs
    guide](https://platform.openai.com/docs/guides/structured-outputs).

### Beta Response Function Call Arguments Delta Event

- `type BetaResponseFunctionCallArgumentsDeltaEvent struct{…}`

  Emitted when there is a partial function-call arguments delta.

  - `Delta string`

    The function-call arguments delta that is added.

  - `ItemID string`

    The ID of the output item that the function-call arguments delta is added to.

  - `OutputIndex int64`

    The index of the output item that the function-call arguments delta is added to.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseFunctionCallArgumentsDelta`

    The type of the event. Always `response.function_call_arguments.delta`.

    - `const ResponseFunctionCallArgumentsDeltaResponseFunctionCallArgumentsDelta ResponseFunctionCallArgumentsDelta = "response.function_call_arguments.delta"`

  - `Agent BetaResponseFunctionCallArgumentsDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Function Call Arguments Done Event

- `type BetaResponseFunctionCallArgumentsDoneEvent struct{…}`

  Emitted when function-call arguments are finalized.

  - `Arguments string`

    The function-call arguments.

  - `ItemID string`

    The ID of the item.

  - `Name string`

    The name of the function that was called.

  - `OutputIndex int64`

    The index of the output item.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseFunctionCallArgumentsDone`

    - `const ResponseFunctionCallArgumentsDoneResponseFunctionCallArgumentsDone ResponseFunctionCallArgumentsDone = "response.function_call_arguments.done"`

  - `Agent BetaResponseFunctionCallArgumentsDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Function Call Output Item

- `type BetaResponseFunctionCallOutputItemUnion interface{…}`

  A piece of message content, such as text, an image, or a file.

  - `type BetaResponseInputTextContent 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`.

      - `const InputTextInputText InputText = "input_text"`

    - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputImageContent struct{…}`

    An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

    - `Type InputImage`

      The type of the input item. Always `input_image`.

      - `const InputImageInputImage InputImage = "input_image"`

    - `Detail BetaResponseInputImageContentDetail`

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

      - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

      - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

      - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

      - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

    - `FileID string`

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

    - `ImageURL string`

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

    - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputFileContent struct{…}`

    A file input to the model.

    - `Type InputFile`

      The type of the input item. Always `input_file`.

      - `const InputFileInputFile InputFile = "input_file"`

    - `Detail BetaResponseInputFileContentDetail`

      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`.

      - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

      - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

      - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

    - `FileData string`

      The base64-encoded data of the file to be sent to the model.

    - `FileID string`

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

    - `FileURL string`

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

    - `Filename string`

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

    - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Function Call Output Item List

- `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

  An array of content outputs (text, image, file) for the function tool call.

  - `type BetaResponseInputTextContent 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`.

      - `const InputTextInputText InputText = "input_text"`

    - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputImageContent struct{…}`

    An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

    - `Type InputImage`

      The type of the input item. Always `input_image`.

      - `const InputImageInputImage InputImage = "input_image"`

    - `Detail BetaResponseInputImageContentDetail`

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

      - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

      - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

      - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

      - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

    - `FileID string`

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

    - `ImageURL string`

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

    - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputFileContent struct{…}`

    A file input to the model.

    - `Type InputFile`

      The type of the input item. Always `input_file`.

      - `const InputFileInputFile InputFile = "input_file"`

    - `Detail BetaResponseInputFileContentDetail`

      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`.

      - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

      - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

      - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

    - `FileData string`

      The base64-encoded data of the file to be sent to the model.

    - `FileID string`

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

    - `FileURL string`

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

    - `Filename string`

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

    - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Function Shell Call Output Content

- `type BetaResponseFunctionShellCallOutputContent struct{…}`

  Captured stdout and stderr for a portion of a shell tool call output.

  - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

    The exit or timeout outcome associated with this shell call.

    - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

      Indicates that the shell call exceeded its configured time limit.

      - `Type Timeout`

        The outcome type. Always `timeout`.

        - `const TimeoutTimeout Timeout = "timeout"`

    - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

      Indicates that the shell commands finished and returned an exit code.

      - `ExitCode int64`

        The exit code returned by the shell process.

      - `Type Exit`

        The outcome type. Always `exit`.

        - `const ExitExit Exit = "exit"`

  - `Stderr string`

    Captured stderr output for the shell call.

  - `Stdout string`

    Captured stdout output for the shell call.

### Beta Response Function Shell Tool Call

- `type BetaResponseFunctionShellToolCall struct{…}`

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

  - `ID string`

    The unique ID of the shell tool call. Populated when this item is returned via API.

  - `Action BetaResponseFunctionShellToolCallAction`

    The shell commands and limits that describe how to run the tool call.

    - `Commands []string`

    - `MaxOutputLength int64`

      Optional maximum number of characters to return from each command.

    - `TimeoutMs int64`

      Optional timeout in milliseconds for the commands.

  - `CallID string`

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

  - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

    Represents the use of a local environment to perform shell actions.

    - `type BetaResponseLocalEnvironment struct{…}`

      Represents the use of a local environment to perform shell actions.

      - `Type Local`

        The environment type. Always `local`.

        - `const LocalLocal Local = "local"`

    - `type BetaResponseContainerReference struct{…}`

      Represents a container created with /v1/containers.

      - `ContainerID string`

      - `Type ContainerReference`

        The environment type. Always `container_reference`.

        - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

  - `Status BetaResponseFunctionShellToolCallStatus`

    The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

    - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

    - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

    - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

  - `Type ShellCall`

    The type of the item. Always `shell_call`.

    - `const ShellCallShellCall ShellCall = "shell_call"`

  - `Agent BetaResponseFunctionShellToolCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseFunctionShellToolCallCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

      - `Type Direct`

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        - `const ProgramProgram Program = "program"`

  - `CreatedBy string`

    The ID of the entity that created this tool call.

### Beta Response Function Shell Tool Call Output

- `type BetaResponseFunctionShellToolCallOutput struct{…}`

  The output of a shell tool call that was emitted.

  - `ID string`

    The unique ID of the shell call output. Populated when this item is returned via API.

  - `CallID string`

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

  - `MaxOutputLength int64`

    The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

  - `Output []BetaResponseFunctionShellToolCallOutputOutput`

    An array of shell call output contents

    - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

      Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

      - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

        Indicates that the shell call exceeded its configured time limit.

        - `Type Timeout`

          The outcome type. Always `timeout`.

          - `const TimeoutTimeout Timeout = "timeout"`

      - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

        Indicates that the shell commands finished and returned an exit code.

        - `ExitCode int64`

          Exit code from the shell process.

        - `Type Exit`

          The outcome type. Always `exit`.

          - `const ExitExit Exit = "exit"`

    - `Stderr string`

      The standard error output that was captured.

    - `Stdout string`

      The standard output that was captured.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `Status BetaResponseFunctionShellToolCallOutputStatus`

    The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

    - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

    - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

    - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

  - `Type ShellCallOutput`

    The type of the shell call output. Always `shell_call_output`.

    - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

  - `Agent BetaResponseFunctionShellToolCallOutputAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

      - `Type Direct`

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        - `const ProgramProgram Program = "program"`

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Function Tool Call

- `type BetaResponseFunctionToolCall struct{…}`

  A tool call to run a function. See the
  [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

    - `const FunctionCallFunctionCall FunctionCall = "function_call"`

  - `ID string`

    The unique ID of the function tool call.

  - `Agent BetaResponseFunctionToolCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseFunctionToolCallCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

      - `Type Direct`

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        - `const ProgramProgram Program = "program"`

  - `Namespace string`

    The namespace of the function to run.

  - `Status BetaResponseFunctionToolCallStatus`

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

    - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

    - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

    - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

### Beta Response Function Tool Call Item

- `type BetaResponseFunctionToolCallItem struct{…}`

  A tool call to run a function. See the
  [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

  - `ID string`

    The unique ID of the function tool call.

  - `Status string`

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

    - `const BetaResponseFunctionToolCallItemStatusInProgress BetaResponseFunctionToolCallItemStatus = "in_progress"`

    - `const BetaResponseFunctionToolCallItemStatusCompleted BetaResponseFunctionToolCallItemStatus = "completed"`

    - `const BetaResponseFunctionToolCallItemStatusIncomplete BetaResponseFunctionToolCallItemStatus = "incomplete"`

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Function Tool Call Output Item

- `type BetaResponseFunctionToolCallOutputItem struct{…}`

  - `ID string`

    The unique ID of the function call tool output.

  - `CallID string`

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

  - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

    - `string`

    - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

      - `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`.

          - `const InputTextInputText InputText = "input_text"`

        - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `Detail BetaResponseInputImageDetail`

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

          - `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`.

          - `const InputImageInputImage InputImage = "input_image"`

        - `FileID string`

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

        - `ImageURL string`

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

        - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

        - `Type InputFile`

          The type of the input item. Always `input_file`.

          - `const InputFileInputFile InputFile = "input_file"`

        - `Detail BetaResponseInputFileDetail`

          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`.

          - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

          - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

          - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

        - `FileData string`

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

        - `FileID string`

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

        - `FileURL string`

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

        - `Filename string`

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

        - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

  - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

    - `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`.

    - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

  - `Agent BetaResponseFunctionToolCallOutputItemAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

    The execution context that produced this tool call.

    - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

      - `Type Direct`

        The caller type. Always `direct`.

        - `const DirectDirect Direct = "direct"`

    - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

      - `CallerID string`

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

      - `Type Program`

        The caller type. Always `program`.

        - `const ProgramProgram Program = "program"`

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Function Web Search

- `type BetaResponseFunctionWebSearch struct{…}`

  The results of a web search tool call. See the
  [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

  - `ID string`

    The unique ID of the web search tool call.

  - `Action BetaResponseFunctionWebSearchActionUnion`

    An object describing the specific action taken in this web search call.
    Includes details on how the model used the web (search, open_page, find_in_page).

    - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

      Action type "search" - Performs a web search query.

      - `Type Search`

        The action type.

        - `const SearchSearch Search = "search"`

      - `Queries []string`

        The search queries.

      - `Query string`

        The search query.

      - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

        The sources used in the search.

        - `Type URL`

          The type of source. Always `url`.

          - `const URLURL URL = "url"`

        - `URL string`

          The URL of the source.

    - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

      Action type "open_page" - Opens a specific URL from search results.

      - `Type OpenPage`

        The action type.

        - `const OpenPageOpenPage OpenPage = "open_page"`

      - `URL string`

        The URL opened by the model.

    - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

      Action type "find_in_page": Searches for a pattern within a loaded page.

      - `Pattern string`

        The pattern or text to search for within the page.

      - `Type FindInPage`

        The action type.

        - `const FindInPageFindInPage FindInPage = "find_in_page"`

      - `URL string`

        The URL of the page searched for the pattern.

  - `Status BetaResponseFunctionWebSearchStatus`

    The status of the web search tool call.

    - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

    - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

    - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

    - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

  - `Type WebSearchCall`

    The type of the web search tool call. Always `web_search_call`.

    - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

  - `Agent BetaResponseFunctionWebSearchAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Image Gen Call Completed Event

- `type BetaResponseImageGenCallCompletedEvent struct{…}`

  Emitted when an image generation tool call has completed and the final image is available.

  - `ItemID string`

    The unique identifier of the image generation item being processed.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseImageGenerationCallCompleted`

    The type of the event. Always 'response.image_generation_call.completed'.

    - `const ResponseImageGenerationCallCompletedResponseImageGenerationCallCompleted ResponseImageGenerationCallCompleted = "response.image_generation_call.completed"`

  - `Agent BetaResponseImageGenCallCompletedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Image Gen Call Generating Event

- `type BetaResponseImageGenCallGeneratingEvent struct{…}`

  Emitted when an image generation tool call is actively generating an image (intermediate state).

  - `ItemID string`

    The unique identifier of the image generation item being processed.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `SequenceNumber int64`

    The sequence number of the image generation item being processed.

  - `Type ResponseImageGenerationCallGenerating`

    The type of the event. Always 'response.image_generation_call.generating'.

    - `const ResponseImageGenerationCallGeneratingResponseImageGenerationCallGenerating ResponseImageGenerationCallGenerating = "response.image_generation_call.generating"`

  - `Agent BetaResponseImageGenCallGeneratingEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Image Gen Call In Progress Event

- `type BetaResponseImageGenCallInProgressEvent struct{…}`

  Emitted when an image generation tool call is in progress.

  - `ItemID string`

    The unique identifier of the image generation item being processed.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `SequenceNumber int64`

    The sequence number of the image generation item being processed.

  - `Type ResponseImageGenerationCallInProgress`

    The type of the event. Always 'response.image_generation_call.in_progress'.

    - `const ResponseImageGenerationCallInProgressResponseImageGenerationCallInProgress ResponseImageGenerationCallInProgress = "response.image_generation_call.in_progress"`

  - `Agent BetaResponseImageGenCallInProgressEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Image Gen Call Partial Image Event

- `type BetaResponseImageGenCallPartialImageEvent struct{…}`

  Emitted when a partial image is available during image generation streaming.

  - `ItemID string`

    The unique identifier of the image generation item being processed.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `PartialImageB64 string`

    Base64-encoded partial image data, suitable for rendering as an image.

  - `PartialImageIndex int64`

    0-based index for the partial image (backend is 1-based, but this is 0-based for the user).

  - `SequenceNumber int64`

    The sequence number of the image generation item being processed.

  - `Type ResponseImageGenerationCallPartialImage`

    The type of the event. Always 'response.image_generation_call.partial_image'.

    - `const ResponseImageGenerationCallPartialImageResponseImageGenerationCallPartialImage ResponseImageGenerationCallPartialImage = "response.image_generation_call.partial_image"`

  - `Agent BetaResponseImageGenCallPartialImageEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response In Progress Event

- `type BetaResponseInProgressEvent struct{…}`

  Emitted when the response is in progress.

  - `Response BetaResponse`

    The response that is in progress.

    - `ID string`

      Unique identifier for this Response.

    - `CreatedAt float64`

      Unix timestamp (in seconds) of when this Response was created.

    - `Error BetaResponseError`

      An error object returned when the model fails to generate a Response.

      - `Code BetaResponseErrorCode`

        The error code for the response.

        - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

        - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

        - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

        - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

        - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

        - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

        - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

        - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

        - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

        - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

        - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

        - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

        - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

        - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

        - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

        - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

        - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

        - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

        - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

        - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

      - `Message string`

        A human-readable description of the error.

    - `IncompleteDetails BetaResponseIncompleteDetails`

      Details about why the response is incomplete.

      - `Reason string`

        The reason why the response is incomplete.

        - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

        - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

    - `Instructions BetaResponseInstructionsUnion`

      A system (or developer) message inserted into the model's context.

      When using along with `previous_response_id`, the instructions from a previous
      response will not be carried over to the next response. This makes it simple
      to swap out system (or developer) messages in new responses.

      - `string`

      - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

        A list of one or many input items to the model, containing
        different content types.

        - `type BetaEasyInputMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role. Messages with the
          `assistant` role are presumed to have been generated by the model in previous
          interactions.

          - `Content BetaEasyInputMessageContentUnion`

            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.

            - `string`

            - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

              A list of one or many input items to the model, containing different content
              types.

              - `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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail BetaResponseInputImageDetail`

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

                  - `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`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileDetail`

                  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`.

                  - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                  - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                  - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                - `FileData string`

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

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Role BetaEasyInputMessageRole`

            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.

            - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

            - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

            - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

            - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

          - `Phase BetaEasyInputMessagePhase`

            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.

            - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

            - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

          - `Type BetaEasyInputMessageType`

            The type of the message input. Always `message`.

            - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

        - `type BetaResponseInputItemMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role.

          - `Content BetaResponseInputMessageContentList`

            A list of one or many input items to the model, containing different content
            types.

          - `Role string`

            The role of the message input. One of `user`, `system`, or `developer`.

            - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

            - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

            - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

          - `Agent BetaResponseInputItemMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

            - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

            - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

          - `Type string`

            The type of the message input. Always set to `message`.

            - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

        - `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.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

              - `Annotations []BetaResponseOutputTextAnnotationUnion`

                The annotations of the text output.

                - `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`.

                    - `const FileCitationFileCitation FileCitation = "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`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the web resource.

                - `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`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                    - `const FilePathFilePath FilePath = "file_path"`

              - `Text string`

                The text output from the model.

              - `Type OutputText`

                The type of the output text. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Logprobs []BetaResponseOutputTextLogprob`

                - `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`.

                - `const RefusalRefusal Refusal = "refusal"`

          - `Role Assistant`

            The role of the output message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `Status BetaResponseOutputMessageStatus`

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

            - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

            - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

            - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

          - `Type Message`

            The type of the output message. Always `message`.

            - `const MessageMessage Message = "message"`

          - `Agent BetaResponseOutputMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Phase BetaResponseOutputMessagePhase`

            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.

            - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

            - `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`.

            - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

          - `Agent BetaResponseFileSearchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Results []BetaResponseFileSearchToolCallResult`

            The results of the file search tool call.

            - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

              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.

              - `string`

              - `float64`

              - `bool`

            - `FileID string`

              The unique ID of the file.

            - `Filename string`

              The name of the file.

            - `Score float64`

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

            - `Text string`

              The text that was retrieved from the file.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

              The type of the pending safety check.

            - `Message string`

              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.

            - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

            - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

            - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

          - `Type BetaResponseComputerToolCallType`

            The type of the computer call. Always `computer_call`.

            - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

          - `Action BetaComputerActionUnion`

            A click action.

            - `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`.

                - `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`.

                - `const ClickClick Click = "click"`

              - `X int64`

                The x-coordinate where the click occurred.

              - `Y int64`

                The y-coordinate where the click occurred.

              - `Keys []string`

                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`.

                - `const DoubleClickDoubleClick DoubleClick = "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`.

                - `const DragDrag Drag = "drag"`

              - `Keys []string`

                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`.

                - `const KeypressKeypress Keypress = "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`.

                - `const MoveMove Move = "move"`

              - `X int64`

                The x-coordinate to move to.

              - `Y int64`

                The y-coordinate to move to.

              - `Keys []string`

                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`.

                - `const ScreenshotScreenshot Screenshot = "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`.

                - `const ScrollScroll Scroll = "scroll"`

              - `X int64`

                The x-coordinate where the scroll occurred.

              - `Y int64`

                The y-coordinate where the scroll occurred.

              - `Keys []string`

                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`.

                - `const TypeType Type = "type"`

            - `type BetaComputerActionWait struct{…}`

              A wait action.

              - `Type Wait`

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

                - `const WaitWait Wait = "wait"`

          - `Actions BetaComputerActionList`

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

            - `type BetaComputerActionClick struct{…}`

              A click action.

            - `type BetaComputerActionDoubleClick struct{…}`

              A double click action.

            - `type BetaComputerActionDrag struct{…}`

              A drag action.

            - `type BetaComputerActionKeypress struct{…}`

              A collection of keypresses the model would like to perform.

            - `type BetaComputerActionMove struct{…}`

              A mouse move action.

            - `type BetaComputerActionScreenshot struct{…}`

              A screenshot action.

            - `type BetaComputerActionScroll struct{…}`

              A scroll action.

            - `type BetaComputerActionType struct{…}`

              An action to type in text.

            - `type BetaComputerActionWait struct{…}`

              A wait action.

          - `Agent BetaResponseComputerToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

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

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            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`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

              The identifier of an uploaded file that contains the screenshot.

            - `ImageURL string`

              The URL of the screenshot image.

          - `Type ComputerCallOutput`

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

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

            The ID of the computer tool call output.

          - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseInputItemComputerCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

            - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

          - `ID string`

            The unique ID of the web search tool call.

          - `Action BetaResponseFunctionWebSearchActionUnion`

            An object describing the specific action taken in this web search call.
            Includes details on how the model used the web (search, open_page, find_in_page).

            - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

              Action type "search" - Performs a web search query.

              - `Type Search`

                The action type.

                - `const SearchSearch Search = "search"`

              - `Queries []string`

                The search queries.

              - `Query string`

                The search query.

              - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                The sources used in the search.

                - `Type URL`

                  The type of source. Always `url`.

                  - `const URLURL URL = "url"`

                - `URL string`

                  The URL of the source.

            - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

              Action type "open_page" - Opens a specific URL from search results.

              - `Type OpenPage`

                The action type.

                - `const OpenPageOpenPage OpenPage = "open_page"`

              - `URL string`

                The URL opened by the model.

            - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

              Action type "find_in_page": Searches for a pattern within a loaded page.

              - `Pattern string`

                The pattern or text to search for within the page.

              - `Type FindInPage`

                The action type.

                - `const FindInPageFindInPage FindInPage = "find_in_page"`

              - `URL string`

                The URL of the page searched for the pattern.

          - `Status BetaResponseFunctionWebSearchStatus`

            The status of the web search tool call.

            - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

            - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

            - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

            - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

          - `Type WebSearchCall`

            The type of the web search tool call. Always `web_search_call`.

            - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

          - `Agent BetaResponseFunctionWebSearchAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

            - `const FunctionCallFunctionCall FunctionCall = "function_call"`

          - `ID string`

            The unique ID of the function tool call.

          - `Agent BetaResponseFunctionToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the function to run.

          - `Status BetaResponseFunctionToolCallStatus`

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

            - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

            - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

        - `type BetaResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

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

          - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

              An array of content outputs (text, image, file) for the function tool call.

              - `type BetaResponseInputTextContent 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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  The type of the input item. Always `input_image`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail BetaResponseInputImageContentDetail`

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

                  - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                  - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                  - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                  - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileContentDetail`

                  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`.

                  - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                  - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                  - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                - `FileData string`

                  The base64-encoded data of the file to be sent to the model.

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Type FunctionCallOutput`

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

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

            The unique ID of the function tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemFunctionCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Status string`

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

            - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemAgentMessage struct{…}`

          A message routed between agents.

          - `Author string`

            The sending agent identity.

          - `Content []BetaResponseInputItemAgentMessageContentUnion`

            Plaintext, image, or encrypted content sent between agents.

            - `type BetaResponseInputTextContent struct{…}`

              A text input to the model.

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The item type. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `ID string`

            The unique ID of this agent message item.

          - `Agent BetaResponseInputItemAgentMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCall struct{…}`

          - `Action string`

            The multi-agent action that was executed.

            - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

          - `Arguments string`

            The action arguments as a JSON string.

          - `CallID string`

            The unique ID linking this call to its output.

          - `Type MultiAgentCall`

            The item type. Always `multi_agent_call`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `ID string`

            The unique ID of this multi-agent call.

          - `Agent BetaResponseInputItemMultiAgentCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

          - `Action string`

            The multi-agent action that produced this result.

            - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

          - `CallID string`

            The unique ID of the multi-agent call.

          - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

            Text output returned by the multi-agent action.

            - `Text string`

              The text content.

            - `Type OutputText`

              The content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

              Citations associated with the text content.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                - `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 citation type. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                - `EndIndex int64`

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

                - `StartIndex int64`

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

                - `Title string`

                  The title of the cited resource.

                - `Type URLCitation`

                  The citation type. Always `url_citation`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the cited resource.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                - `ContainerID string`

                  The ID of the container.

                - `EndIndex int64`

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

                - `FileID string`

                  The ID of the container file.

                - `Filename string`

                  The filename of the container file cited.

                - `StartIndex int64`

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

                - `Type ContainerFileCitation`

                  The citation type. Always `container_file_citation`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

          - `Type MultiAgentCallOutput`

            The item type. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `ID string`

            The unique ID of this multi-agent call output.

          - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemToolSearchCall struct{…}`

          - `Arguments any`

            The arguments supplied to the tool search call.

          - `Type ToolSearchCall`

            The item type. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `ID string`

            The unique ID of this tool search call.

          - `Agent BetaResponseInputItemToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution string`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

            - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

          - `Status string`

            The status of the tool search call.

            - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

            - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

            - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

        - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by the tool search output.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `Name string`

                The name of the function to call.

              - `Parameters map[string, any]`

                A JSON schema object describing the parameters of the function.

              - `Strict bool`

                Whether strict parameter validation is enforced for this function tool.

              - `Type Function`

                The type of the function tool. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function is deferred and loaded via tool search.

              - `Description string`

                A description of the function. Used by the model to determine whether or not to call the function.

              - `OutputSchema map[string, any]`

                A JSON schema object describing the JSON value encoded in string outputs for this function.

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `Type FileSearch`

                The type of the file search tool. Always `file_search`.

                - `const FileSearchFileSearch FileSearch = "file_search"`

              - `VectorStoreIDs []string`

                The IDs of the vector stores to search.

              - `Filters BetaFileSearchToolFiltersUnion`

                A filter to apply.

                - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

                - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                  Combine multiple filters using `and` or `or`.

                  - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                    Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                    - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                      - `Key string`

                        The key to compare against the value.

                      - `Type string`

                        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                        - `eq`: equals
                        - `ne`: not equal
                        - `gt`: greater than
                        - `gte`: greater than or equal
                        - `lt`: less than
                        - `lte`: less than or equal
                        - `in`: in
                        - `nin`: not in

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                      - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                        The value to compare against the attribute key; supports string, number, or boolean types.

                        - `string`

                        - `float64`

                        - `bool`

                        - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                          - `string`

                          - `float64`

                  - `Type string`

                    Type of operation: `and` or `or`.

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

              - `MaxNumResults int64`

                The maximum number of results to return. This number should be between 1 and 50 inclusive.

              - `RankingOptions BetaFileSearchToolRankingOptions`

                Ranking options for search.

                - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                  Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                  - `EmbeddingWeight float64`

                    The weight of the embedding in the reciprocal ranking fusion.

                  - `TextWeight float64`

                    The weight of the text in the reciprocal ranking fusion.

                - `Ranker string`

                  The ranker to use for the file search.

                  - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                  - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                - `ScoreThreshold float64`

                  The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `Type Computer`

                The type of the computer tool. Always `computer`.

                - `const ComputerComputer Computer = "computer"`

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `DisplayHeight int64`

                The height of the computer display.

              - `DisplayWidth int64`

                The width of the computer display.

              - `Environment BetaComputerUsePreviewToolEnvironment`

                The type of computer environment to control.

                - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

              - `Type ComputerUsePreview`

                The type of the computer use tool. Always `computer_use_preview`.

                - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchToolType`

                The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

              - `Filters BetaWebSearchToolFilters`

                Filters for the search.

                - `AllowedDomains []string`

                  Allowed domains for the search. If not provided, all domains are allowed.
                  Subdomains of the provided domains are allowed as well.

                  Example: `["pubmed.ncbi.nlm.nih.gov"]`

              - `SearchContextSize BetaWebSearchToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchToolUserLocation`

                The approximate location of the user.

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                - `Type string`

                  The type of location approximation. Always `approximate`.

                  - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `ServerLabel string`

                A label for this MCP server, used to identify it in tool calls.

              - `Type Mcp`

                The type of the MCP tool. Always `mcp`.

                - `const McpMcp Mcp = "mcp"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

              - `AllowedTools BetaToolMcpAllowedToolsUnion`

                List of allowed tool names or a filter object.

                - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                  A string array of allowed tool names

                - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `Authorization string`

                An OAuth access token that can be used with a remote MCP server, either
                with a custom MCP server URL or a service connector. Your application
                must handle the OAuth authorization flow and provide the token here.

              - `ConnectorID string`

                Identifier for service connectors, like those available in ChatGPT. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                Currently supported `connector_id` values are:

                - Dropbox: `connector_dropbox`
                - Gmail: `connector_gmail`
                - Google Calendar: `connector_googlecalendar`
                - Google Drive: `connector_googledrive`
                - Microsoft Teams: `connector_microsoftteams`
                - Outlook Calendar: `connector_outlookcalendar`
                - Outlook Email: `connector_outlookemail`
                - SharePoint: `connector_sharepoint`

                - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

              - `DeferLoading bool`

                Whether this MCP tool is deferred and discovered via tool search.

              - `Headers map[string, string]`

                Optional HTTP headers to send to the MCP server. Use for authentication
                or other purposes.

              - `RequireApproval BetaToolMcpRequireApprovalUnion`

                Specify which of the MCP server's tools require approval.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                  Specify which of the MCP server's tools require approval. Can be
                  `always`, `never`, or a filter object associated with tools
                  that require approval.

                  - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                  - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                  Specify a single approval policy for all tools. One of `always` or
                  `never`. When set to `always`, all tools will require approval. When
                  set to `never`, all tools will not require approval.

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

              - `ServerDescription string`

                Optional description of the MCP server, used to provide more context.

              - `ServerURL string`

                The URL for the MCP server. One of `server_url`, `connector_id`, or
                `tunnel_id` must be provided.

              - `TunnelID string`

                The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided.

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

              - `Container BetaToolCodeInterpreterContainerUnion`

                The code interpreter container. Can be a container ID or an object that
                specifies uploaded file IDs to make available to your code, along with an
                optional `memory_limit` setting.

                - `string`

                - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                  Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                  - `Type Auto`

                    Always `auto`.

                    - `const AutoAuto Auto = "auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit string`

                    The memory limit for the code interpreter container.

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `Type Disabled`

                        Disable outbound network access. Always `disabled`.

                        - `const DisabledDisabled Disabled = "disabled"`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                      - `AllowedDomains []string`

                        A list of allowed domains when type is `allowlist`.

                      - `Type Allowlist`

                        Allow outbound network access only to specified domains. Always `allowlist`.

                        - `const AllowlistAllowlist Allowlist = "allowlist"`

                      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                        Optional domain-scoped secrets for allowlisted domains.

                        - `Domain string`

                          The domain associated with the secret.

                        - `Name string`

                          The name of the secret to inject for the domain.

                        - `Value string`

                          The secret value to inject for the domain.

              - `Type CodeInterpreter`

                The type of the code interpreter tool. Always `code_interpreter`.

                - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

            - `type BetaToolProgrammaticToolCalling struct{…}`

              - `Type ProgrammaticToolCalling`

                The type of the tool. Always `programmatic_tool_calling`.

                - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

              - `Type ImageGeneration`

                The type of the image generation tool. Always `image_generation`.

                - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

              - `Action string`

                Whether to generate a new image or edit an existing image. Default: `auto`.

                - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

              - `Background string`

                Allows to set transparency for the background of the generated image(s).
                This parameter is only supported for GPT image models that support
                transparent backgrounds. Must be one of `transparent`, `opaque`, or
                `auto` (default value). When `auto` is used, the model will
                automatically determine the best background for the image.

                `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                transparent backgrounds. Requests with `background` set to
                `transparent` will return an error for these models; use `opaque` or
                `auto` instead.

                If `transparent`, the output format needs to support transparency,
                so it should be set to either `png` (default value) or `webp`.

                - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

              - `InputFidelity string`

                Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

              - `InputImageMask BetaToolImageGenerationInputImageMask`

                Optional mask for inpainting. Contains `image_url`
                (string, optional) and `file_id` (string, optional).

                - `FileID string`

                  File ID for the mask image.

                - `ImageURL string`

                  Base64-encoded mask image.

              - `Model string`

                The image generation model to use. Default: `gpt-image-1`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                  - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                  - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                  - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                  - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                  - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

              - `Moderation string`

                Moderation level for the generated image. Default: `auto`.

                - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

              - `OutputCompression int64`

                Compression level for the output image. Default: 100.

              - `OutputFormat string`

                The output format of the generated image. One of `png`, `webp`, or
                `jpeg`. Default: `png`.

                - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

              - `PartialImages int64`

                Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              - `Quality string`

                The quality of the generated image. One of `low`, `medium`, `high`,
                or `auto`. Default: `auto`.

                - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

              - `Size string`

                The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                  - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                  - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                  - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

              - `Type LocalShell`

                The type of the local shell tool. Always `local_shell`.

                - `const LocalShellLocalShell LocalShell = "local_shell"`

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

              - `Type Shell`

                The type of the shell tool. Always `shell`.

                - `const ShellShell Shell = "shell"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

              - `Environment BetaFunctionShellToolEnvironmentUnion`

                - `type BetaContainerAuto struct{…}`

                  - `Type ContainerAuto`

                    Automatically creates a container for this request

                    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit BetaContainerAutoMemoryLimit`

                    The memory limit for the container.

                    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `Skills []BetaContainerAutoSkillUnion`

                    An optional list of skills referenced by id or inline data.

                    - `type BetaSkillReference struct{…}`

                      - `SkillID string`

                        The ID of the referenced skill.

                      - `Type SkillReference`

                        References a skill created with the /v1/skills endpoint.

                        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                      - `Version string`

                        Optional skill version. Use a positive integer or 'latest'. Omit for default.

                    - `type BetaInlineSkill struct{…}`

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Source BetaInlineSkillSource`

                        Inline skill payload

                        - `Data string`

                          Base64-encoded skill zip bundle.

                        - `MediaType ApplicationZip`

                          The media type of the inline skill payload. Must be `application/zip`.

                          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                        - `Type Base64`

                          The type of the inline skill source. Must be `base64`.

                          - `const Base64Base64 Base64 = "base64"`

                      - `Type Inline`

                        Defines an inline skill for this request.

                        - `const InlineInline Inline = "inline"`

                - `type BetaLocalEnvironment struct{…}`

                  - `Type Local`

                    Use a local computer environment.

                    - `const LocalLocal Local = "local"`

                  - `Skills []BetaLocalSkill`

                    An optional list of skills.

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Path string`

                      The path to the directory containing the skill.

                - `type BetaContainerReference struct{…}`

                  - `ContainerID string`

                    The ID of the referenced container.

                  - `Type ContainerReference`

                    References a container created with the /v1/containers endpoint

                    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Name string`

                The name of the custom tool, used to identify it in tool calls.

              - `Type Custom`

                The type of the custom tool. Always `custom`.

                - `const CustomCustom Custom = "custom"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this tool should be deferred and discovered via tool search.

              - `Description string`

                Optional description of the custom tool, used to provide more context.

              - `Format BetaCustomToolFormatUnion`

                The input format for the custom tool. Default is unconstrained text.

                - `type BetaCustomToolFormatText struct{…}`

                  Unconstrained free-form text.

                  - `Type Text`

                    Unconstrained text format. Always `text`.

                    - `const TextText Text = "text"`

                - `type BetaCustomToolFormatGrammar struct{…}`

                  A grammar defined by the user.

                  - `Definition string`

                    The grammar definition.

                  - `Syntax string`

                    The syntax of the grammar definition. One of `lark` or `regex`.

                    - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                    - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                  - `Type Grammar`

                    Grammar format. Always `grammar`.

                    - `const GrammarGrammar Grammar = "grammar"`

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

              - `Description string`

                A description of the namespace shown to the model.

              - `Name string`

                The namespace name used in tool calls (for example, `crm`).

              - `Tools []BetaNamespaceToolToolUnion`

                The function/custom tools available inside this namespace.

                - `type BetaNamespaceToolToolFunction struct{…}`

                  - `Name string`

                  - `Type Function`

                    - `const FunctionFunction Function = "function"`

                  - `AllowedCallers []string`

                    The tool invocation context(s).

                    - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                    - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                  - `DeferLoading bool`

                    Whether this function should be deferred and discovered via tool search.

                  - `Description string`

                  - `OutputSchema map[string, any]`

                    A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                  - `Parameters any`

                  - `Strict bool`

                    Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                - `type BetaCustomTool struct{…}`

                  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Type Namespace`

                The type of the tool. Always `namespace`.

                - `const NamespaceNamespace Namespace = "namespace"`

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

              - `Type ToolSearch`

                The type of the tool. Always `tool_search`.

                - `const ToolSearchToolSearch ToolSearch = "tool_search"`

              - `Description string`

                Description shown to the model for a client-executed tool search tool.

              - `Execution BetaToolSearchToolExecution`

                Whether tool search is executed by the server or by the client.

                - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

              - `Parameters any`

                Parameter schema for a client-executed tool search tool.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchPreviewToolType`

                The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

              - `SearchContentTypes []string`

                - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

              - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchPreviewToolUserLocation`

                The user's location.

                - `Type Approximate`

                  The type of location approximation. Always `approximate`.

                  - `const ApproximateApproximate Approximate = "approximate"`

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

              - `Type ApplyPatch`

                The type of the tool. Always `apply_patch`.

                - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

          - `Type ToolSearchOutput`

            The item type. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `ID string`

            The unique ID of this tool search output.

          - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

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

          - `Execution BetaResponseToolSearchOutputItemParamExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

            - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemParamStatus`

            The status of the tool search output.

            - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

        - `type BetaResponseInputItemAdditionalTools struct{…}`

          - `Role Developer`

            The role that provided the additional tools. Only `developer` is supported.

            - `const DeveloperDeveloper Developer = "developer"`

          - `Tools []BetaToolUnion`

            A list of additional tools made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The item type. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `ID string`

            The unique ID of this additional tools item.

          - `Agent BetaResponseInputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

          - `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`.

              - `const SummaryTextSummaryText SummaryText = "summary_text"`

          - `Type Reasoning`

            The type of the object. Always `reasoning`.

            - `const ReasoningReasoning Reasoning = "reasoning"`

          - `Agent BetaResponseReasoningItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Content []BetaResponseReasoningItemContent`

            Reasoning text content.

            - `Text string`

              The reasoning text from the model.

            - `Type ReasoningText`

              The type of the reasoning text. Always `reasoning_text`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `EncryptedContent string`

            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.

          - `Status BetaResponseReasoningItemStatus`

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

            - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

            - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

            - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

        - `type BetaResponseCompactionItemParamResp struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `EncryptedContent string`

            The encrypted content of the compaction summary.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

            The ID of the compaction item.

          - `Agent BetaResponseCompactionItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseInputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

          - `ID string`

            The unique ID of the code interpreter tool call.

          - `Code string`

            The code to run, or null if not available.

          - `ContainerID string`

            The ID of the container used to run the code.

          - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

            The outputs generated by the code interpreter, such as logs or images.
            Can be null if no outputs are available.

            - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

              The logs output from the code interpreter.

              - `Logs string`

                The logs output from the code interpreter.

              - `Type Logs`

                The type of the output. Always `logs`.

                - `const LogsLogs Logs = "logs"`

            - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

              The image output from the code interpreter.

              - `Type Image`

                The type of the output. Always `image`.

                - `const ImageImage Image = "image"`

              - `URL string`

                The URL of the image output from the code interpreter.

          - `Status BetaResponseCodeInterpreterToolCallStatus`

            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

            - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

            - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

            - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

            - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

            - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

          - `Type CodeInterpreterCall`

            The type of the code interpreter tool call. Always `code_interpreter_call`.

            - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

          - `Agent BetaResponseCodeInterpreterToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCall struct{…}`

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

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseInputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemShellCall struct{…}`

          A tool representing a request to execute one or more shell commands.

          - `Action BetaResponseInputItemShellCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

              Ordered shell commands for the execution environment to run.

            - `MaxOutputLength int64`

              Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

            - `TimeoutMs int64`

              Maximum wall-clock time in milliseconds to allow the shell commands to run.

          - `CallID string`

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

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

            The environment to execute the shell commands in.

            - `type BetaLocalEnvironment struct{…}`

            - `type BetaContainerReference struct{…}`

          - `Status string`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

            - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

        - `type BetaResponseInputItemShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

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

          - `Output []BetaResponseFunctionShellCallOutputContent`

            Captured chunks of stdout and stderr output, along with their associated outcomes.

            - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

              The exit or timeout outcome associated with this shell call.

              - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  The exit code returned by the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              Captured stderr output for the shell call.

            - `Stdout string`

              Captured stdout output for the shell call.

          - `Type ShellCallOutput`

            The type of the item. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

            The unique ID of the shell tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `MaxOutputLength int64`

            The maximum number of UTF-8 characters captured for this shell call's combined output.

          - `Status string`

            The status of the shell call output.

            - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemApplyPatchCall struct{…}`

          A tool call representing a request to create, delete, or update files using diff patches.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

            The specific create, delete, or update instruction for the apply_patch tool call.

            - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply when creating the file.

              - `Path string`

                Path of the file to create relative to the workspace root.

              - `Type CreateFile`

                The operation type. Always `create_file`.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

                Path of the file to delete relative to the workspace root.

              - `Type DeleteFile`

                The operation type. Always `delete_file`.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply to the existing file.

              - `Path string`

                Path of the file to update relative to the workspace root.

              - `Type UpdateFile`

                The operation type. Always `update_file`.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status string`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

            - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status string`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

            - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Output string`

            Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

        - `type BetaResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseInputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseInputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

            The unique ID of the approval response

          - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `type BetaResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseInputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

            - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

            - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

        - `type BetaResponseCustomToolCallOutput struct{…}`

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

          - `CallID string`

            The call ID, used to map this custom tool call output to a custom tool call.

          - `Output BetaResponseCustomToolCallOutputOutputUnion`

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

            - `string`

            - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              Text, image, or file output of the custom tool call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            The type of the custom tool call output. Always `custom_tool_call_output`.

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

            The unique ID of the custom tool call output in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

          - `CallID string`

            An identifier used to map this custom tool call to a tool call output.

          - `Input string`

            The input for the custom tool call generated by the model.

          - `Name string`

            The name of the custom tool being called.

          - `Type CustomToolCall`

            The type of the custom tool call. Always `custom_tool_call`.

            - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

          - `ID string`

            The unique ID of the custom tool call in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the custom tool being called.

        - `type BetaResponseInputItemCompactionTrigger struct{…}`

          Compacts the current context. Must be the final input item.

          - `Type CompactionTrigger`

            The type of the item. Always `compaction_trigger`.

            - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

          - `Agent BetaResponseInputItemCompactionTriggerAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

            The ID of the item to reference.

          - `Agent BetaResponseInputItemItemReferenceAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Type string`

            The type of item to reference. Always `item_reference`.

            - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

        - `type BetaResponseInputItemProgram struct{…}`

          - `ID string`

            The unique ID of this program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The item type. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseInputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of this program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output.

            - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

            - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The item type. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseInputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

    - `Metadata map[string, string]`

      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.

    - `Model BetaResponseModel`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `type BetaResponseModel string`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

        - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

        - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

        - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

        - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

        - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

        - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

        - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

        - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

        - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

        - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

        - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

        - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

        - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

        - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

        - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

        - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

        - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

        - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

        - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

        - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

        - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

        - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

        - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

        - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

        - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

        - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

        - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

        - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

        - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

        - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

        - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

        - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

        - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

        - `const BetaResponseModelO3 BetaResponseModel = "o3"`

        - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

        - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

        - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

        - `const BetaResponseModelO1 BetaResponseModel = "o1"`

        - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

        - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

        - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

        - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

        - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

        - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

        - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

        - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

        - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

        - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

        - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

        - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

        - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

        - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

        - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

        - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

        - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

        - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

        - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

        - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

        - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

        - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

        - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

        - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

        - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

        - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

        - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

        - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

        - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

        - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

        - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

        - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

        - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

        - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

        - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

        - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

        - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

        - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

        - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

        - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

        - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

        - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

        - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

        - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

        - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

        - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

        - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

        - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

        - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

        - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

        - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

      - `string`

    - `Object Response`

      The object type of this resource - always set to `response`.

      - `const ResponseResponse Response = "response"`

    - `Output []BetaResponseOutputItemUnion`

      An array of content items generated by the model.

      - The length and order of items in the `output` array is dependent
        on the model's response.
      - Rather than accessing the first item in the `output` array and
        assuming it's an `assistant` message with the content generated by
        the model, you might consider using the `output_text` property where
        supported in SDKs.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

        - `ID string`

          The unique ID of the function call tool output.

        - `CallID string`

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

        - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

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

          - `string`

          - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

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

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Status BetaResponseFunctionToolCallOutputItemStatus`

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

          - `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`.

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `Agent BetaResponseFunctionToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `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.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

          - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

            A text content.

            - `Text string`

            - `Type Text`

              - `const TextText Text = "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`.

              - `const SummaryTextSummaryText SummaryText = "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`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `type BetaResponseOutputRefusal struct{…}`

            A refusal from the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `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`.

              - `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.

            - `Type ComputerScreenshot`

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

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

          - `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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The type of the item. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `Agent BetaResponseOutputItemAgentMessageAgent`

          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.

          - `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`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `Agent BetaResponseOutputItemMultiAgentCallAgent`

          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.

          - `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.

        - `Output []BetaResponseOutputText`

          Text output returned by the multi-agent action.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

          - `Logprobs []BetaResponseOutputTextLogprob`

        - `Type MultiAgentCallOutput`

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

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `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.

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          A computer screenshot image used with the computer use tool.

        - `Status BetaResponseComputerToolCallOutputItemStatus`

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

          - `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`.

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

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

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseComputerToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseOutputItemProgram struct{…}`

        - `ID string`

          The unique ID of the program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The type of the item. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseOutputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of the program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output item.

          - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

          - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The type of the item. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseOutputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseToolSearchCall struct{…}`

        - `ID string`

          The unique ID of the tool search call item.

        - `Arguments any`

          Arguments used for the tool search call.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchCallExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

          - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

        - `Status BetaResponseToolSearchCallStatus`

          The status of the tool search call item that was recorded.

          - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

          - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

          - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

        - `Type ToolSearchCall`

          The type of the item. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `Agent BetaResponseToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseToolSearchOutputItem struct{…}`

        - `ID string`

          The unique ID of the tool search output item.

        - `CallID string`

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

        - `Execution BetaResponseToolSearchOutputItemExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

          - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemStatus`

          The status of the tool search output item that was recorded.

          - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by tool search.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ToolSearchOutput`

          The type of the item. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `Agent BetaResponseToolSearchOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemAdditionalTools struct{…}`

        - `ID string`

          The unique ID of the additional tools item.

        - `Role string`

          The role that provided the additional tools.

          - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

          - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

          - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

          - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

          - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

          - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

        - `Tools []BetaToolUnion`

          The additional tool definitions made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The type of the item. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `Agent BetaResponseOutputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCompactionItem struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `ID string`

          The unique ID of the compaction item.

        - `EncryptedContent string`

          The encrypted content that was produced by compaction.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `Agent BetaResponseCompactionItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseOutputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseOutputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseOutputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseOutputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionShellToolCall struct{…}`

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

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Action BetaResponseFunctionShellToolCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

          - `MaxOutputLength int64`

            Optional maximum number of characters to return from each command.

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the commands.

        - `CallID string`

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

        - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

          Represents the use of a local environment to perform shell actions.

          - `type BetaResponseLocalEnvironment struct{…}`

            Represents the use of a local environment to perform shell actions.

            - `Type Local`

              The environment type. Always `local`.

              - `const LocalLocal Local = "local"`

          - `type BetaResponseContainerReference struct{…}`

            Represents a container created with /v1/containers.

            - `ContainerID string`

            - `Type ContainerReference`

              The environment type. Always `container_reference`.

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `Status BetaResponseFunctionShellToolCallStatus`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `Agent BetaResponseFunctionShellToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

        - `ID string`

          The unique ID of the shell call output. Populated when this item is returned via API.

        - `CallID string`

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

        - `MaxOutputLength int64`

          The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

        - `Output []BetaResponseFunctionShellToolCallOutputOutput`

          An array of shell call output contents

          - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

            Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                Exit code from the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            The standard error output that was captured.

          - `Stdout string`

            The standard output that was captured.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `Status BetaResponseFunctionShellToolCallOutputStatus`

          The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

        - `Type ShellCallOutput`

          The type of the shell call output. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `Agent BetaResponseFunctionShellToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseApplyPatchToolCall struct{…}`

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

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseApplyPatchToolCallOperationUnion`

          One of the create_file, delete_file, or update_file operations applied via apply_patch.

          - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

            Instruction describing how to create a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to create.

            - `Type CreateFile`

              Create a new file with the provided diff.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

            Instruction describing how to delete a file via the apply_patch tool.

            - `Path string`

              Path of the file to delete.

            - `Type DeleteFile`

              Delete the specified file.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

            Instruction describing how to update a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to update.

            - `Type UpdateFile`

              Update an existing file with the provided diff.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status BetaResponseApplyPatchToolCallStatus`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

          - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `Agent BetaResponseApplyPatchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status BetaResponseApplyPatchToolCallOutputStatus`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

          - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `Agent BetaResponseApplyPatchToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call output.

        - `Output string`

          Optional textual output returned by the apply patch tool.

      - `type BetaResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseOutputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

          - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

          - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

      - `type BetaResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseOutputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseOutputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ID string`

          The unique ID of the approval response

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `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.

        - `ID string`

          The unique ID of the custom tool call output item.

        - `Status string`

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

          - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

          - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

          - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

    - `ParallelToolCalls bool`

      Whether to allow the model to run tool calls in parallel.

    - `Temperature float64`

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
      We generally recommend altering this or `top_p` but not both.

    - `ToolChoice BetaResponseToolChoiceUnion`

      How the model should select which tool (or tools) to use when generating
      a response. See the `tools` parameter to see how to specify which tools
      the model can call.

      - `type BetaToolChoiceOptions string`

        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a message.

        `auto` means the model can pick between generating a message or calling one or
        more tools.

        `required` means the model must call one or more tools.

        - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

        - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

        - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

      - `type BetaToolChoiceAllowed struct{…}`

        Constrains the tools available to the model to a pre-defined set.

        - `Mode BetaToolChoiceAllowedMode`

          Constrains the tools available to the model to a pre-defined set.

          `auto` allows the model to pick from among the allowed tools and generate a
          message.

          `required` requires the model to call one or more of the allowed tools.

          - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

          - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

        - `Tools []map[string, any]`

          A list of tool definitions that the model should be allowed to call.

          For the Responses API, the list of tool definitions might look like:

          ```json
          [
            { "type": "function", "name": "get_weather" },
            { "type": "mcp", "server_label": "deepwiki" },
            { "type": "image_generation" }
          ]
          ```

        - `Type AllowedTools`

          Allowed tool configuration type. Always `allowed_tools`.

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type BetaToolChoiceTypes struct{…}`

        Indicates that the model should use a built-in tool to generate a response.
        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

        - `Type BetaToolChoiceTypesType`

          The type of hosted tool the model should to use. Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).

          Allowed values are:

          - `file_search`
          - `web_search_preview`
          - `computer`
          - `computer_use_preview`
          - `computer_use`
          - `code_interpreter`
          - `image_generation`

          - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

          - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

          - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

          - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

          - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

      - `type BetaToolChoiceFunction struct{…}`

        Use this option to force the model to call a specific function.

        - `Name string`

          The name of the function to call.

        - `Type Function`

          For function calling, the type is always `function`.

          - `const FunctionFunction Function = "function"`

      - `type BetaToolChoiceMcp struct{…}`

        Use this option to force the model to call a specific tool on a remote MCP server.

        - `ServerLabel string`

          The label of the MCP server to use.

        - `Type Mcp`

          For MCP tools, the type is always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

          The name of the tool to call on the server.

      - `type BetaToolChoiceCustom struct{…}`

        Use this option to force the model to call a specific custom tool.

        - `Name string`

          The name of the custom tool to call.

        - `Type Custom`

          For custom tool calling, the type is always `custom`.

          - `const CustomCustom Custom = "custom"`

      - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

        - `Type ProgrammaticToolCalling`

          The tool to call. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolChoiceApplyPatch struct{…}`

        Forces the model to call the apply_patch tool when executing a tool call.

        - `Type ApplyPatch`

          The tool to call. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type BetaToolChoiceShell struct{…}`

        Forces the model to call the shell tool when a tool call is required.

        - `Type Shell`

          The tool to call. Always `shell`.

          - `const ShellShell Shell = "shell"`

    - `Tools []BetaToolUnion`

      An array of tools the model may call while generating a response. You
      can specify which tool to use by setting the `tool_choice` parameter.

      We support the following categories of tools:

      - **Built-in tools**: Tools that are provided by OpenAI that extend the
        model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
        or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).
      - **MCP Tools**: Integrations with third-party systems via custom MCP servers
        or predefined connectors such as Google Drive and SharePoint. Learn more about
        [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
      - **Function calls (custom tools)**: Functions that are defined by you,
        enabling the model to call your own code with strongly typed arguments
        and outputs. Learn more about
        [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
        custom tools to call your own code.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `TopP float64`

      An alternative to sampling with temperature, called nucleus sampling,
      where the model considers the results of the tokens with top_p probability
      mass. So 0.1 means only the tokens comprising the top 10% probability mass
      are considered.

      We generally recommend altering this or `temperature` but not both.

    - `Background bool`

      Whether to run the model response in the background.
      [Learn more](https://platform.openai.com/docs/guides/background).

    - `CompletedAt float64`

      Unix timestamp (in seconds) of when this Response was completed.
      Only present when the status is `completed`.

    - `Conversation BetaResponseConversation`

      The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

      - `ID string`

        The unique ID of the conversation that this response was associated with.

    - `MaxOutputTokens int64`

      An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

    - `MaxToolCalls int64`

      The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

    - `Moderation BetaResponseModeration`

      Moderation results for the response input and output, if moderated completions were requested.

      - `Input BetaResponseModerationInputUnion`

        Moderation for the response input.

        - `type BetaResponseModerationInputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationInputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

      - `Output BetaResponseModerationOutputUnion`

        Moderation for the response output.

        - `type BetaResponseModerationOutputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationOutputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

    - `PreviousResponseID string`

      The unique ID of the previous response to the model. Use this to
      create multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

    - `Prompt BetaResponsePrompt`

      Reference to a prompt template and its variables.
      [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

      - `ID string`

        The unique identifier of the prompt template to use.

      - `Variables map[string, BetaResponsePromptVariableUnion]`

        Optional map of values to substitute in for variables in your
        prompt. The substitution values can either be strings, or other
        Response input types like images or files.

        - `string`

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

        Optional version of the prompt template.

    - `PromptCacheKey string`

      Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

    - `PromptCacheOptions BetaResponsePromptCacheOptions`

      The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

      - `Mode string`

        Whether implicit prompt-cache breakpoints were enabled.

        - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

        - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

      - `Ttl string`

        The minimum lifetime applied to each cache breakpoint.

        - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

    - `PromptCacheRetention BetaResponsePromptCacheRetention`

      Deprecated. Use `prompt_cache_options.ttl` instead.

      The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
      This field expresses a maximum retention policy, while
      `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
      fields are independent and do not interact.
      For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

      For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

      - Organizations without ZDR enabled default to `24h`.
      - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

      - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

      - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

    - `Reasoning BetaResponseReasoning`

      **gpt-5 and o-series models only**

      Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

      - `Context string`

        Controls which reasoning items are rendered back to the model on later turns.
        If omitted or set to `auto`, the model determines the context mode. The
        `gpt-5.6` model family defaults to `all_turns`; earlier models default to
        `current_turn`.

        When returned on a response, this is the effective reasoning context mode
        used for the response.

        - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

        - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

        - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

      - `Effort string`

        Constrains effort on reasoning for reasoning models. Currently supported
        values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
        Reducing reasoning effort can result in faster responses and fewer tokens
        used on reasoning in a response. Not all reasoning models support every
        value. See the
        [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
        for model-specific support.

        - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

        - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

        - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

        - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

        - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

        - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

        - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

      - `GenerateSummary string`

        **Deprecated:** use `summary` instead.

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

        - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

        - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

      - `Mode string`

        Controls the reasoning execution mode for the request.

        When returned on a response, this is the effective execution mode.

        - `string`

        - `string`

          - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

          - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

      - `Summary string`

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

        - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

        - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

        - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

      A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
      The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `ServiceTier BetaResponseServiceTier`

      Specifies the processing type used for serving the request.

      - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
      - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
      - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
      - When not set, the default behavior is 'auto'.

      When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

      - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

      - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

      - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

      - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

      - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

    - `Status BetaResponseStatus`

      The status of the response generation. One of `completed`, `failed`,
      `in_progress`, `cancelled`, `queued`, or `incomplete`.

      - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

      - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

      - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

      - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

      - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

      - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

    - `Text BetaResponseTextConfig`

      Configuration options for a text response from the model. Can be plain
      text or structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

      - `Format BetaResponseFormatTextConfigUnion`

        An object specifying the format that the model must output.

        Configuring `{ "type": "json_schema" }` enables Structured Outputs,
        which ensures the model will match your supplied JSON schema. Learn more in the
        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

        The default format is `{ "type": "text" }` with no additional options.

        **Not recommended for gpt-4o and newer models:**

        Setting to `{ "type": "json_object" }` enables the older JSON mode, which
        ensures the message the model generates is valid JSON. Using `json_schema`
        is preferred for models that support it.

        - `type BetaResponseFormatTextConfigText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            The type of response format being defined. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

          JSON Schema response format. Used to generate structured JSON responses.
          Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

          - `Name string`

            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.

          - `Schema map[string, any]`

            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).

          - `Type JSONSchema`

            The type of response format being defined. Always `json_schema`.

            - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

          - `Description string`

            A description of what the response format is for, used by the model to
            determine how to respond in the format.

          - `Strict bool`

            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).

        - `type BetaResponseFormatTextConfigJSONObject struct{…}`

          JSON object response format. An older method of generating JSON responses.
          Using `json_schema` is recommended for models that support it. Note that the
          model will not generate JSON without a system or user message instructing it
          to do so.

          - `Type JSONObject`

            The type of response format being defined. Always `json_object`.

            - `const JSONObjectJSONObject JSONObject = "json_object"`

      - `Verbosity BetaResponseTextConfigVerbosity`

        Constrains the verbosity of the model's response. Lower values will result in
        more concise responses, while higher values will result in more verbose responses.
        Currently supported values are `low`, `medium`, and `high`. The default is
        `medium`.

        - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

        - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

        - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

    - `TopLogprobs int64`

      An integer between 0 and 20 specifying the maximum number of most likely
      tokens to return at each token position, each with an associated log
      probability. In some cases, the number of returned tokens may be fewer than
      requested.

    - `Truncation BetaResponseTruncation`

      The truncation strategy to use for the model response.

      - `auto`: If the input to this Response exceeds
        the model's context window size, the model will truncate the
        response to fit the context window by dropping items from the beginning of the conversation.
      - `disabled` (default): If the input size will exceed the context window
        size for a model, the request will fail with a 400 error.

      - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

      - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

    - `Usage BetaResponseUsage`

      Represents token usage details including input tokens, output tokens,
      a breakdown of output tokens, and the total tokens used.

      - `InputTokens int64`

        The number of input tokens.

      - `InputTokensDetails BetaResponseUsageInputTokensDetails`

        A detailed breakdown of the input tokens.

        - `CacheWriteTokens int64`

          The number of input tokens that were written to the cache.

        - `CachedTokens int64`

          The number of tokens that were retrieved from the cache.
          [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

      - `OutputTokens int64`

        The number of output tokens.

      - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

        A detailed breakdown of the output tokens.

        - `ReasoningTokens int64`

          The number of reasoning tokens.

      - `TotalTokens int64`

        The total number of tokens used.

    - `User string`

      This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
      A stable identifier for your end-users.
      Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseInProgress`

    The type of the event. Always `response.in_progress`.

    - `const ResponseInProgressResponseInProgress ResponseInProgress = "response.in_progress"`

  - `Agent BetaResponseInProgressEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Includable

- `type BetaResponseIncludable string`

  Specify additional output data to include in the model response. Currently supported values are:

  - `web_search_call.results`: Include the search results of the web search tool call.
  - `web_search_call.action.sources`: Include the sources of the web search tool call.
  - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.
  - `computer_call_output.output.image_url`: Include image urls from the computer call output.
  - `file_search_call.results`: Include the search results of the file search tool call.
  - `message.input_image.image_url`: Include image urls from the input message.
  - `message.output_text.logprobs`: Include logprobs with assistant messages.
  - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).

  - `const BetaResponseIncludableFileSearchCallResults BetaResponseIncludable = "file_search_call.results"`

  - `const BetaResponseIncludableWebSearchCallResults BetaResponseIncludable = "web_search_call.results"`

  - `const BetaResponseIncludableWebSearchCallActionSources BetaResponseIncludable = "web_search_call.action.sources"`

  - `const BetaResponseIncludableMessageInputImageImageURL BetaResponseIncludable = "message.input_image.image_url"`

  - `const BetaResponseIncludableComputerCallOutputOutputImageURL BetaResponseIncludable = "computer_call_output.output.image_url"`

  - `const BetaResponseIncludableCodeInterpreterCallOutputs BetaResponseIncludable = "code_interpreter_call.outputs"`

  - `const BetaResponseIncludableReasoningEncryptedContent BetaResponseIncludable = "reasoning.encrypted_content"`

  - `const BetaResponseIncludableMessageOutputTextLogprobs BetaResponseIncludable = "message.output_text.logprobs"`

### Beta Response Incomplete Event

- `type BetaResponseIncompleteEvent struct{…}`

  An event that is emitted when a response finishes as incomplete.

  - `Response BetaResponse`

    The response that was incomplete.

    - `ID string`

      Unique identifier for this Response.

    - `CreatedAt float64`

      Unix timestamp (in seconds) of when this Response was created.

    - `Error BetaResponseError`

      An error object returned when the model fails to generate a Response.

      - `Code BetaResponseErrorCode`

        The error code for the response.

        - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

        - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

        - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

        - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

        - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

        - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

        - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

        - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

        - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

        - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

        - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

        - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

        - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

        - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

        - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

        - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

        - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

        - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

        - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

        - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

      - `Message string`

        A human-readable description of the error.

    - `IncompleteDetails BetaResponseIncompleteDetails`

      Details about why the response is incomplete.

      - `Reason string`

        The reason why the response is incomplete.

        - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

        - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

    - `Instructions BetaResponseInstructionsUnion`

      A system (or developer) message inserted into the model's context.

      When using along with `previous_response_id`, the instructions from a previous
      response will not be carried over to the next response. This makes it simple
      to swap out system (or developer) messages in new responses.

      - `string`

      - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

        A list of one or many input items to the model, containing
        different content types.

        - `type BetaEasyInputMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role. Messages with the
          `assistant` role are presumed to have been generated by the model in previous
          interactions.

          - `Content BetaEasyInputMessageContentUnion`

            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.

            - `string`

            - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

              A list of one or many input items to the model, containing different content
              types.

              - `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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail BetaResponseInputImageDetail`

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

                  - `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`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

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

                - `ImageURL string`

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

                - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileDetail`

                  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`.

                  - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                  - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                  - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                - `FileData string`

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

                - `FileID string`

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

                - `FileURL string`

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

                - `Filename string`

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

                - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Role BetaEasyInputMessageRole`

            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.

            - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

            - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

            - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

            - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

          - `Phase BetaEasyInputMessagePhase`

            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.

            - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

            - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

          - `Type BetaEasyInputMessageType`

            The type of the message input. Always `message`.

            - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

        - `type BetaResponseInputItemMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role.

          - `Content BetaResponseInputMessageContentList`

            A list of one or many input items to the model, containing different content
            types.

          - `Role string`

            The role of the message input. One of `user`, `system`, or `developer`.

            - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

            - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

            - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

          - `Agent BetaResponseInputItemMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

            - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

            - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

          - `Type string`

            The type of the message input. Always set to `message`.

            - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

        - `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.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

              - `Annotations []BetaResponseOutputTextAnnotationUnion`

                The annotations of the text output.

                - `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`.

                    - `const FileCitationFileCitation FileCitation = "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`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the web resource.

                - `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`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                    - `const FilePathFilePath FilePath = "file_path"`

              - `Text string`

                The text output from the model.

              - `Type OutputText`

                The type of the output text. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Logprobs []BetaResponseOutputTextLogprob`

                - `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`.

                - `const RefusalRefusal Refusal = "refusal"`

          - `Role Assistant`

            The role of the output message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `Status BetaResponseOutputMessageStatus`

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

            - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

            - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

            - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

          - `Type Message`

            The type of the output message. Always `message`.

            - `const MessageMessage Message = "message"`

          - `Agent BetaResponseOutputMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Phase BetaResponseOutputMessagePhase`

            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.

            - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

            - `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`.

            - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

          - `Agent BetaResponseFileSearchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Results []BetaResponseFileSearchToolCallResult`

            The results of the file search tool call.

            - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

              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.

              - `string`

              - `float64`

              - `bool`

            - `FileID string`

              The unique ID of the file.

            - `Filename string`

              The name of the file.

            - `Score float64`

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

            - `Text string`

              The text that was retrieved from the file.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

              The type of the pending safety check.

            - `Message string`

              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.

            - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

            - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

            - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

          - `Type BetaResponseComputerToolCallType`

            The type of the computer call. Always `computer_call`.

            - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

          - `Action BetaComputerActionUnion`

            A click action.

            - `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`.

                - `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`.

                - `const ClickClick Click = "click"`

              - `X int64`

                The x-coordinate where the click occurred.

              - `Y int64`

                The y-coordinate where the click occurred.

              - `Keys []string`

                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`.

                - `const DoubleClickDoubleClick DoubleClick = "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`.

                - `const DragDrag Drag = "drag"`

              - `Keys []string`

                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`.

                - `const KeypressKeypress Keypress = "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`.

                - `const MoveMove Move = "move"`

              - `X int64`

                The x-coordinate to move to.

              - `Y int64`

                The y-coordinate to move to.

              - `Keys []string`

                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`.

                - `const ScreenshotScreenshot Screenshot = "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`.

                - `const ScrollScroll Scroll = "scroll"`

              - `X int64`

                The x-coordinate where the scroll occurred.

              - `Y int64`

                The y-coordinate where the scroll occurred.

              - `Keys []string`

                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`.

                - `const TypeType Type = "type"`

            - `type BetaComputerActionWait struct{…}`

              A wait action.

              - `Type Wait`

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

                - `const WaitWait Wait = "wait"`

          - `Actions BetaComputerActionList`

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

            - `type BetaComputerActionClick struct{…}`

              A click action.

            - `type BetaComputerActionDoubleClick struct{…}`

              A double click action.

            - `type BetaComputerActionDrag struct{…}`

              A drag action.

            - `type BetaComputerActionKeypress struct{…}`

              A collection of keypresses the model would like to perform.

            - `type BetaComputerActionMove struct{…}`

              A mouse move action.

            - `type BetaComputerActionScreenshot struct{…}`

              A screenshot action.

            - `type BetaComputerActionScroll struct{…}`

              A scroll action.

            - `type BetaComputerActionType struct{…}`

              An action to type in text.

            - `type BetaComputerActionWait struct{…}`

              A wait action.

          - `Agent BetaResponseComputerToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

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

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            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`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

              The identifier of an uploaded file that contains the screenshot.

            - `ImageURL string`

              The URL of the screenshot image.

          - `Type ComputerCallOutput`

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

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

            The ID of the computer tool call output.

          - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

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

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseInputItemComputerCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

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

            - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

            - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

          - `ID string`

            The unique ID of the web search tool call.

          - `Action BetaResponseFunctionWebSearchActionUnion`

            An object describing the specific action taken in this web search call.
            Includes details on how the model used the web (search, open_page, find_in_page).

            - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

              Action type "search" - Performs a web search query.

              - `Type Search`

                The action type.

                - `const SearchSearch Search = "search"`

              - `Queries []string`

                The search queries.

              - `Query string`

                The search query.

              - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                The sources used in the search.

                - `Type URL`

                  The type of source. Always `url`.

                  - `const URLURL URL = "url"`

                - `URL string`

                  The URL of the source.

            - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

              Action type "open_page" - Opens a specific URL from search results.

              - `Type OpenPage`

                The action type.

                - `const OpenPageOpenPage OpenPage = "open_page"`

              - `URL string`

                The URL opened by the model.

            - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

              Action type "find_in_page": Searches for a pattern within a loaded page.

              - `Pattern string`

                The pattern or text to search for within the page.

              - `Type FindInPage`

                The action type.

                - `const FindInPageFindInPage FindInPage = "find_in_page"`

              - `URL string`

                The URL of the page searched for the pattern.

          - `Status BetaResponseFunctionWebSearchStatus`

            The status of the web search tool call.

            - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

            - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

            - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

            - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

          - `Type WebSearchCall`

            The type of the web search tool call. Always `web_search_call`.

            - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

          - `Agent BetaResponseFunctionWebSearchAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

            - `const FunctionCallFunctionCall FunctionCall = "function_call"`

          - `ID string`

            The unique ID of the function tool call.

          - `Agent BetaResponseFunctionToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

              - `CallerID string`

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

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the function to run.

          - `Status BetaResponseFunctionToolCallStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

            - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

        - `type BetaResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

            The unique ID of the function tool call generated by the model.

          - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

            Text, image, or file output of the function tool call.

            - `string`

            - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

              An array of content outputs (text, image, file) for the function tool call.

              - `type BetaResponseInputTextContent 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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  The type of the input item. Always `input_image`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail BetaResponseInputImageContentDetail`

                  The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                  - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                  - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                  - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                  - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `ImageURL string`

                  The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileContentDetail`

                  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`.

                  - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                  - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                  - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                - `FileData string`

                  The base64-encoded data of the file to be sent to the model.

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `FileURL string`

                  The URL of the file to be sent to the model.

                - `Filename string`

                  The name of the file to be sent to the model.

                - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Type FunctionCallOutput`

            The type of the function tool call output. Always `function_call_output`.

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

            The unique ID of the function tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemFunctionCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

            - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemAgentMessage struct{…}`

          A message routed between agents.

          - `Author string`

            The sending agent identity.

          - `Content []BetaResponseInputItemAgentMessageContentUnion`

            Plaintext, image, or encrypted content sent between agents.

            - `type BetaResponseInputTextContent struct{…}`

              A text input to the model.

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The item type. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `ID string`

            The unique ID of this agent message item.

          - `Agent BetaResponseInputItemAgentMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCall struct{…}`

          - `Action string`

            The multi-agent action that was executed.

            - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

          - `Arguments string`

            The action arguments as a JSON string.

          - `CallID string`

            The unique ID linking this call to its output.

          - `Type MultiAgentCall`

            The item type. Always `multi_agent_call`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `ID string`

            The unique ID of this multi-agent call.

          - `Agent BetaResponseInputItemMultiAgentCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

          - `Action string`

            The multi-agent action that produced this result.

            - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

          - `CallID string`

            The unique ID of the multi-agent call.

          - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

            Text output returned by the multi-agent action.

            - `Text string`

              The text content.

            - `Type OutputText`

              The content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

              Citations associated with the text content.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                - `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 citation type. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                - `EndIndex int64`

                  The index of the last character of the citation in the message.

                - `StartIndex int64`

                  The index of the first character of the citation in the message.

                - `Title string`

                  The title of the cited resource.

                - `Type URLCitation`

                  The citation type. Always `url_citation`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the cited resource.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                - `ContainerID string`

                  The ID of the container.

                - `EndIndex int64`

                  The index of the last character of the citation in the message.

                - `FileID string`

                  The ID of the container file.

                - `Filename string`

                  The filename of the container file cited.

                - `StartIndex int64`

                  The index of the first character of the citation in the message.

                - `Type ContainerFileCitation`

                  The citation type. Always `container_file_citation`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

          - `Type MultiAgentCallOutput`

            The item type. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `ID string`

            The unique ID of this multi-agent call output.

          - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemToolSearchCall struct{…}`

          - `Arguments any`

            The arguments supplied to the tool search call.

          - `Type ToolSearchCall`

            The item type. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `ID string`

            The unique ID of this tool search call.

          - `Agent BetaResponseInputItemToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution string`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

            - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

          - `Status string`

            The status of the tool search call.

            - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

            - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

            - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

        - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by the tool search output.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `Name string`

                The name of the function to call.

              - `Parameters map[string, any]`

                A JSON schema object describing the parameters of the function.

              - `Strict bool`

                Whether strict parameter validation is enforced for this function tool.

              - `Type Function`

                The type of the function tool. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function is deferred and loaded via tool search.

              - `Description string`

                A description of the function. Used by the model to determine whether or not to call the function.

              - `OutputSchema map[string, any]`

                A JSON schema object describing the JSON value encoded in string outputs for this function.

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `Type FileSearch`

                The type of the file search tool. Always `file_search`.

                - `const FileSearchFileSearch FileSearch = "file_search"`

              - `VectorStoreIDs []string`

                The IDs of the vector stores to search.

              - `Filters BetaFileSearchToolFiltersUnion`

                A filter to apply.

                - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

                - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                  Combine multiple filters using `and` or `or`.

                  - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                    Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                    - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                      - `Key string`

                        The key to compare against the value.

                      - `Type string`

                        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                        - `eq`: equals
                        - `ne`: not equal
                        - `gt`: greater than
                        - `gte`: greater than or equal
                        - `lt`: less than
                        - `lte`: less than or equal
                        - `in`: in
                        - `nin`: not in

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                      - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                        The value to compare against the attribute key; supports string, number, or boolean types.

                        - `string`

                        - `float64`

                        - `bool`

                        - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                          - `string`

                          - `float64`

                  - `Type string`

                    Type of operation: `and` or `or`.

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

              - `MaxNumResults int64`

                The maximum number of results to return. This number should be between 1 and 50 inclusive.

              - `RankingOptions BetaFileSearchToolRankingOptions`

                Ranking options for search.

                - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                  Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                  - `EmbeddingWeight float64`

                    The weight of the embedding in the reciprocal ranking fusion.

                  - `TextWeight float64`

                    The weight of the text in the reciprocal ranking fusion.

                - `Ranker string`

                  The ranker to use for the file search.

                  - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                  - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                - `ScoreThreshold float64`

                  The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `Type Computer`

                The type of the computer tool. Always `computer`.

                - `const ComputerComputer Computer = "computer"`

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `DisplayHeight int64`

                The height of the computer display.

              - `DisplayWidth int64`

                The width of the computer display.

              - `Environment BetaComputerUsePreviewToolEnvironment`

                The type of computer environment to control.

                - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

              - `Type ComputerUsePreview`

                The type of the computer use tool. Always `computer_use_preview`.

                - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchToolType`

                The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

              - `Filters BetaWebSearchToolFilters`

                Filters for the search.

                - `AllowedDomains []string`

                  Allowed domains for the search. If not provided, all domains are allowed.
                  Subdomains of the provided domains are allowed as well.

                  Example: `["pubmed.ncbi.nlm.nih.gov"]`

              - `SearchContextSize BetaWebSearchToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchToolUserLocation`

                The approximate location of the user.

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                - `Type string`

                  The type of location approximation. Always `approximate`.

                  - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `ServerLabel string`

                A label for this MCP server, used to identify it in tool calls.

              - `Type Mcp`

                The type of the MCP tool. Always `mcp`.

                - `const McpMcp Mcp = "mcp"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

              - `AllowedTools BetaToolMcpAllowedToolsUnion`

                List of allowed tool names or a filter object.

                - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                  A string array of allowed tool names

                - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `Authorization string`

                An OAuth access token that can be used with a remote MCP server, either
                with a custom MCP server URL or a service connector. Your application
                must handle the OAuth authorization flow and provide the token here.

              - `ConnectorID string`

                Identifier for service connectors, like those available in ChatGPT. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                Currently supported `connector_id` values are:

                - Dropbox: `connector_dropbox`
                - Gmail: `connector_gmail`
                - Google Calendar: `connector_googlecalendar`
                - Google Drive: `connector_googledrive`
                - Microsoft Teams: `connector_microsoftteams`
                - Outlook Calendar: `connector_outlookcalendar`
                - Outlook Email: `connector_outlookemail`
                - SharePoint: `connector_sharepoint`

                - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

              - `DeferLoading bool`

                Whether this MCP tool is deferred and discovered via tool search.

              - `Headers map[string, string]`

                Optional HTTP headers to send to the MCP server. Use for authentication
                or other purposes.

              - `RequireApproval BetaToolMcpRequireApprovalUnion`

                Specify which of the MCP server's tools require approval.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                  Specify which of the MCP server's tools require approval. Can be
                  `always`, `never`, or a filter object associated with tools
                  that require approval.

                  - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                  - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                  Specify a single approval policy for all tools. One of `always` or
                  `never`. When set to `always`, all tools will require approval. When
                  set to `never`, all tools will not require approval.

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

              - `ServerDescription string`

                Optional description of the MCP server, used to provide more context.

              - `ServerURL string`

                The URL for the MCP server. One of `server_url`, `connector_id`, or
                `tunnel_id` must be provided.

              - `TunnelID string`

                The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided.

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

              - `Container BetaToolCodeInterpreterContainerUnion`

                The code interpreter container. Can be a container ID or an object that
                specifies uploaded file IDs to make available to your code, along with an
                optional `memory_limit` setting.

                - `string`

                - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                  Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                  - `Type Auto`

                    Always `auto`.

                    - `const AutoAuto Auto = "auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit string`

                    The memory limit for the code interpreter container.

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `Type Disabled`

                        Disable outbound network access. Always `disabled`.

                        - `const DisabledDisabled Disabled = "disabled"`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                      - `AllowedDomains []string`

                        A list of allowed domains when type is `allowlist`.

                      - `Type Allowlist`

                        Allow outbound network access only to specified domains. Always `allowlist`.

                        - `const AllowlistAllowlist Allowlist = "allowlist"`

                      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                        Optional domain-scoped secrets for allowlisted domains.

                        - `Domain string`

                          The domain associated with the secret.

                        - `Name string`

                          The name of the secret to inject for the domain.

                        - `Value string`

                          The secret value to inject for the domain.

              - `Type CodeInterpreter`

                The type of the code interpreter tool. Always `code_interpreter`.

                - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

            - `type BetaToolProgrammaticToolCalling struct{…}`

              - `Type ProgrammaticToolCalling`

                The type of the tool. Always `programmatic_tool_calling`.

                - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

              - `Type ImageGeneration`

                The type of the image generation tool. Always `image_generation`.

                - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

              - `Action string`

                Whether to generate a new image or edit an existing image. Default: `auto`.

                - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

              - `Background string`

                Allows to set transparency for the background of the generated image(s).
                This parameter is only supported for GPT image models that support
                transparent backgrounds. Must be one of `transparent`, `opaque`, or
                `auto` (default value). When `auto` is used, the model will
                automatically determine the best background for the image.

                `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                transparent backgrounds. Requests with `background` set to
                `transparent` will return an error for these models; use `opaque` or
                `auto` instead.

                If `transparent`, the output format needs to support transparency,
                so it should be set to either `png` (default value) or `webp`.

                - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

              - `InputFidelity string`

                Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

              - `InputImageMask BetaToolImageGenerationInputImageMask`

                Optional mask for inpainting. Contains `image_url`
                (string, optional) and `file_id` (string, optional).

                - `FileID string`

                  File ID for the mask image.

                - `ImageURL string`

                  Base64-encoded mask image.

              - `Model string`

                The image generation model to use. Default: `gpt-image-1`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                  - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                  - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                  - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                  - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                  - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

              - `Moderation string`

                Moderation level for the generated image. Default: `auto`.

                - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

              - `OutputCompression int64`

                Compression level for the output image. Default: 100.

              - `OutputFormat string`

                The output format of the generated image. One of `png`, `webp`, or
                `jpeg`. Default: `png`.

                - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

              - `PartialImages int64`

                Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              - `Quality string`

                The quality of the generated image. One of `low`, `medium`, `high`,
                or `auto`. Default: `auto`.

                - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

              - `Size string`

                The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                  - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                  - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                  - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

              - `Type LocalShell`

                The type of the local shell tool. Always `local_shell`.

                - `const LocalShellLocalShell LocalShell = "local_shell"`

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

              - `Type Shell`

                The type of the shell tool. Always `shell`.

                - `const ShellShell Shell = "shell"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

              - `Environment BetaFunctionShellToolEnvironmentUnion`

                - `type BetaContainerAuto struct{…}`

                  - `Type ContainerAuto`

                    Automatically creates a container for this request

                    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit BetaContainerAutoMemoryLimit`

                    The memory limit for the container.

                    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `Skills []BetaContainerAutoSkillUnion`

                    An optional list of skills referenced by id or inline data.

                    - `type BetaSkillReference struct{…}`

                      - `SkillID string`

                        The ID of the referenced skill.

                      - `Type SkillReference`

                        References a skill created with the /v1/skills endpoint.

                        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                      - `Version string`

                        Optional skill version. Use a positive integer or 'latest'. Omit for default.

                    - `type BetaInlineSkill struct{…}`

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Source BetaInlineSkillSource`

                        Inline skill payload

                        - `Data string`

                          Base64-encoded skill zip bundle.

                        - `MediaType ApplicationZip`

                          The media type of the inline skill payload. Must be `application/zip`.

                          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                        - `Type Base64`

                          The type of the inline skill source. Must be `base64`.

                          - `const Base64Base64 Base64 = "base64"`

                      - `Type Inline`

                        Defines an inline skill for this request.

                        - `const InlineInline Inline = "inline"`

                - `type BetaLocalEnvironment struct{…}`

                  - `Type Local`

                    Use a local computer environment.

                    - `const LocalLocal Local = "local"`

                  - `Skills []BetaLocalSkill`

                    An optional list of skills.

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Path string`

                      The path to the directory containing the skill.

                - `type BetaContainerReference struct{…}`

                  - `ContainerID string`

                    The ID of the referenced container.

                  - `Type ContainerReference`

                    References a container created with the /v1/containers endpoint

                    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Name string`

                The name of the custom tool, used to identify it in tool calls.

              - `Type Custom`

                The type of the custom tool. Always `custom`.

                - `const CustomCustom Custom = "custom"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this tool should be deferred and discovered via tool search.

              - `Description string`

                Optional description of the custom tool, used to provide more context.

              - `Format BetaCustomToolFormatUnion`

                The input format for the custom tool. Default is unconstrained text.

                - `type BetaCustomToolFormatText struct{…}`

                  Unconstrained free-form text.

                  - `Type Text`

                    Unconstrained text format. Always `text`.

                    - `const TextText Text = "text"`

                - `type BetaCustomToolFormatGrammar struct{…}`

                  A grammar defined by the user.

                  - `Definition string`

                    The grammar definition.

                  - `Syntax string`

                    The syntax of the grammar definition. One of `lark` or `regex`.

                    - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                    - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                  - `Type Grammar`

                    Grammar format. Always `grammar`.

                    - `const GrammarGrammar Grammar = "grammar"`

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

              - `Description string`

                A description of the namespace shown to the model.

              - `Name string`

                The namespace name used in tool calls (for example, `crm`).

              - `Tools []BetaNamespaceToolToolUnion`

                The function/custom tools available inside this namespace.

                - `type BetaNamespaceToolToolFunction struct{…}`

                  - `Name string`

                  - `Type Function`

                    - `const FunctionFunction Function = "function"`

                  - `AllowedCallers []string`

                    The tool invocation context(s).

                    - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                    - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                  - `DeferLoading bool`

                    Whether this function should be deferred and discovered via tool search.

                  - `Description string`

                  - `OutputSchema map[string, any]`

                    A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                  - `Parameters any`

                  - `Strict bool`

                    Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                - `type BetaCustomTool struct{…}`

                  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Type Namespace`

                The type of the tool. Always `namespace`.

                - `const NamespaceNamespace Namespace = "namespace"`

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

              - `Type ToolSearch`

                The type of the tool. Always `tool_search`.

                - `const ToolSearchToolSearch ToolSearch = "tool_search"`

              - `Description string`

                Description shown to the model for a client-executed tool search tool.

              - `Execution BetaToolSearchToolExecution`

                Whether tool search is executed by the server or by the client.

                - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

              - `Parameters any`

                Parameter schema for a client-executed tool search tool.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchPreviewToolType`

                The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

              - `SearchContentTypes []string`

                - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

              - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchPreviewToolUserLocation`

                The user's location.

                - `Type Approximate`

                  The type of location approximation. Always `approximate`.

                  - `const ApproximateApproximate Approximate = "approximate"`

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

              - `Type ApplyPatch`

                The type of the tool. Always `apply_patch`.

                - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

          - `Type ToolSearchOutput`

            The item type. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `ID string`

            The unique ID of this tool search output.

          - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution BetaResponseToolSearchOutputItemParamExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

            - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemParamStatus`

            The status of the tool search output.

            - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

        - `type BetaResponseInputItemAdditionalTools struct{…}`

          - `Role Developer`

            The role that provided the additional tools. Only `developer` is supported.

            - `const DeveloperDeveloper Developer = "developer"`

          - `Tools []BetaToolUnion`

            A list of additional tools made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The item type. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `ID string`

            The unique ID of this additional tools item.

          - `Agent BetaResponseInputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

          - `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`.

              - `const SummaryTextSummaryText SummaryText = "summary_text"`

          - `Type Reasoning`

            The type of the object. Always `reasoning`.

            - `const ReasoningReasoning Reasoning = "reasoning"`

          - `Agent BetaResponseReasoningItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Content []BetaResponseReasoningItemContent`

            Reasoning text content.

            - `Text string`

              The reasoning text from the model.

            - `Type ReasoningText`

              The type of the reasoning text. Always `reasoning_text`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `EncryptedContent string`

            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.

          - `Status BetaResponseReasoningItemStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

            - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

            - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

        - `type BetaResponseCompactionItemParamResp struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `EncryptedContent string`

            The encrypted content of the compaction summary.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

            The ID of the compaction item.

          - `Agent BetaResponseCompactionItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseInputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

          - `ID string`

            The unique ID of the code interpreter tool call.

          - `Code string`

            The code to run, or null if not available.

          - `ContainerID string`

            The ID of the container used to run the code.

          - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

            The outputs generated by the code interpreter, such as logs or images.
            Can be null if no outputs are available.

            - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

              The logs output from the code interpreter.

              - `Logs string`

                The logs output from the code interpreter.

              - `Type Logs`

                The type of the output. Always `logs`.

                - `const LogsLogs Logs = "logs"`

            - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

              The image output from the code interpreter.

              - `Type Image`

                The type of the output. Always `image`.

                - `const ImageImage Image = "image"`

              - `URL string`

                The URL of the image output from the code interpreter.

          - `Status BetaResponseCodeInterpreterToolCallStatus`

            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

            - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

            - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

            - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

            - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

            - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

          - `Type CodeInterpreterCall`

            The type of the code interpreter tool call. Always `code_interpreter_call`.

            - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

          - `Agent BetaResponseCodeInterpreterToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCall struct{…}`

          A tool call to run a command on the local shell.

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseInputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemShellCall struct{…}`

          A tool representing a request to execute one or more shell commands.

          - `Action BetaResponseInputItemShellCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

              Ordered shell commands for the execution environment to run.

            - `MaxOutputLength int64`

              Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

            - `TimeoutMs int64`

              Maximum wall-clock time in milliseconds to allow the shell commands to run.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

            The environment to execute the shell commands in.

            - `type BetaLocalEnvironment struct{…}`

            - `type BetaContainerReference struct{…}`

          - `Status string`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

            - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

        - `type BetaResponseInputItemShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Output []BetaResponseFunctionShellCallOutputContent`

            Captured chunks of stdout and stderr output, along with their associated outcomes.

            - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

              The exit or timeout outcome associated with this shell call.

              - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  The exit code returned by the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              Captured stderr output for the shell call.

            - `Stdout string`

              Captured stdout output for the shell call.

          - `Type ShellCallOutput`

            The type of the item. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

            The unique ID of the shell tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `MaxOutputLength int64`

            The maximum number of UTF-8 characters captured for this shell call's combined output.

          - `Status string`

            The status of the shell call output.

            - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemApplyPatchCall struct{…}`

          A tool call representing a request to create, delete, or update files using diff patches.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

            The specific create, delete, or update instruction for the apply_patch tool call.

            - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply when creating the file.

              - `Path string`

                Path of the file to create relative to the workspace root.

              - `Type CreateFile`

                The operation type. Always `create_file`.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

                Path of the file to delete relative to the workspace root.

              - `Type DeleteFile`

                The operation type. Always `delete_file`.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply to the existing file.

              - `Path string`

                Path of the file to update relative to the workspace root.

              - `Type UpdateFile`

                The operation type. Always `update_file`.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status string`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

            - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status string`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

            - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Output string`

            Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

        - `type BetaResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseInputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseInputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

            The unique ID of the approval response

          - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `type BetaResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseInputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

            - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

            - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

        - `type BetaResponseCustomToolCallOutput struct{…}`

          The output of a custom tool call from your code, being sent back to the model.

          - `CallID string`

            The call ID, used to map this custom tool call output to a custom tool call.

          - `Output BetaResponseCustomToolCallOutputOutputUnion`

            The output from the custom tool call generated by your code.
            Can be a string or an list of output content.

            - `string`

            - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              Text, image, or file output of the custom tool call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            The type of the custom tool call output. Always `custom_tool_call_output`.

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

            The unique ID of the custom tool call output in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

          - `CallID string`

            An identifier used to map this custom tool call to a tool call output.

          - `Input string`

            The input for the custom tool call generated by the model.

          - `Name string`

            The name of the custom tool being called.

          - `Type CustomToolCall`

            The type of the custom tool call. Always `custom_tool_call`.

            - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

          - `ID string`

            The unique ID of the custom tool call in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the custom tool being called.

        - `type BetaResponseInputItemCompactionTrigger struct{…}`

          Compacts the current context. Must be the final input item.

          - `Type CompactionTrigger`

            The type of the item. Always `compaction_trigger`.

            - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

          - `Agent BetaResponseInputItemCompactionTriggerAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

            The ID of the item to reference.

          - `Agent BetaResponseInputItemItemReferenceAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Type string`

            The type of item to reference. Always `item_reference`.

            - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

        - `type BetaResponseInputItemProgram struct{…}`

          - `ID string`

            The unique ID of this program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The item type. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseInputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of this program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output.

            - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

            - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The item type. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseInputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

    - `Metadata map[string, string]`

      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.

    - `Model BetaResponseModel`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `type BetaResponseModel string`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

        - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

        - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

        - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

        - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

        - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

        - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

        - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

        - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

        - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

        - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

        - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

        - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

        - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

        - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

        - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

        - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

        - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

        - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

        - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

        - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

        - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

        - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

        - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

        - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

        - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

        - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

        - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

        - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

        - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

        - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

        - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

        - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

        - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

        - `const BetaResponseModelO3 BetaResponseModel = "o3"`

        - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

        - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

        - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

        - `const BetaResponseModelO1 BetaResponseModel = "o1"`

        - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

        - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

        - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

        - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

        - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

        - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

        - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

        - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

        - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

        - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

        - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

        - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

        - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

        - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

        - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

        - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

        - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

        - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

        - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

        - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

        - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

        - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

        - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

        - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

        - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

        - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

        - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

        - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

        - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

        - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

        - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

        - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

        - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

        - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

        - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

        - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

        - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

        - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

        - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

        - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

        - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

        - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

        - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

        - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

        - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

        - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

        - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

        - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

        - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

        - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

        - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

      - `string`

    - `Object Response`

      The object type of this resource - always set to `response`.

      - `const ResponseResponse Response = "response"`

    - `Output []BetaResponseOutputItemUnion`

      An array of content items generated by the model.

      - The length and order of items in the `output` array is dependent
        on the model's response.
      - Rather than accessing the first item in the `output` array and
        assuming it's an `assistant` message with the content generated by
        the model, you might consider using the `output_text` property where
        supported in SDKs.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

        - `ID string`

          The unique ID of the function call tool output.

        - `CallID string`

          The unique ID of the function tool call generated by the model.

        - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

          The output from the function call generated by your code.
          Can be a string or an list of output content.

          - `string`

          - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

            Text, image, or file output of the function call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Status BetaResponseFunctionToolCallOutputItemStatus`

          The status of the item. One of `in_progress`, `completed`, or
          `incomplete`. Populated when items are returned via API.

          - `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`.

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `Agent BetaResponseFunctionToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `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.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

          - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

            A text content.

            - `Text string`

            - `Type Text`

              - `const TextText Text = "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`.

              - `const SummaryTextSummaryText SummaryText = "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`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `type BetaResponseOutputRefusal struct{…}`

            A refusal from the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `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`.

              - `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.

            - `Type ComputerScreenshot`

              Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

          - `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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The type of the item. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `Agent BetaResponseOutputItemAgentMessageAgent`

          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.

          - `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`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `Agent BetaResponseOutputItemMultiAgentCallAgent`

          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.

          - `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.

        - `Output []BetaResponseOutputText`

          Text output returned by the multi-agent action.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

          - `Logprobs []BetaResponseOutputTextLogprob`

        - `Type MultiAgentCallOutput`

          The type of the multi-agent result. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `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.

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          A computer screenshot image used with the computer use tool.

        - `Status BetaResponseComputerToolCallOutputItemStatus`

          The status of the message input. One of `in_progress`, `completed`, or
          `incomplete`. Populated when input items are returned via API.

          - `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`.

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

          The safety checks reported by the API that have been acknowledged by the
          developer.

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseComputerToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseOutputItemProgram struct{…}`

        - `ID string`

          The unique ID of the program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The type of the item. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseOutputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of the program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output item.

          - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

          - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The type of the item. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseOutputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseToolSearchCall struct{…}`

        - `ID string`

          The unique ID of the tool search call item.

        - `Arguments any`

          Arguments used for the tool search call.

        - `CallID string`

          The unique ID of the tool search call generated by the model.

        - `Execution BetaResponseToolSearchCallExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

          - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

        - `Status BetaResponseToolSearchCallStatus`

          The status of the tool search call item that was recorded.

          - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

          - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

          - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

        - `Type ToolSearchCall`

          The type of the item. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `Agent BetaResponseToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseToolSearchOutputItem struct{…}`

        - `ID string`

          The unique ID of the tool search output item.

        - `CallID string`

          The unique ID of the tool search call generated by the model.

        - `Execution BetaResponseToolSearchOutputItemExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

          - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemStatus`

          The status of the tool search output item that was recorded.

          - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by tool search.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ToolSearchOutput`

          The type of the item. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `Agent BetaResponseToolSearchOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemAdditionalTools struct{…}`

        - `ID string`

          The unique ID of the additional tools item.

        - `Role string`

          The role that provided the additional tools.

          - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

          - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

          - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

          - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

          - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

          - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

        - `Tools []BetaToolUnion`

          The additional tool definitions made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The type of the item. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `Agent BetaResponseOutputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCompactionItem struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `ID string`

          The unique ID of the compaction item.

        - `EncryptedContent string`

          The encrypted content that was produced by compaction.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `Agent BetaResponseCompactionItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseOutputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseOutputItemLocalShellCall struct{…}`

        A tool call to run a command on the local shell.

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseOutputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseOutputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionShellToolCall struct{…}`

        A tool call that executes one or more shell commands in a managed environment.

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Action BetaResponseFunctionShellToolCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

          - `MaxOutputLength int64`

            Optional maximum number of characters to return from each command.

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the commands.

        - `CallID string`

          The unique ID of the shell tool call generated by the model.

        - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

          Represents the use of a local environment to perform shell actions.

          - `type BetaResponseLocalEnvironment struct{…}`

            Represents the use of a local environment to perform shell actions.

            - `Type Local`

              The environment type. Always `local`.

              - `const LocalLocal Local = "local"`

          - `type BetaResponseContainerReference struct{…}`

            Represents a container created with /v1/containers.

            - `ContainerID string`

            - `Type ContainerReference`

              The environment type. Always `container_reference`.

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `Status BetaResponseFunctionShellToolCallStatus`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `Agent BetaResponseFunctionShellToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

        - `ID string`

          The unique ID of the shell call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the shell tool call generated by the model.

        - `MaxOutputLength int64`

          The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

        - `Output []BetaResponseFunctionShellToolCallOutputOutput`

          An array of shell call output contents

          - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

            Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                Exit code from the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            The standard error output that was captured.

          - `Stdout string`

            The standard output that was captured.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `Status BetaResponseFunctionShellToolCallOutputStatus`

          The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

        - `Type ShellCallOutput`

          The type of the shell call output. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `Agent BetaResponseFunctionShellToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseApplyPatchToolCall struct{…}`

        A tool call that applies file diffs by creating, deleting, or updating files.

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseApplyPatchToolCallOperationUnion`

          One of the create_file, delete_file, or update_file operations applied via apply_patch.

          - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

            Instruction describing how to create a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to create.

            - `Type CreateFile`

              Create a new file with the provided diff.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

            Instruction describing how to delete a file via the apply_patch tool.

            - `Path string`

              Path of the file to delete.

            - `Type DeleteFile`

              Delete the specified file.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

            Instruction describing how to update a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to update.

            - `Type UpdateFile`

              Update an existing file with the provided diff.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status BetaResponseApplyPatchToolCallStatus`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

          - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `Agent BetaResponseApplyPatchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status BetaResponseApplyPatchToolCallOutputStatus`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

          - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `Agent BetaResponseApplyPatchToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call output.

        - `Output string`

          Optional textual output returned by the apply patch tool.

      - `type BetaResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseOutputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

          - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

          - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

      - `type BetaResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseOutputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseOutputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ID string`

          The unique ID of the approval response

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `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.

        - `ID string`

          The unique ID of the custom tool call output item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or
          `incomplete`. Populated when items are returned via API.

          - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

          - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

          - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

    - `ParallelToolCalls bool`

      Whether to allow the model to run tool calls in parallel.

    - `Temperature float64`

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
      We generally recommend altering this or `top_p` but not both.

    - `ToolChoice BetaResponseToolChoiceUnion`

      How the model should select which tool (or tools) to use when generating
      a response. See the `tools` parameter to see how to specify which tools
      the model can call.

      - `type BetaToolChoiceOptions string`

        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a message.

        `auto` means the model can pick between generating a message or calling one or
        more tools.

        `required` means the model must call one or more tools.

        - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

        - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

        - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

      - `type BetaToolChoiceAllowed struct{…}`

        Constrains the tools available to the model to a pre-defined set.

        - `Mode BetaToolChoiceAllowedMode`

          Constrains the tools available to the model to a pre-defined set.

          `auto` allows the model to pick from among the allowed tools and generate a
          message.

          `required` requires the model to call one or more of the allowed tools.

          - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

          - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

        - `Tools []map[string, any]`

          A list of tool definitions that the model should be allowed to call.

          For the Responses API, the list of tool definitions might look like:

          ```json
          [
            { "type": "function", "name": "get_weather" },
            { "type": "mcp", "server_label": "deepwiki" },
            { "type": "image_generation" }
          ]
          ```

        - `Type AllowedTools`

          Allowed tool configuration type. Always `allowed_tools`.

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type BetaToolChoiceTypes struct{…}`

        Indicates that the model should use a built-in tool to generate a response.
        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

        - `Type BetaToolChoiceTypesType`

          The type of hosted tool the model should to use. Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).

          Allowed values are:

          - `file_search`
          - `web_search_preview`
          - `computer`
          - `computer_use_preview`
          - `computer_use`
          - `code_interpreter`
          - `image_generation`

          - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

          - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

          - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

          - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

          - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

      - `type BetaToolChoiceFunction struct{…}`

        Use this option to force the model to call a specific function.

        - `Name string`

          The name of the function to call.

        - `Type Function`

          For function calling, the type is always `function`.

          - `const FunctionFunction Function = "function"`

      - `type BetaToolChoiceMcp struct{…}`

        Use this option to force the model to call a specific tool on a remote MCP server.

        - `ServerLabel string`

          The label of the MCP server to use.

        - `Type Mcp`

          For MCP tools, the type is always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

          The name of the tool to call on the server.

      - `type BetaToolChoiceCustom struct{…}`

        Use this option to force the model to call a specific custom tool.

        - `Name string`

          The name of the custom tool to call.

        - `Type Custom`

          For custom tool calling, the type is always `custom`.

          - `const CustomCustom Custom = "custom"`

      - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

        - `Type ProgrammaticToolCalling`

          The tool to call. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolChoiceApplyPatch struct{…}`

        Forces the model to call the apply_patch tool when executing a tool call.

        - `Type ApplyPatch`

          The tool to call. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type BetaToolChoiceShell struct{…}`

        Forces the model to call the shell tool when a tool call is required.

        - `Type Shell`

          The tool to call. Always `shell`.

          - `const ShellShell Shell = "shell"`

    - `Tools []BetaToolUnion`

      An array of tools the model may call while generating a response. You
      can specify which tool to use by setting the `tool_choice` parameter.

      We support the following categories of tools:

      - **Built-in tools**: Tools that are provided by OpenAI that extend the
        model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
        or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).
      - **MCP Tools**: Integrations with third-party systems via custom MCP servers
        or predefined connectors such as Google Drive and SharePoint. Learn more about
        [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
      - **Function calls (custom tools)**: Functions that are defined by you,
        enabling the model to call your own code with strongly typed arguments
        and outputs. Learn more about
        [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
        custom tools to call your own code.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `TopP float64`

      An alternative to sampling with temperature, called nucleus sampling,
      where the model considers the results of the tokens with top_p probability
      mass. So 0.1 means only the tokens comprising the top 10% probability mass
      are considered.

      We generally recommend altering this or `temperature` but not both.

    - `Background bool`

      Whether to run the model response in the background.
      [Learn more](https://platform.openai.com/docs/guides/background).

    - `CompletedAt float64`

      Unix timestamp (in seconds) of when this Response was completed.
      Only present when the status is `completed`.

    - `Conversation BetaResponseConversation`

      The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

      - `ID string`

        The unique ID of the conversation that this response was associated with.

    - `MaxOutputTokens int64`

      An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

    - `MaxToolCalls int64`

      The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

    - `Moderation BetaResponseModeration`

      Moderation results for the response input and output, if moderated completions were requested.

      - `Input BetaResponseModerationInputUnion`

        Moderation for the response input.

        - `type BetaResponseModerationInputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationInputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

      - `Output BetaResponseModerationOutputUnion`

        Moderation for the response output.

        - `type BetaResponseModerationOutputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationOutputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

    - `PreviousResponseID string`

      The unique ID of the previous response to the model. Use this to
      create multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

    - `Prompt BetaResponsePrompt`

      Reference to a prompt template and its variables.
      [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

      - `ID string`

        The unique identifier of the prompt template to use.

      - `Variables map[string, BetaResponsePromptVariableUnion]`

        Optional map of values to substitute in for variables in your
        prompt. The substitution values can either be strings, or other
        Response input types like images or files.

        - `string`

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

        Optional version of the prompt template.

    - `PromptCacheKey string`

      Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

    - `PromptCacheOptions BetaResponsePromptCacheOptions`

      The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

      - `Mode string`

        Whether implicit prompt-cache breakpoints were enabled.

        - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

        - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

      - `Ttl string`

        The minimum lifetime applied to each cache breakpoint.

        - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

    - `PromptCacheRetention BetaResponsePromptCacheRetention`

      Deprecated. Use `prompt_cache_options.ttl` instead.

      The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
      This field expresses a maximum retention policy, while
      `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
      fields are independent and do not interact.
      For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

      For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

      - Organizations without ZDR enabled default to `24h`.
      - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

      - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

      - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

    - `Reasoning BetaResponseReasoning`

      **gpt-5 and o-series models only**

      Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

      - `Context string`

        Controls which reasoning items are rendered back to the model on later turns.
        If omitted or set to `auto`, the model determines the context mode. The
        `gpt-5.6` model family defaults to `all_turns`; earlier models default to
        `current_turn`.

        When returned on a response, this is the effective reasoning context mode
        used for the response.

        - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

        - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

        - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

      - `Effort string`

        Constrains effort on reasoning for reasoning models. Currently supported
        values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
        Reducing reasoning effort can result in faster responses and fewer tokens
        used on reasoning in a response. Not all reasoning models support every
        value. See the
        [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
        for model-specific support.

        - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

        - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

        - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

        - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

        - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

        - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

        - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

      - `GenerateSummary string`

        **Deprecated:** use `summary` instead.

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

        - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

        - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

      - `Mode string`

        Controls the reasoning execution mode for the request.

        When returned on a response, this is the effective execution mode.

        - `string`

        - `string`

          - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

          - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

      - `Summary string`

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

        - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

        - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

        - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

      A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
      The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `ServiceTier BetaResponseServiceTier`

      Specifies the processing type used for serving the request.

      - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
      - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
      - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
      - When not set, the default behavior is 'auto'.

      When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

      - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

      - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

      - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

      - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

      - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

    - `Status BetaResponseStatus`

      The status of the response generation. One of `completed`, `failed`,
      `in_progress`, `cancelled`, `queued`, or `incomplete`.

      - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

      - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

      - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

      - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

      - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

      - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

    - `Text BetaResponseTextConfig`

      Configuration options for a text response from the model. Can be plain
      text or structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

      - `Format BetaResponseFormatTextConfigUnion`

        An object specifying the format that the model must output.

        Configuring `{ "type": "json_schema" }` enables Structured Outputs,
        which ensures the model will match your supplied JSON schema. Learn more in the
        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

        The default format is `{ "type": "text" }` with no additional options.

        **Not recommended for gpt-4o and newer models:**

        Setting to `{ "type": "json_object" }` enables the older JSON mode, which
        ensures the message the model generates is valid JSON. Using `json_schema`
        is preferred for models that support it.

        - `type BetaResponseFormatTextConfigText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            The type of response format being defined. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

          JSON Schema response format. Used to generate structured JSON responses.
          Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

          - `Name string`

            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.

          - `Schema map[string, any]`

            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).

          - `Type JSONSchema`

            The type of response format being defined. Always `json_schema`.

            - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

          - `Description string`

            A description of what the response format is for, used by the model to
            determine how to respond in the format.

          - `Strict bool`

            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).

        - `type BetaResponseFormatTextConfigJSONObject struct{…}`

          JSON object response format. An older method of generating JSON responses.
          Using `json_schema` is recommended for models that support it. Note that the
          model will not generate JSON without a system or user message instructing it
          to do so.

          - `Type JSONObject`

            The type of response format being defined. Always `json_object`.

            - `const JSONObjectJSONObject JSONObject = "json_object"`

      - `Verbosity BetaResponseTextConfigVerbosity`

        Constrains the verbosity of the model's response. Lower values will result in
        more concise responses, while higher values will result in more verbose responses.
        Currently supported values are `low`, `medium`, and `high`. The default is
        `medium`.

        - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

        - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

        - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

    - `TopLogprobs int64`

      An integer between 0 and 20 specifying the maximum number of most likely
      tokens to return at each token position, each with an associated log
      probability. In some cases, the number of returned tokens may be fewer than
      requested.

    - `Truncation BetaResponseTruncation`

      The truncation strategy to use for the model response.

      - `auto`: If the input to this Response exceeds
        the model's context window size, the model will truncate the
        response to fit the context window by dropping items from the beginning of the conversation.
      - `disabled` (default): If the input size will exceed the context window
        size for a model, the request will fail with a 400 error.

      - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

      - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

    - `Usage BetaResponseUsage`

      Represents token usage details including input tokens, output tokens,
      a breakdown of output tokens, and the total tokens used.

      - `InputTokens int64`

        The number of input tokens.

      - `InputTokensDetails BetaResponseUsageInputTokensDetails`

        A detailed breakdown of the input tokens.

        - `CacheWriteTokens int64`

          The number of input tokens that were written to the cache.

        - `CachedTokens int64`

          The number of tokens that were retrieved from the cache.
          [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

      - `OutputTokens int64`

        The number of output tokens.

      - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

        A detailed breakdown of the output tokens.

        - `ReasoningTokens int64`

          The number of reasoning tokens.

      - `TotalTokens int64`

        The total number of tokens used.

    - `User string`

      This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
      A stable identifier for your end-users.
      Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseIncomplete`

    The type of the event. Always `response.incomplete`.

    - `const ResponseIncompleteResponseIncomplete ResponseIncomplete = "response.incomplete"`

  - `Agent BetaResponseIncompleteEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Inject Created Event

- `type BetaResponseInjectCreatedEvent struct{…}`

  Emitted when all injected input items were validated and committed to the
  active response.

  - `ResponseID string`

    The ID of the response that accepted the input.

  - `SequenceNumber int64`

    The sequence number for this event.

  - `Type ResponseInjectCreated`

    The event discriminator. Always `response.inject.created`.

    - `const ResponseInjectCreatedResponseInjectCreated ResponseInjectCreated = "response.inject.created"`

  - `StreamID string`

    The multiplexed WebSocket stream that emitted the event. This field is
    present only when WebSocket multiplexing is enabled separately.

### Beta Response Inject Event

- `type BetaResponseInjectEvent struct{…}`

  Injects input items into an active response over a WebSocket connection.
  The items are validated and committed atomically. Currently, the server
  accepts client-owned tool outputs that resume a waiting agent.

  - `Input []BetaResponseInputItemUnion`

    Input items to inject into the active response.

    - `type BetaEasyInputMessage struct{…}`

      A message input to the model with a role indicating instruction following
      hierarchy. Instructions given with the `developer` or `system` role take
      precedence over instructions given with the `user` role. Messages with the
      `assistant` role are presumed to have been generated by the model in previous
      interactions.

      - `Content BetaEasyInputMessageContentUnion`

        Text, image, or audio input to the model, used to generate a response.
        Can also contain previous assistant responses.

        - `string`

        - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

          A list of one or many input items to the model, containing different content
          types.

          - `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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `Detail BetaResponseInputImageDetail`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `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`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `FileID string`

              The ID of the file to be sent to the model.

            - `ImageURL string`

              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

            - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileDetail`

              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`.

              - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

              - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

              - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

            - `FileData string`

              The content of the file to be sent to the model.

            - `FileID string`

              The ID of the file to be sent to the model.

            - `FileURL string`

              The URL of the file to be sent to the model.

            - `Filename string`

              The name of the file to be sent to the model.

            - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Role BetaEasyInputMessageRole`

        The role of the message input. One of `user`, `assistant`, `system`, or
        `developer`.

        - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

        - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

        - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

        - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

      - `Phase BetaEasyInputMessagePhase`

        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.

        - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

        - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

      - `Type BetaEasyInputMessageType`

        The type of the message input. Always `message`.

        - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

    - `type BetaResponseInputItemMessage struct{…}`

      A message input to the model with a role indicating instruction following
      hierarchy. Instructions given with the `developer` or `system` role take
      precedence over instructions given with the `user` role.

      - `Content BetaResponseInputMessageContentList`

        A list of one or many input items to the model, containing different content
        types.

      - `Role string`

        The role of the message input. One of `user`, `system`, or `developer`.

        - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

        - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

        - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

      - `Agent BetaResponseInputItemMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

        - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

        - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

      - `Type string`

        The type of the message input. Always set to `message`.

        - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

    - `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.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

            - `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`.

                - `const FileCitationFileCitation FileCitation = "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`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the web resource.

            - `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`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []BetaResponseOutputTextLogprob`

            - `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`.

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        The role of the output message. Always `assistant`.

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status BetaResponseOutputMessageStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

        - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

        - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        The type of the output message. Always `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseOutputMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Phase BetaResponseOutputMessagePhase`

        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.

        - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

        - `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`.

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Agent BetaResponseFileSearchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Results []BetaResponseFileSearchToolCallResult`

        The results of the file search tool call.

        - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

          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.

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

          The unique ID of the file.

        - `Filename string`

          The name of the file.

        - `Score float64`

          The relevance score of the file - a value between 0 and 1.

        - `Text string`

          The text that was retrieved from the file.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

          The type of the pending safety check.

        - `Message string`

          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.

        - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

        - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

        - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

      - `Type BetaResponseComputerToolCallType`

        The type of the computer call. Always `computer_call`.

        - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

      - `Action BetaComputerActionUnion`

        A click action.

        - `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`.

            - `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`.

            - `const ClickClick Click = "click"`

          - `X int64`

            The x-coordinate where the click occurred.

          - `Y int64`

            The y-coordinate where the click occurred.

          - `Keys []string`

            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`.

            - `const DoubleClickDoubleClick DoubleClick = "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`.

            - `const DragDrag Drag = "drag"`

          - `Keys []string`

            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`.

            - `const KeypressKeypress Keypress = "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`.

            - `const MoveMove Move = "move"`

          - `X int64`

            The x-coordinate to move to.

          - `Y int64`

            The y-coordinate to move to.

          - `Keys []string`

            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`.

            - `const ScreenshotScreenshot Screenshot = "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`.

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

            The x-coordinate where the scroll occurred.

          - `Y int64`

            The y-coordinate where the scroll occurred.

          - `Keys []string`

            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`.

            - `const TypeType Type = "type"`

        - `type BetaComputerActionWait struct{…}`

          A wait action.

          - `Type Wait`

            Specifies the event type. For a wait action, this property is always set to `wait`.

            - `const WaitWait Wait = "wait"`

      - `Actions BetaComputerActionList`

        Flattened batched actions for `computer_use`. Each action includes an
        `type` discriminator and action-specific fields.

        - `type BetaComputerActionClick struct{…}`

          A click action.

        - `type BetaComputerActionDoubleClick struct{…}`

          A double click action.

        - `type BetaComputerActionDrag struct{…}`

          A drag action.

        - `type BetaComputerActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

        - `type BetaComputerActionMove struct{…}`

          A mouse move action.

        - `type BetaComputerActionScreenshot struct{…}`

          A screenshot action.

        - `type BetaComputerActionScroll struct{…}`

          A scroll action.

        - `type BetaComputerActionType struct{…}`

          An action to type in text.

        - `type BetaComputerActionWait struct{…}`

          A wait action.

      - `Agent BetaResponseComputerToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemComputerCallOutput struct{…}`

      The output of a computer tool call.

      - `CallID string`

        The ID of the computer tool call that produced the output.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        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`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

      - `Type ComputerCallOutput`

        The type of the computer tool call output. Always `computer_call_output`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `ID string`

        The ID of the computer tool call output.

      - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

        The safety checks reported by the API that have been acknowledged by the developer.

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseInputItemComputerCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

        - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

        - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `ID string`

        The unique ID of the web search tool call.

      - `Action BetaResponseFunctionWebSearchActionUnion`

        An object describing the specific action taken in this web search call.
        Includes details on how the model used the web (search, open_page, find_in_page).

        - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

          Action type "search" - Performs a web search query.

          - `Type Search`

            The action type.

            - `const SearchSearch Search = "search"`

          - `Queries []string`

            The search queries.

          - `Query string`

            The search query.

          - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

            The sources used in the search.

            - `Type URL`

              The type of source. Always `url`.

              - `const URLURL URL = "url"`

            - `URL string`

              The URL of the source.

        - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

          Action type "open_page" - Opens a specific URL from search results.

          - `Type OpenPage`

            The action type.

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

            The URL opened by the model.

        - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

          Action type "find_in_page": Searches for a pattern within a loaded page.

          - `Pattern string`

            The pattern or text to search for within the page.

          - `Type FindInPage`

            The action type.

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

            The URL of the page searched for the pattern.

      - `Status BetaResponseFunctionWebSearchStatus`

        The status of the web search tool call.

        - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

        - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

        - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

        - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        The type of the web search tool call. Always `web_search_call`.

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `Agent BetaResponseFunctionWebSearchAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

        - `const FunctionCallFunctionCall FunctionCall = "function_call"`

      - `ID string`

        The unique ID of the function tool call.

      - `Agent BetaResponseFunctionToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the function to run.

      - `Status BetaResponseFunctionToolCallStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

        - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

    - `type BetaResponseInputItemFunctionCallOutput struct{…}`

      The output of a function tool call.

      - `CallID string`

        The unique ID of the function tool call generated by the model.

      - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

        Text, image, or file output of the function tool call.

        - `string`

        - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

          An array of content outputs (text, image, file) for the function tool call.

          - `type BetaResponseInputTextContent 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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `Type InputImage`

              The type of the input item. Always `input_image`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `Detail BetaResponseInputImageContentDetail`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

              - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

              - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

              - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

            - `FileID string`

              The ID of the file to be sent to the model.

            - `ImageURL string`

              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

            - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFileContent struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileContentDetail`

              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`.

              - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

              - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

              - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

            - `FileData string`

              The base64-encoded data of the file to be sent to the model.

            - `FileID string`

              The ID of the file to be sent to the model.

            - `FileURL string`

              The URL of the file to be sent to the model.

            - `Filename string`

              The name of the file to be sent to the model.

            - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Type FunctionCallOutput`

        The type of the function tool call output. Always `function_call_output`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `ID string`

        The unique ID of the function tool call output. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemFunctionCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

        - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

        - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

    - `type BetaResponseInputItemAgentMessage struct{…}`

      A message routed between agents.

      - `Author string`

        The sending agent identity.

      - `Content []BetaResponseInputItemAgentMessageContentUnion`

        Plaintext, image, or encrypted content sent between agents.

        - `type BetaResponseInputTextContent struct{…}`

          A text input to the model.

        - `type BetaResponseInputImageContent struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

        - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The item type. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `ID string`

        The unique ID of this agent message item.

      - `Agent BetaResponseInputItemAgentMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemMultiAgentCall struct{…}`

      - `Action string`

        The multi-agent action that was executed.

        - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

        - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

        - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

        - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

        - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

        - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

      - `Arguments string`

        The action arguments as a JSON string.

      - `CallID string`

        The unique ID linking this call to its output.

      - `Type MultiAgentCall`

        The item type. Always `multi_agent_call`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `ID string`

        The unique ID of this multi-agent call.

      - `Agent BetaResponseInputItemMultiAgentCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

      - `Action string`

        The multi-agent action that produced this result.

        - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

      - `CallID string`

        The unique ID of the multi-agent call.

      - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

        Text output returned by the multi-agent action.

        - `Text string`

          The text content.

        - `Type OutputText`

          The content type. Always `output_text`.

          - `const OutputTextOutputText OutputText = "output_text"`

        - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

          Citations associated with the text content.

          - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

            - `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 citation type. Always `file_citation`.

              - `const FileCitationFileCitation FileCitation = "file_citation"`

          - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

            - `EndIndex int64`

              The index of the last character of the citation in the message.

            - `StartIndex int64`

              The index of the first character of the citation in the message.

            - `Title string`

              The title of the cited resource.

            - `Type URLCitation`

              The citation type. Always `url_citation`.

              - `const URLCitationURLCitation URLCitation = "url_citation"`

            - `URL string`

              The URL of the cited resource.

          - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

            - `ContainerID string`

              The ID of the container.

            - `EndIndex int64`

              The index of the last character of the citation in the message.

            - `FileID string`

              The ID of the container file.

            - `Filename string`

              The filename of the container file cited.

            - `StartIndex int64`

              The index of the first character of the citation in the message.

            - `Type ContainerFileCitation`

              The citation type. Always `container_file_citation`.

              - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

      - `Type MultiAgentCallOutput`

        The item type. Always `multi_agent_call_output`.

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `ID string`

        The unique ID of this multi-agent call output.

      - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemToolSearchCall struct{…}`

      - `Arguments any`

        The arguments supplied to the tool search call.

      - `Type ToolSearchCall`

        The item type. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `ID string`

        The unique ID of this tool search call.

      - `Agent BetaResponseInputItemToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution string`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

        - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

      - `Status string`

        The status of the tool search call.

        - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

        - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

        - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

    - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by the tool search output.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `Name string`

            The name of the function to call.

          - `Parameters map[string, any]`

            A JSON schema object describing the parameters of the function.

          - `Strict bool`

            Whether strict parameter validation is enforced for this function tool.

          - `Type Function`

            The type of the function tool. Always `function`.

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

            - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function is deferred and loaded via tool search.

          - `Description string`

            A description of the function. Used by the model to determine whether or not to call the function.

          - `OutputSchema map[string, any]`

            A JSON schema object describing the JSON value encoded in string outputs for this function.

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `Type FileSearch`

            The type of the file search tool. Always `file_search`.

            - `const FileSearchFileSearch FileSearch = "file_search"`

          - `VectorStoreIDs []string`

            The IDs of the vector stores to search.

          - `Filters BetaFileSearchToolFiltersUnion`

            A filter to apply.

            - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

            - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

              Combine multiple filters using `and` or `or`.

              - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

              - `Type string`

                Type of operation: `and` or `or`.

                - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

          - `MaxNumResults int64`

            The maximum number of results to return. This number should be between 1 and 50 inclusive.

          - `RankingOptions BetaFileSearchToolRankingOptions`

            Ranking options for search.

            - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

              - `EmbeddingWeight float64`

                The weight of the embedding in the reciprocal ranking fusion.

              - `TextWeight float64`

                The weight of the text in the reciprocal ranking fusion.

            - `Ranker string`

              The ranker to use for the file search.

              - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

              - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

            - `ScoreThreshold float64`

              The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `Type Computer`

            The type of the computer tool. Always `computer`.

            - `const ComputerComputer Computer = "computer"`

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `DisplayHeight int64`

            The height of the computer display.

          - `DisplayWidth int64`

            The width of the computer display.

          - `Environment BetaComputerUsePreviewToolEnvironment`

            The type of computer environment to control.

            - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

            - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

            - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

            - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

            - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

          - `Type ComputerUsePreview`

            The type of the computer use tool. Always `computer_use_preview`.

            - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchToolType`

            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

            - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

            - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

          - `Filters BetaWebSearchToolFilters`

            Filters for the search.

            - `AllowedDomains []string`

              Allowed domains for the search. If not provided, all domains are allowed.
              Subdomains of the provided domains are allowed as well.

              Example: `["pubmed.ncbi.nlm.nih.gov"]`

          - `SearchContextSize BetaWebSearchToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

            - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

            - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchToolUserLocation`

            The approximate location of the user.

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `Type string`

              The type of location approximation. Always `approximate`.

              - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `ServerLabel string`

            A label for this MCP server, used to identify it in tool calls.

          - `Type Mcp`

            The type of the MCP tool. Always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

            - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

          - `AllowedTools BetaToolMcpAllowedToolsUnion`

            List of allowed tool names or a filter object.

            - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

              A string array of allowed tool names

            - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `Authorization string`

            An OAuth access token that can be used with a remote MCP server, either
            with a custom MCP server URL or a service connector. Your application
            must handle the OAuth authorization flow and provide the token here.

          - `ConnectorID string`

            Identifier for service connectors, like those available in ChatGPT. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
            about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

            Currently supported `connector_id` values are:

            - Dropbox: `connector_dropbox`
            - Gmail: `connector_gmail`
            - Google Calendar: `connector_googlecalendar`
            - Google Drive: `connector_googledrive`
            - Microsoft Teams: `connector_microsoftteams`
            - Outlook Calendar: `connector_outlookcalendar`
            - Outlook Email: `connector_outlookemail`
            - SharePoint: `connector_sharepoint`

            - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

            - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

            - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

            - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

            - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

            - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

            - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

            - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

          - `DeferLoading bool`

            Whether this MCP tool is deferred and discovered via tool search.

          - `Headers map[string, string]`

            Optional HTTP headers to send to the MCP server. Use for authentication
            or other purposes.

          - `RequireApproval BetaToolMcpRequireApprovalUnion`

            Specify which of the MCP server's tools require approval.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

              Specify which of the MCP server's tools require approval. Can be
              `always`, `never`, or a filter object associated with tools
              that require approval.

              - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

              - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

              Specify a single approval policy for all tools. One of `always` or
              `never`. When set to `always`, all tools will require approval. When
              set to `never`, all tools will not require approval.

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

          - `ServerDescription string`

            Optional description of the MCP server, used to provide more context.

          - `ServerURL string`

            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.

          - `TunnelID string`

            The Secure MCP Tunnel ID to use instead of a direct server URL. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided.

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

          - `Container BetaToolCodeInterpreterContainerUnion`

            The code interpreter container. Can be a container ID or an object that
            specifies uploaded file IDs to make available to your code, along with an
            optional `memory_limit` setting.

            - `string`

            - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

              - `Type Auto`

                Always `auto`.

                - `const AutoAuto Auto = "auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit string`

                The memory limit for the code interpreter container.

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `Type Disabled`

                    Disable outbound network access. Always `disabled`.

                    - `const DisabledDisabled Disabled = "disabled"`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `AllowedDomains []string`

                    A list of allowed domains when type is `allowlist`.

                  - `Type Allowlist`

                    Allow outbound network access only to specified domains. Always `allowlist`.

                    - `const AllowlistAllowlist Allowlist = "allowlist"`

                  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                    Optional domain-scoped secrets for allowlisted domains.

                    - `Domain string`

                      The domain associated with the secret.

                    - `Name string`

                      The name of the secret to inject for the domain.

                    - `Value string`

                      The secret value to inject for the domain.

          - `Type CodeInterpreter`

            The type of the code interpreter tool. Always `code_interpreter`.

            - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

            - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

        - `type BetaToolProgrammaticToolCalling struct{…}`

          - `Type ProgrammaticToolCalling`

            The type of the tool. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

          - `Type ImageGeneration`

            The type of the image generation tool. Always `image_generation`.

            - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

          - `Action string`

            Whether to generate a new image or edit an existing image. Default: `auto`.

            - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

            - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

            - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

          - `Background string`

            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for GPT image models that support
            transparent backgrounds. Must be one of `transparent`, `opaque`, or
            `auto` (default value). When `auto` is used, the model will
            automatically determine the best background for the image.

            `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
            transparent backgrounds. Requests with `background` set to
            `transparent` will return an error for these models; use `opaque` or
            `auto` instead.

            If `transparent`, the output format needs to support transparency,
            so it should be set to either `png` (default value) or `webp`.

            - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

            - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

            - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

          - `InputFidelity string`

            Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

            - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

            - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

          - `InputImageMask BetaToolImageGenerationInputImageMask`

            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).

            - `FileID string`

              File ID for the mask image.

            - `ImageURL string`

              Base64-encoded mask image.

          - `Model string`

            The image generation model to use. Default: `gpt-image-1`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

              - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

              - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

              - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

              - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

              - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

          - `Moderation string`

            Moderation level for the generated image. Default: `auto`.

            - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

            - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

          - `OutputCompression int64`

            Compression level for the output image. Default: 100.

          - `OutputFormat string`

            The output format of the generated image. One of `png`, `webp`, or
            `jpeg`. Default: `png`.

            - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

            - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

            - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

          - `PartialImages int64`

            Number of partial images to generate in streaming mode, from 0 (default value) to 3.

          - `Quality string`

            The quality of the generated image. One of `low`, `medium`, `high`,
            or `auto`. Default: `auto`.

            - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

            - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

            - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

            - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

          - `Size string`

            The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

              - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

              - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

              - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

          - `Type LocalShell`

            The type of the local shell tool. Always `local_shell`.

            - `const LocalShellLocalShell LocalShell = "local_shell"`

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

          - `Type Shell`

            The type of the shell tool. Always `shell`.

            - `const ShellShell Shell = "shell"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

            - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

          - `Environment BetaFunctionShellToolEnvironmentUnion`

            - `type BetaContainerAuto struct{…}`

              - `Type ContainerAuto`

                Automatically creates a container for this request

                - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit BetaContainerAutoMemoryLimit`

                The memory limit for the container.

                - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `Skills []BetaContainerAutoSkillUnion`

                An optional list of skills referenced by id or inline data.

                - `type BetaSkillReference struct{…}`

                  - `SkillID string`

                    The ID of the referenced skill.

                  - `Type SkillReference`

                    References a skill created with the /v1/skills endpoint.

                    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                  - `Version string`

                    Optional skill version. Use a positive integer or 'latest'. Omit for default.

                - `type BetaInlineSkill struct{…}`

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Source BetaInlineSkillSource`

                    Inline skill payload

                    - `Data string`

                      Base64-encoded skill zip bundle.

                    - `MediaType ApplicationZip`

                      The media type of the inline skill payload. Must be `application/zip`.

                      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                    - `Type Base64`

                      The type of the inline skill source. Must be `base64`.

                      - `const Base64Base64 Base64 = "base64"`

                  - `Type Inline`

                    Defines an inline skill for this request.

                    - `const InlineInline Inline = "inline"`

            - `type BetaLocalEnvironment struct{…}`

              - `Type Local`

                Use a local computer environment.

                - `const LocalLocal Local = "local"`

              - `Skills []BetaLocalSkill`

                An optional list of skills.

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Path string`

                  The path to the directory containing the skill.

            - `type BetaContainerReference struct{…}`

              - `ContainerID string`

                The ID of the referenced container.

              - `Type ContainerReference`

                References a container created with the /v1/containers endpoint

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Name string`

            The name of the custom tool, used to identify it in tool calls.

          - `Type Custom`

            The type of the custom tool. Always `custom`.

            - `const CustomCustom Custom = "custom"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

            - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this tool should be deferred and discovered via tool search.

          - `Description string`

            Optional description of the custom tool, used to provide more context.

          - `Format BetaCustomToolFormatUnion`

            The input format for the custom tool. Default is unconstrained text.

            - `type BetaCustomToolFormatText struct{…}`

              Unconstrained free-form text.

              - `Type Text`

                Unconstrained text format. Always `text`.

                - `const TextText Text = "text"`

            - `type BetaCustomToolFormatGrammar struct{…}`

              A grammar defined by the user.

              - `Definition string`

                The grammar definition.

              - `Syntax string`

                The syntax of the grammar definition. One of `lark` or `regex`.

                - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

              - `Type Grammar`

                Grammar format. Always `grammar`.

                - `const GrammarGrammar Grammar = "grammar"`

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

          - `Description string`

            A description of the namespace shown to the model.

          - `Name string`

            The namespace name used in tool calls (for example, `crm`).

          - `Tools []BetaNamespaceToolToolUnion`

            The function/custom tools available inside this namespace.

            - `type BetaNamespaceToolToolFunction struct{…}`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function should be deferred and discovered via tool search.

              - `Description string`

              - `OutputSchema map[string, any]`

                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

              - `Parameters any`

              - `Strict bool`

                Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Type Namespace`

            The type of the tool. Always `namespace`.

            - `const NamespaceNamespace Namespace = "namespace"`

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

          - `Type ToolSearch`

            The type of the tool. Always `tool_search`.

            - `const ToolSearchToolSearch ToolSearch = "tool_search"`

          - `Description string`

            Description shown to the model for a client-executed tool search tool.

          - `Execution BetaToolSearchToolExecution`

            Whether tool search is executed by the server or by the client.

            - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

            - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

          - `Parameters any`

            Parameter schema for a client-executed tool search tool.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchPreviewToolType`

            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

          - `SearchContentTypes []string`

            - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

            - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

          - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

            - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

            - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchPreviewToolUserLocation`

            The user's location.

            - `Type Approximate`

              The type of location approximation. Always `approximate`.

              - `const ApproximateApproximate Approximate = "approximate"`

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ApplyPatch`

            The type of the tool. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

            - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

      - `Type ToolSearchOutput`

        The item type. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `ID string`

        The unique ID of this tool search output.

      - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchOutputItemParamExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

        - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemParamStatus`

        The status of the tool search output.

        - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

    - `type BetaResponseInputItemAdditionalTools struct{…}`

      - `Role Developer`

        The role that provided the additional tools. Only `developer` is supported.

        - `const DeveloperDeveloper Developer = "developer"`

      - `Tools []BetaToolUnion`

        A list of additional tools made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The item type. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `ID string`

        The unique ID of this additional tools item.

      - `Agent BetaResponseInputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

      - `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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        The type of the object. Always `reasoning`.

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Agent BetaResponseReasoningItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Content []BetaResponseReasoningItemContent`

        Reasoning text content.

        - `Text string`

          The reasoning text from the model.

        - `Type ReasoningText`

          The type of the reasoning text. Always `reasoning_text`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

        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.

      - `Status BetaResponseReasoningItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

        - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

        - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

    - `type BetaResponseCompactionItemParamResp struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `EncryptedContent string`

        The encrypted content of the compaction summary.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `ID string`

        The ID of the compaction item.

      - `Agent BetaResponseCompactionItemParamAgentResp`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseInputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

        The unique ID of the code interpreter tool call.

      - `Code string`

        The code to run, or null if not available.

      - `ContainerID string`

        The ID of the container used to run the code.

      - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

        The outputs generated by the code interpreter, such as logs or images.
        Can be null if no outputs are available.

        - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

            The logs output from the code interpreter.

          - `Type Logs`

            The type of the output. Always `logs`.

            - `const LogsLogs Logs = "logs"`

        - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            The type of the output. Always `image`.

            - `const ImageImage Image = "image"`

          - `URL string`

            The URL of the image output from the code interpreter.

      - `Status BetaResponseCodeInterpreterToolCallStatus`

        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

        - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

        - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        The type of the code interpreter tool call. Always `code_interpreter_call`.

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Agent BetaResponseCodeInterpreterToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemLocalShellCall struct{…}`

      A tool call to run a command on the local shell.

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseInputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseInputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseInputItemShellCall struct{…}`

      A tool representing a request to execute one or more shell commands.

      - `Action BetaResponseInputItemShellCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

          Ordered shell commands for the execution environment to run.

        - `MaxOutputLength int64`

          Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

        - `TimeoutMs int64`

          Maximum wall-clock time in milliseconds to allow the shell commands to run.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemShellCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

        The environment to execute the shell commands in.

        - `type BetaLocalEnvironment struct{…}`

        - `type BetaContainerReference struct{…}`

      - `Status string`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

        - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

        - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

    - `type BetaResponseInputItemShellCallOutput struct{…}`

      The streamed output items emitted by a shell tool call.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `Output []BetaResponseFunctionShellCallOutputContent`

        Captured chunks of stdout and stderr output, along with their associated outcomes.

        - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

          The exit or timeout outcome associated with this shell call.

          - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              The exit code returned by the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          Captured stderr output for the shell call.

        - `Stdout string`

          Captured stdout output for the shell call.

      - `Type ShellCallOutput`

        The type of the item. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `ID string`

        The unique ID of the shell tool call output. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `MaxOutputLength int64`

        The maximum number of UTF-8 characters captured for this shell call's combined output.

      - `Status string`

        The status of the shell call output.

        - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

        - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

    - `type BetaResponseInputItemApplyPatchCall struct{…}`

      A tool call representing a request to create, delete, or update files using diff patches.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

        The specific create, delete, or update instruction for the apply_patch tool call.

        - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

          Instruction for creating a new file via the apply_patch tool.

          - `Diff string`

            Unified diff content to apply when creating the file.

          - `Path string`

            Path of the file to create relative to the workspace root.

          - `Type CreateFile`

            The operation type. Always `create_file`.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

          Instruction for deleting an existing file via the apply_patch tool.

          - `Path string`

            Path of the file to delete relative to the workspace root.

          - `Type DeleteFile`

            The operation type. Always `delete_file`.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

          Instruction for updating an existing file via the apply_patch tool.

          - `Diff string`

            Unified diff content to apply to the existing file.

          - `Path string`

            Path of the file to update relative to the workspace root.

          - `Type UpdateFile`

            The operation type. Always `update_file`.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status string`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

        - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemApplyPatchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

    - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

      The streamed output emitted by an apply patch tool call.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status string`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

        - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `Output string`

        Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

    - `type BetaResponseInputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseInputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseInputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `ID string`

        The unique ID of the approval response

      - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `type BetaResponseInputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseInputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

        - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

        - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

    - `type BetaResponseCustomToolCallOutput struct{…}`

      The output of a custom tool call from your code, being sent back to the model.

      - `CallID string`

        The call ID, used to map this custom tool call output to a custom tool call.

      - `Output BetaResponseCustomToolCallOutputOutputUnion`

        The output from the custom tool call generated by your code.
        Can be a string or an list of output content.

        - `string`

        - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

          Text, image, or file output of the custom tool call.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

      - `Type CustomToolCallOutput`

        The type of the custom tool call output. Always `custom_tool_call_output`.

        - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

      - `ID string`

        The unique ID of the custom tool call output in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

    - `type BetaResponseCustomToolCall struct{…}`

      A call to a custom tool created by the model.

      - `CallID string`

        An identifier used to map this custom tool call to a tool call output.

      - `Input string`

        The input for the custom tool call generated by the model.

      - `Name string`

        The name of the custom tool being called.

      - `Type CustomToolCall`

        The type of the custom tool call. Always `custom_tool_call`.

        - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

      - `ID string`

        The unique ID of the custom tool call in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the custom tool being called.

    - `type BetaResponseInputItemCompactionTrigger struct{…}`

      Compacts the current context. Must be the final input item.

      - `Type CompactionTrigger`

        The type of the item. Always `compaction_trigger`.

        - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

      - `Agent BetaResponseInputItemCompactionTriggerAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemItemReference struct{…}`

      An internal identifier for an item to reference.

      - `ID string`

        The ID of the item to reference.

      - `Agent BetaResponseInputItemItemReferenceAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Type string`

        The type of item to reference. Always `item_reference`.

        - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

    - `type BetaResponseInputItemProgram struct{…}`

      - `ID string`

        The unique ID of this program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The item type. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseInputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of this program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output.

        - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

        - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The item type. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseInputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

  - `ResponseID string`

    The ID of the active response that should receive the input.

  - `Type ResponseInject`

    The event discriminator. Always `response.inject`.

    - `const ResponseInjectResponseInject ResponseInject = "response.inject"`

### Beta Response Inject Failed Event

- `type BetaResponseInjectFailedEvent struct{…}`

  Emitted when injected input could not be committed to a response. The event
  returns the uncommitted raw input so the client can retry it in another
  response when appropriate.

  - `Error BetaResponseInjectFailedEventError`

    Information about why the input was not committed.

    - `Code string`

      A machine-readable error code.

      - `const BetaResponseInjectFailedEventErrorCodeResponseAlreadyCompleted BetaResponseInjectFailedEventErrorCode = "response_already_completed"`

      - `const BetaResponseInjectFailedEventErrorCodeResponseNotFound BetaResponseInjectFailedEventErrorCode = "response_not_found"`

    - `Message string`

      A human-readable description of the error.

  - `Input []BetaResponseInputItemUnion`

    The raw input items that were not committed.

    - `type BetaEasyInputMessage struct{…}`

      A message input to the model with a role indicating instruction following
      hierarchy. Instructions given with the `developer` or `system` role take
      precedence over instructions given with the `user` role. Messages with the
      `assistant` role are presumed to have been generated by the model in previous
      interactions.

      - `Content BetaEasyInputMessageContentUnion`

        Text, image, or audio input to the model, used to generate a response.
        Can also contain previous assistant responses.

        - `string`

        - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

          A list of one or many input items to the model, containing different content
          types.

          - `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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `Detail BetaResponseInputImageDetail`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `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`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `FileID string`

              The ID of the file to be sent to the model.

            - `ImageURL string`

              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

            - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileDetail`

              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`.

              - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

              - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

              - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

            - `FileData string`

              The content of the file to be sent to the model.

            - `FileID string`

              The ID of the file to be sent to the model.

            - `FileURL string`

              The URL of the file to be sent to the model.

            - `Filename string`

              The name of the file to be sent to the model.

            - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Role BetaEasyInputMessageRole`

        The role of the message input. One of `user`, `assistant`, `system`, or
        `developer`.

        - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

        - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

        - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

        - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

      - `Phase BetaEasyInputMessagePhase`

        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.

        - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

        - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

      - `Type BetaEasyInputMessageType`

        The type of the message input. Always `message`.

        - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

    - `type BetaResponseInputItemMessage struct{…}`

      A message input to the model with a role indicating instruction following
      hierarchy. Instructions given with the `developer` or `system` role take
      precedence over instructions given with the `user` role.

      - `Content BetaResponseInputMessageContentList`

        A list of one or many input items to the model, containing different content
        types.

      - `Role string`

        The role of the message input. One of `user`, `system`, or `developer`.

        - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

        - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

        - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

      - `Agent BetaResponseInputItemMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

        - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

        - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

      - `Type string`

        The type of the message input. Always set to `message`.

        - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

    - `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.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

            - `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`.

                - `const FileCitationFileCitation FileCitation = "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`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the web resource.

            - `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`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []BetaResponseOutputTextLogprob`

            - `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`.

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        The role of the output message. Always `assistant`.

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status BetaResponseOutputMessageStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

        - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

        - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        The type of the output message. Always `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseOutputMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Phase BetaResponseOutputMessagePhase`

        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.

        - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

        - `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`.

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Agent BetaResponseFileSearchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Results []BetaResponseFileSearchToolCallResult`

        The results of the file search tool call.

        - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

          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.

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

          The unique ID of the file.

        - `Filename string`

          The name of the file.

        - `Score float64`

          The relevance score of the file - a value between 0 and 1.

        - `Text string`

          The text that was retrieved from the file.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

          The type of the pending safety check.

        - `Message string`

          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.

        - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

        - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

        - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

      - `Type BetaResponseComputerToolCallType`

        The type of the computer call. Always `computer_call`.

        - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

      - `Action BetaComputerActionUnion`

        A click action.

        - `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`.

            - `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`.

            - `const ClickClick Click = "click"`

          - `X int64`

            The x-coordinate where the click occurred.

          - `Y int64`

            The y-coordinate where the click occurred.

          - `Keys []string`

            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`.

            - `const DoubleClickDoubleClick DoubleClick = "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`.

            - `const DragDrag Drag = "drag"`

          - `Keys []string`

            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`.

            - `const KeypressKeypress Keypress = "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`.

            - `const MoveMove Move = "move"`

          - `X int64`

            The x-coordinate to move to.

          - `Y int64`

            The y-coordinate to move to.

          - `Keys []string`

            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`.

            - `const ScreenshotScreenshot Screenshot = "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`.

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

            The x-coordinate where the scroll occurred.

          - `Y int64`

            The y-coordinate where the scroll occurred.

          - `Keys []string`

            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`.

            - `const TypeType Type = "type"`

        - `type BetaComputerActionWait struct{…}`

          A wait action.

          - `Type Wait`

            Specifies the event type. For a wait action, this property is always set to `wait`.

            - `const WaitWait Wait = "wait"`

      - `Actions BetaComputerActionList`

        Flattened batched actions for `computer_use`. Each action includes an
        `type` discriminator and action-specific fields.

        - `type BetaComputerActionClick struct{…}`

          A click action.

        - `type BetaComputerActionDoubleClick struct{…}`

          A double click action.

        - `type BetaComputerActionDrag struct{…}`

          A drag action.

        - `type BetaComputerActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

        - `type BetaComputerActionMove struct{…}`

          A mouse move action.

        - `type BetaComputerActionScreenshot struct{…}`

          A screenshot action.

        - `type BetaComputerActionScroll struct{…}`

          A scroll action.

        - `type BetaComputerActionType struct{…}`

          An action to type in text.

        - `type BetaComputerActionWait struct{…}`

          A wait action.

      - `Agent BetaResponseComputerToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemComputerCallOutput struct{…}`

      The output of a computer tool call.

      - `CallID string`

        The ID of the computer tool call that produced the output.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        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`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

      - `Type ComputerCallOutput`

        The type of the computer tool call output. Always `computer_call_output`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `ID string`

        The ID of the computer tool call output.

      - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

        The safety checks reported by the API that have been acknowledged by the developer.

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseInputItemComputerCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

        - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

        - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `ID string`

        The unique ID of the web search tool call.

      - `Action BetaResponseFunctionWebSearchActionUnion`

        An object describing the specific action taken in this web search call.
        Includes details on how the model used the web (search, open_page, find_in_page).

        - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

          Action type "search" - Performs a web search query.

          - `Type Search`

            The action type.

            - `const SearchSearch Search = "search"`

          - `Queries []string`

            The search queries.

          - `Query string`

            The search query.

          - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

            The sources used in the search.

            - `Type URL`

              The type of source. Always `url`.

              - `const URLURL URL = "url"`

            - `URL string`

              The URL of the source.

        - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

          Action type "open_page" - Opens a specific URL from search results.

          - `Type OpenPage`

            The action type.

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

            The URL opened by the model.

        - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

          Action type "find_in_page": Searches for a pattern within a loaded page.

          - `Pattern string`

            The pattern or text to search for within the page.

          - `Type FindInPage`

            The action type.

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

            The URL of the page searched for the pattern.

      - `Status BetaResponseFunctionWebSearchStatus`

        The status of the web search tool call.

        - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

        - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

        - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

        - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        The type of the web search tool call. Always `web_search_call`.

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `Agent BetaResponseFunctionWebSearchAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

        - `const FunctionCallFunctionCall FunctionCall = "function_call"`

      - `ID string`

        The unique ID of the function tool call.

      - `Agent BetaResponseFunctionToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the function to run.

      - `Status BetaResponseFunctionToolCallStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

        - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

    - `type BetaResponseInputItemFunctionCallOutput struct{…}`

      The output of a function tool call.

      - `CallID string`

        The unique ID of the function tool call generated by the model.

      - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

        Text, image, or file output of the function tool call.

        - `string`

        - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

          An array of content outputs (text, image, file) for the function tool call.

          - `type BetaResponseInputTextContent 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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `Type InputImage`

              The type of the input item. Always `input_image`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `Detail BetaResponseInputImageContentDetail`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

              - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

              - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

              - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

            - `FileID string`

              The ID of the file to be sent to the model.

            - `ImageURL string`

              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

            - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFileContent struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileContentDetail`

              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`.

              - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

              - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

              - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

            - `FileData string`

              The base64-encoded data of the file to be sent to the model.

            - `FileID string`

              The ID of the file to be sent to the model.

            - `FileURL string`

              The URL of the file to be sent to the model.

            - `Filename string`

              The name of the file to be sent to the model.

            - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Type FunctionCallOutput`

        The type of the function tool call output. Always `function_call_output`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `ID string`

        The unique ID of the function tool call output. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemFunctionCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

        - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

        - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

    - `type BetaResponseInputItemAgentMessage struct{…}`

      A message routed between agents.

      - `Author string`

        The sending agent identity.

      - `Content []BetaResponseInputItemAgentMessageContentUnion`

        Plaintext, image, or encrypted content sent between agents.

        - `type BetaResponseInputTextContent struct{…}`

          A text input to the model.

        - `type BetaResponseInputImageContent struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

        - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The item type. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `ID string`

        The unique ID of this agent message item.

      - `Agent BetaResponseInputItemAgentMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemMultiAgentCall struct{…}`

      - `Action string`

        The multi-agent action that was executed.

        - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

        - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

        - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

        - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

        - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

        - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

      - `Arguments string`

        The action arguments as a JSON string.

      - `CallID string`

        The unique ID linking this call to its output.

      - `Type MultiAgentCall`

        The item type. Always `multi_agent_call`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `ID string`

        The unique ID of this multi-agent call.

      - `Agent BetaResponseInputItemMultiAgentCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

      - `Action string`

        The multi-agent action that produced this result.

        - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

        - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

      - `CallID string`

        The unique ID of the multi-agent call.

      - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

        Text output returned by the multi-agent action.

        - `Text string`

          The text content.

        - `Type OutputText`

          The content type. Always `output_text`.

          - `const OutputTextOutputText OutputText = "output_text"`

        - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

          Citations associated with the text content.

          - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

            - `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 citation type. Always `file_citation`.

              - `const FileCitationFileCitation FileCitation = "file_citation"`

          - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

            - `EndIndex int64`

              The index of the last character of the citation in the message.

            - `StartIndex int64`

              The index of the first character of the citation in the message.

            - `Title string`

              The title of the cited resource.

            - `Type URLCitation`

              The citation type. Always `url_citation`.

              - `const URLCitationURLCitation URLCitation = "url_citation"`

            - `URL string`

              The URL of the cited resource.

          - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

            - `ContainerID string`

              The ID of the container.

            - `EndIndex int64`

              The index of the last character of the citation in the message.

            - `FileID string`

              The ID of the container file.

            - `Filename string`

              The filename of the container file cited.

            - `StartIndex int64`

              The index of the first character of the citation in the message.

            - `Type ContainerFileCitation`

              The citation type. Always `container_file_citation`.

              - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

      - `Type MultiAgentCallOutput`

        The item type. Always `multi_agent_call_output`.

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `ID string`

        The unique ID of this multi-agent call output.

      - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemToolSearchCall struct{…}`

      - `Arguments any`

        The arguments supplied to the tool search call.

      - `Type ToolSearchCall`

        The item type. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `ID string`

        The unique ID of this tool search call.

      - `Agent BetaResponseInputItemToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution string`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

        - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

      - `Status string`

        The status of the tool search call.

        - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

        - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

        - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

    - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by the tool search output.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `Name string`

            The name of the function to call.

          - `Parameters map[string, any]`

            A JSON schema object describing the parameters of the function.

          - `Strict bool`

            Whether strict parameter validation is enforced for this function tool.

          - `Type Function`

            The type of the function tool. Always `function`.

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

            - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function is deferred and loaded via tool search.

          - `Description string`

            A description of the function. Used by the model to determine whether or not to call the function.

          - `OutputSchema map[string, any]`

            A JSON schema object describing the JSON value encoded in string outputs for this function.

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `Type FileSearch`

            The type of the file search tool. Always `file_search`.

            - `const FileSearchFileSearch FileSearch = "file_search"`

          - `VectorStoreIDs []string`

            The IDs of the vector stores to search.

          - `Filters BetaFileSearchToolFiltersUnion`

            A filter to apply.

            - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

            - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

              Combine multiple filters using `and` or `or`.

              - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

              - `Type string`

                Type of operation: `and` or `or`.

                - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

          - `MaxNumResults int64`

            The maximum number of results to return. This number should be between 1 and 50 inclusive.

          - `RankingOptions BetaFileSearchToolRankingOptions`

            Ranking options for search.

            - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

              - `EmbeddingWeight float64`

                The weight of the embedding in the reciprocal ranking fusion.

              - `TextWeight float64`

                The weight of the text in the reciprocal ranking fusion.

            - `Ranker string`

              The ranker to use for the file search.

              - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

              - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

            - `ScoreThreshold float64`

              The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `Type Computer`

            The type of the computer tool. Always `computer`.

            - `const ComputerComputer Computer = "computer"`

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `DisplayHeight int64`

            The height of the computer display.

          - `DisplayWidth int64`

            The width of the computer display.

          - `Environment BetaComputerUsePreviewToolEnvironment`

            The type of computer environment to control.

            - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

            - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

            - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

            - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

            - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

          - `Type ComputerUsePreview`

            The type of the computer use tool. Always `computer_use_preview`.

            - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchToolType`

            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

            - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

            - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

          - `Filters BetaWebSearchToolFilters`

            Filters for the search.

            - `AllowedDomains []string`

              Allowed domains for the search. If not provided, all domains are allowed.
              Subdomains of the provided domains are allowed as well.

              Example: `["pubmed.ncbi.nlm.nih.gov"]`

          - `SearchContextSize BetaWebSearchToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

            - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

            - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchToolUserLocation`

            The approximate location of the user.

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `Type string`

              The type of location approximation. Always `approximate`.

              - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `ServerLabel string`

            A label for this MCP server, used to identify it in tool calls.

          - `Type Mcp`

            The type of the MCP tool. Always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

            - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

          - `AllowedTools BetaToolMcpAllowedToolsUnion`

            List of allowed tool names or a filter object.

            - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

              A string array of allowed tool names

            - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `Authorization string`

            An OAuth access token that can be used with a remote MCP server, either
            with a custom MCP server URL or a service connector. Your application
            must handle the OAuth authorization flow and provide the token here.

          - `ConnectorID string`

            Identifier for service connectors, like those available in ChatGPT. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
            about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

            Currently supported `connector_id` values are:

            - Dropbox: `connector_dropbox`
            - Gmail: `connector_gmail`
            - Google Calendar: `connector_googlecalendar`
            - Google Drive: `connector_googledrive`
            - Microsoft Teams: `connector_microsoftteams`
            - Outlook Calendar: `connector_outlookcalendar`
            - Outlook Email: `connector_outlookemail`
            - SharePoint: `connector_sharepoint`

            - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

            - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

            - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

            - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

            - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

            - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

            - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

            - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

          - `DeferLoading bool`

            Whether this MCP tool is deferred and discovered via tool search.

          - `Headers map[string, string]`

            Optional HTTP headers to send to the MCP server. Use for authentication
            or other purposes.

          - `RequireApproval BetaToolMcpRequireApprovalUnion`

            Specify which of the MCP server's tools require approval.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

              Specify which of the MCP server's tools require approval. Can be
              `always`, `never`, or a filter object associated with tools
              that require approval.

              - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

              - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

              Specify a single approval policy for all tools. One of `always` or
              `never`. When set to `always`, all tools will require approval. When
              set to `never`, all tools will not require approval.

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

          - `ServerDescription string`

            Optional description of the MCP server, used to provide more context.

          - `ServerURL string`

            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.

          - `TunnelID string`

            The Secure MCP Tunnel ID to use instead of a direct server URL. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided.

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

          - `Container BetaToolCodeInterpreterContainerUnion`

            The code interpreter container. Can be a container ID or an object that
            specifies uploaded file IDs to make available to your code, along with an
            optional `memory_limit` setting.

            - `string`

            - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

              - `Type Auto`

                Always `auto`.

                - `const AutoAuto Auto = "auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit string`

                The memory limit for the code interpreter container.

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `Type Disabled`

                    Disable outbound network access. Always `disabled`.

                    - `const DisabledDisabled Disabled = "disabled"`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `AllowedDomains []string`

                    A list of allowed domains when type is `allowlist`.

                  - `Type Allowlist`

                    Allow outbound network access only to specified domains. Always `allowlist`.

                    - `const AllowlistAllowlist Allowlist = "allowlist"`

                  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                    Optional domain-scoped secrets for allowlisted domains.

                    - `Domain string`

                      The domain associated with the secret.

                    - `Name string`

                      The name of the secret to inject for the domain.

                    - `Value string`

                      The secret value to inject for the domain.

          - `Type CodeInterpreter`

            The type of the code interpreter tool. Always `code_interpreter`.

            - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

            - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

        - `type BetaToolProgrammaticToolCalling struct{…}`

          - `Type ProgrammaticToolCalling`

            The type of the tool. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

          - `Type ImageGeneration`

            The type of the image generation tool. Always `image_generation`.

            - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

          - `Action string`

            Whether to generate a new image or edit an existing image. Default: `auto`.

            - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

            - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

            - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

          - `Background string`

            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for GPT image models that support
            transparent backgrounds. Must be one of `transparent`, `opaque`, or
            `auto` (default value). When `auto` is used, the model will
            automatically determine the best background for the image.

            `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
            transparent backgrounds. Requests with `background` set to
            `transparent` will return an error for these models; use `opaque` or
            `auto` instead.

            If `transparent`, the output format needs to support transparency,
            so it should be set to either `png` (default value) or `webp`.

            - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

            - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

            - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

          - `InputFidelity string`

            Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

            - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

            - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

          - `InputImageMask BetaToolImageGenerationInputImageMask`

            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).

            - `FileID string`

              File ID for the mask image.

            - `ImageURL string`

              Base64-encoded mask image.

          - `Model string`

            The image generation model to use. Default: `gpt-image-1`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

              - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

              - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

              - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

              - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

              - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

          - `Moderation string`

            Moderation level for the generated image. Default: `auto`.

            - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

            - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

          - `OutputCompression int64`

            Compression level for the output image. Default: 100.

          - `OutputFormat string`

            The output format of the generated image. One of `png`, `webp`, or
            `jpeg`. Default: `png`.

            - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

            - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

            - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

          - `PartialImages int64`

            Number of partial images to generate in streaming mode, from 0 (default value) to 3.

          - `Quality string`

            The quality of the generated image. One of `low`, `medium`, `high`,
            or `auto`. Default: `auto`.

            - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

            - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

            - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

            - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

          - `Size string`

            The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

              - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

              - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

              - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

          - `Type LocalShell`

            The type of the local shell tool. Always `local_shell`.

            - `const LocalShellLocalShell LocalShell = "local_shell"`

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

          - `Type Shell`

            The type of the shell tool. Always `shell`.

            - `const ShellShell Shell = "shell"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

            - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

          - `Environment BetaFunctionShellToolEnvironmentUnion`

            - `type BetaContainerAuto struct{…}`

              - `Type ContainerAuto`

                Automatically creates a container for this request

                - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit BetaContainerAutoMemoryLimit`

                The memory limit for the container.

                - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `Skills []BetaContainerAutoSkillUnion`

                An optional list of skills referenced by id or inline data.

                - `type BetaSkillReference struct{…}`

                  - `SkillID string`

                    The ID of the referenced skill.

                  - `Type SkillReference`

                    References a skill created with the /v1/skills endpoint.

                    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                  - `Version string`

                    Optional skill version. Use a positive integer or 'latest'. Omit for default.

                - `type BetaInlineSkill struct{…}`

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Source BetaInlineSkillSource`

                    Inline skill payload

                    - `Data string`

                      Base64-encoded skill zip bundle.

                    - `MediaType ApplicationZip`

                      The media type of the inline skill payload. Must be `application/zip`.

                      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                    - `Type Base64`

                      The type of the inline skill source. Must be `base64`.

                      - `const Base64Base64 Base64 = "base64"`

                  - `Type Inline`

                    Defines an inline skill for this request.

                    - `const InlineInline Inline = "inline"`

            - `type BetaLocalEnvironment struct{…}`

              - `Type Local`

                Use a local computer environment.

                - `const LocalLocal Local = "local"`

              - `Skills []BetaLocalSkill`

                An optional list of skills.

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Path string`

                  The path to the directory containing the skill.

            - `type BetaContainerReference struct{…}`

              - `ContainerID string`

                The ID of the referenced container.

              - `Type ContainerReference`

                References a container created with the /v1/containers endpoint

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Name string`

            The name of the custom tool, used to identify it in tool calls.

          - `Type Custom`

            The type of the custom tool. Always `custom`.

            - `const CustomCustom Custom = "custom"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

            - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this tool should be deferred and discovered via tool search.

          - `Description string`

            Optional description of the custom tool, used to provide more context.

          - `Format BetaCustomToolFormatUnion`

            The input format for the custom tool. Default is unconstrained text.

            - `type BetaCustomToolFormatText struct{…}`

              Unconstrained free-form text.

              - `Type Text`

                Unconstrained text format. Always `text`.

                - `const TextText Text = "text"`

            - `type BetaCustomToolFormatGrammar struct{…}`

              A grammar defined by the user.

              - `Definition string`

                The grammar definition.

              - `Syntax string`

                The syntax of the grammar definition. One of `lark` or `regex`.

                - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

              - `Type Grammar`

                Grammar format. Always `grammar`.

                - `const GrammarGrammar Grammar = "grammar"`

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

          - `Description string`

            A description of the namespace shown to the model.

          - `Name string`

            The namespace name used in tool calls (for example, `crm`).

          - `Tools []BetaNamespaceToolToolUnion`

            The function/custom tools available inside this namespace.

            - `type BetaNamespaceToolToolFunction struct{…}`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function should be deferred and discovered via tool search.

              - `Description string`

              - `OutputSchema map[string, any]`

                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

              - `Parameters any`

              - `Strict bool`

                Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Type Namespace`

            The type of the tool. Always `namespace`.

            - `const NamespaceNamespace Namespace = "namespace"`

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

          - `Type ToolSearch`

            The type of the tool. Always `tool_search`.

            - `const ToolSearchToolSearch ToolSearch = "tool_search"`

          - `Description string`

            Description shown to the model for a client-executed tool search tool.

          - `Execution BetaToolSearchToolExecution`

            Whether tool search is executed by the server or by the client.

            - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

            - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

          - `Parameters any`

            Parameter schema for a client-executed tool search tool.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchPreviewToolType`

            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

          - `SearchContentTypes []string`

            - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

            - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

          - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

            - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

            - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchPreviewToolUserLocation`

            The user's location.

            - `Type Approximate`

              The type of location approximation. Always `approximate`.

              - `const ApproximateApproximate Approximate = "approximate"`

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ApplyPatch`

            The type of the tool. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

            - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

      - `Type ToolSearchOutput`

        The item type. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `ID string`

        The unique ID of this tool search output.

      - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchOutputItemParamExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

        - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemParamStatus`

        The status of the tool search output.

        - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

    - `type BetaResponseInputItemAdditionalTools struct{…}`

      - `Role Developer`

        The role that provided the additional tools. Only `developer` is supported.

        - `const DeveloperDeveloper Developer = "developer"`

      - `Tools []BetaToolUnion`

        A list of additional tools made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The item type. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `ID string`

        The unique ID of this additional tools item.

      - `Agent BetaResponseInputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

      - `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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        The type of the object. Always `reasoning`.

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Agent BetaResponseReasoningItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Content []BetaResponseReasoningItemContent`

        Reasoning text content.

        - `Text string`

          The reasoning text from the model.

        - `Type ReasoningText`

          The type of the reasoning text. Always `reasoning_text`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

        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.

      - `Status BetaResponseReasoningItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

        - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

        - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

    - `type BetaResponseCompactionItemParamResp struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `EncryptedContent string`

        The encrypted content of the compaction summary.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `ID string`

        The ID of the compaction item.

      - `Agent BetaResponseCompactionItemParamAgentResp`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseInputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

        The unique ID of the code interpreter tool call.

      - `Code string`

        The code to run, or null if not available.

      - `ContainerID string`

        The ID of the container used to run the code.

      - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

        The outputs generated by the code interpreter, such as logs or images.
        Can be null if no outputs are available.

        - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

            The logs output from the code interpreter.

          - `Type Logs`

            The type of the output. Always `logs`.

            - `const LogsLogs Logs = "logs"`

        - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            The type of the output. Always `image`.

            - `const ImageImage Image = "image"`

          - `URL string`

            The URL of the image output from the code interpreter.

      - `Status BetaResponseCodeInterpreterToolCallStatus`

        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

        - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

        - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        The type of the code interpreter tool call. Always `code_interpreter_call`.

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Agent BetaResponseCodeInterpreterToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemLocalShellCall struct{…}`

      A tool call to run a command on the local shell.

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseInputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseInputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseInputItemShellCall struct{…}`

      A tool representing a request to execute one or more shell commands.

      - `Action BetaResponseInputItemShellCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

          Ordered shell commands for the execution environment to run.

        - `MaxOutputLength int64`

          Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

        - `TimeoutMs int64`

          Maximum wall-clock time in milliseconds to allow the shell commands to run.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemShellCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

        The environment to execute the shell commands in.

        - `type BetaLocalEnvironment struct{…}`

        - `type BetaContainerReference struct{…}`

      - `Status string`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

        - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

        - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

    - `type BetaResponseInputItemShellCallOutput struct{…}`

      The streamed output items emitted by a shell tool call.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `Output []BetaResponseFunctionShellCallOutputContent`

        Captured chunks of stdout and stderr output, along with their associated outcomes.

        - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

          The exit or timeout outcome associated with this shell call.

          - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              The exit code returned by the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          Captured stderr output for the shell call.

        - `Stdout string`

          Captured stdout output for the shell call.

      - `Type ShellCallOutput`

        The type of the item. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `ID string`

        The unique ID of the shell tool call output. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `MaxOutputLength int64`

        The maximum number of UTF-8 characters captured for this shell call's combined output.

      - `Status string`

        The status of the shell call output.

        - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

        - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

        - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

    - `type BetaResponseInputItemApplyPatchCall struct{…}`

      A tool call representing a request to create, delete, or update files using diff patches.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

        The specific create, delete, or update instruction for the apply_patch tool call.

        - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

          Instruction for creating a new file via the apply_patch tool.

          - `Diff string`

            Unified diff content to apply when creating the file.

          - `Path string`

            Path of the file to create relative to the workspace root.

          - `Type CreateFile`

            The operation type. Always `create_file`.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

          Instruction for deleting an existing file via the apply_patch tool.

          - `Path string`

            Path of the file to delete relative to the workspace root.

          - `Type DeleteFile`

            The operation type. Always `delete_file`.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

          Instruction for updating an existing file via the apply_patch tool.

          - `Diff string`

            Unified diff content to apply to the existing file.

          - `Path string`

            Path of the file to update relative to the workspace root.

          - `Type UpdateFile`

            The operation type. Always `update_file`.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status string`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

        - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemApplyPatchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

    - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

      The streamed output emitted by an apply patch tool call.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status string`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

        - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `Output string`

        Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

    - `type BetaResponseInputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseInputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseInputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `ID string`

        The unique ID of the approval response

      - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `type BetaResponseInputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseInputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

        - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

        - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

    - `type BetaResponseCustomToolCallOutput struct{…}`

      The output of a custom tool call from your code, being sent back to the model.

      - `CallID string`

        The call ID, used to map this custom tool call output to a custom tool call.

      - `Output BetaResponseCustomToolCallOutputOutputUnion`

        The output from the custom tool call generated by your code.
        Can be a string or an list of output content.

        - `string`

        - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

          Text, image, or file output of the custom tool call.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

      - `Type CustomToolCallOutput`

        The type of the custom tool call output. Always `custom_tool_call_output`.

        - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

      - `ID string`

        The unique ID of the custom tool call output in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

    - `type BetaResponseCustomToolCall struct{…}`

      A call to a custom tool created by the model.

      - `CallID string`

        An identifier used to map this custom tool call to a tool call output.

      - `Input string`

        The input for the custom tool call generated by the model.

      - `Name string`

        The name of the custom tool being called.

      - `Type CustomToolCall`

        The type of the custom tool call. Always `custom_tool_call`.

        - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

      - `ID string`

        The unique ID of the custom tool call in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the custom tool being called.

    - `type BetaResponseInputItemCompactionTrigger struct{…}`

      Compacts the current context. Must be the final input item.

      - `Type CompactionTrigger`

        The type of the item. Always `compaction_trigger`.

        - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

      - `Agent BetaResponseInputItemCompactionTriggerAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemItemReference struct{…}`

      An internal identifier for an item to reference.

      - `ID string`

        The ID of the item to reference.

      - `Agent BetaResponseInputItemItemReferenceAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Type string`

        The type of item to reference. Always `item_reference`.

        - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

    - `type BetaResponseInputItemProgram struct{…}`

      - `ID string`

        The unique ID of this program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The item type. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseInputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseInputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of this program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output.

        - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

        - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The item type. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseInputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

  - `ResponseID string`

    The ID of the response that rejected the input.

  - `SequenceNumber int64`

    The sequence number for this event.

  - `Type ResponseInjectFailed`

    The event discriminator. Always `response.inject.failed`.

    - `const ResponseInjectFailedResponseInjectFailed ResponseInjectFailed = "response.inject.failed"`

  - `StreamID string`

    The multiplexed WebSocket stream that emitted the event. This field is
    present only when WebSocket multiplexing is enabled separately.

### Beta Response Input

- `type BetaResponseInput []BetaResponseInputItemUnion`

  A list of one or many input items to the model, containing
  different content types.

  - `type BetaEasyInputMessage struct{…}`

    A message input to the model with a role indicating instruction following
    hierarchy. Instructions given with the `developer` or `system` role take
    precedence over instructions given with the `user` role. Messages with the
    `assistant` role are presumed to have been generated by the model in previous
    interactions.

    - `Content BetaEasyInputMessageContentUnion`

      Text, image, or audio input to the model, used to generate a response.
      Can also contain previous assistant responses.

      - `string`

      - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

        A list of one or many input items to the model, containing different content
        types.

        - `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`.

            - `const InputTextInputText InputText = "input_text"`

          - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `Detail BetaResponseInputImageDetail`

            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

            - `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`.

            - `const InputImageInputImage InputImage = "input_image"`

          - `FileID string`

            The ID of the file to be sent to the model.

          - `ImageURL string`

            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

          - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

          - `Type InputFile`

            The type of the input item. Always `input_file`.

            - `const InputFileInputFile InputFile = "input_file"`

          - `Detail BetaResponseInputFileDetail`

            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`.

            - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

            - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

            - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

          - `FileData string`

            The content of the file to be sent to the model.

          - `FileID string`

            The ID of the file to be sent to the model.

          - `FileURL string`

            The URL of the file to be sent to the model.

          - `Filename string`

            The name of the file to be sent to the model.

          - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

    - `Role BetaEasyInputMessageRole`

      The role of the message input. One of `user`, `assistant`, `system`, or
      `developer`.

      - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

      - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

      - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

      - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

    - `Phase BetaEasyInputMessagePhase`

      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.

      - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

      - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

    - `Type BetaEasyInputMessageType`

      The type of the message input. Always `message`.

      - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

  - `type BetaResponseInputItemMessage struct{…}`

    A message input to the model with a role indicating instruction following
    hierarchy. Instructions given with the `developer` or `system` role take
    precedence over instructions given with the `user` role.

    - `Content BetaResponseInputMessageContentList`

      A list of one or many input items to the model, containing different content
      types.

    - `Role string`

      The role of the message input. One of `user`, `system`, or `developer`.

      - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

      - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

      - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

    - `Agent BetaResponseInputItemMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

      - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

      - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

    - `Type string`

      The type of the message input. Always set to `message`.

      - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

  - `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.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

          - `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`.

              - `const FileCitationFileCitation FileCitation = "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`.

              - `const URLCitationURLCitation URLCitation = "url_citation"`

            - `URL string`

              The URL of the web resource.

          - `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`.

              - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

              - `const FilePathFilePath FilePath = "file_path"`

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

          - `const OutputTextOutputText OutputText = "output_text"`

        - `Logprobs []BetaResponseOutputTextLogprob`

          - `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`.

          - `const RefusalRefusal Refusal = "refusal"`

    - `Role Assistant`

      The role of the output message. Always `assistant`.

      - `const AssistantAssistant Assistant = "assistant"`

    - `Status BetaResponseOutputMessageStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

      - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

      - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

    - `Type Message`

      The type of the output message. Always `message`.

      - `const MessageMessage Message = "message"`

    - `Agent BetaResponseOutputMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Phase BetaResponseOutputMessagePhase`

      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.

      - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

      - `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`.

      - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

    - `Agent BetaResponseFileSearchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Results []BetaResponseFileSearchToolCallResult`

      The results of the file search tool call.

      - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

        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.

        - `string`

        - `float64`

        - `bool`

      - `FileID string`

        The unique ID of the file.

      - `Filename string`

        The name of the file.

      - `Score float64`

        The relevance score of the file - a value between 0 and 1.

      - `Text string`

        The text that was retrieved from the file.

  - `type BetaResponseComputerToolCall struct{…}`

    A tool call to a computer use tool. See the
    [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

        The type of the pending safety check.

      - `Message string`

        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.

      - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

      - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

      - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

    - `Type BetaResponseComputerToolCallType`

      The type of the computer call. Always `computer_call`.

      - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

    - `Action BetaComputerActionUnion`

      A click action.

      - `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`.

          - `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`.

          - `const ClickClick Click = "click"`

        - `X int64`

          The x-coordinate where the click occurred.

        - `Y int64`

          The y-coordinate where the click occurred.

        - `Keys []string`

          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`.

          - `const DoubleClickDoubleClick DoubleClick = "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`.

          - `const DragDrag Drag = "drag"`

        - `Keys []string`

          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`.

          - `const KeypressKeypress Keypress = "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`.

          - `const MoveMove Move = "move"`

        - `X int64`

          The x-coordinate to move to.

        - `Y int64`

          The y-coordinate to move to.

        - `Keys []string`

          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`.

          - `const ScreenshotScreenshot Screenshot = "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`.

          - `const ScrollScroll Scroll = "scroll"`

        - `X int64`

          The x-coordinate where the scroll occurred.

        - `Y int64`

          The y-coordinate where the scroll occurred.

        - `Keys []string`

          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`.

          - `const TypeType Type = "type"`

      - `type BetaComputerActionWait struct{…}`

        A wait action.

        - `Type Wait`

          Specifies the event type. For a wait action, this property is always set to `wait`.

          - `const WaitWait Wait = "wait"`

    - `Actions BetaComputerActionList`

      Flattened batched actions for `computer_use`. Each action includes an
      `type` discriminator and action-specific fields.

      - `type BetaComputerActionClick struct{…}`

        A click action.

      - `type BetaComputerActionDoubleClick struct{…}`

        A double click action.

      - `type BetaComputerActionDrag struct{…}`

        A drag action.

      - `type BetaComputerActionKeypress struct{…}`

        A collection of keypresses the model would like to perform.

      - `type BetaComputerActionMove struct{…}`

        A mouse move action.

      - `type BetaComputerActionScreenshot struct{…}`

        A screenshot action.

      - `type BetaComputerActionScroll struct{…}`

        A scroll action.

      - `type BetaComputerActionType struct{…}`

        An action to type in text.

      - `type BetaComputerActionWait struct{…}`

        A wait action.

    - `Agent BetaResponseComputerToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemComputerCallOutput struct{…}`

    The output of a computer tool call.

    - `CallID string`

      The ID of the computer tool call that produced the output.

    - `Output BetaResponseComputerToolCallOutputScreenshot`

      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`.

        - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

      - `FileID string`

        The identifier of an uploaded file that contains the screenshot.

      - `ImageURL string`

        The URL of the screenshot image.

    - `Type ComputerCallOutput`

      The type of the computer tool call output. Always `computer_call_output`.

      - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

    - `ID string`

      The ID of the computer tool call output.

    - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

      The safety checks reported by the API that have been acknowledged by the developer.

      - `ID string`

        The ID of the pending safety check.

      - `Code string`

        The type of the pending safety check.

      - `Message string`

        Details about the pending safety check.

    - `Agent BetaResponseInputItemComputerCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

      - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

      - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

  - `type BetaResponseFunctionWebSearch struct{…}`

    The results of a web search tool call. See the
    [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `ID string`

      The unique ID of the web search tool call.

    - `Action BetaResponseFunctionWebSearchActionUnion`

      An object describing the specific action taken in this web search call.
      Includes details on how the model used the web (search, open_page, find_in_page).

      - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

        Action type "search" - Performs a web search query.

        - `Type Search`

          The action type.

          - `const SearchSearch Search = "search"`

        - `Queries []string`

          The search queries.

        - `Query string`

          The search query.

        - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

          The sources used in the search.

          - `Type URL`

            The type of source. Always `url`.

            - `const URLURL URL = "url"`

          - `URL string`

            The URL of the source.

      - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

        Action type "open_page" - Opens a specific URL from search results.

        - `Type OpenPage`

          The action type.

          - `const OpenPageOpenPage OpenPage = "open_page"`

        - `URL string`

          The URL opened by the model.

      - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

        Action type "find_in_page": Searches for a pattern within a loaded page.

        - `Pattern string`

          The pattern or text to search for within the page.

        - `Type FindInPage`

          The action type.

          - `const FindInPageFindInPage FindInPage = "find_in_page"`

        - `URL string`

          The URL of the page searched for the pattern.

    - `Status BetaResponseFunctionWebSearchStatus`

      The status of the web search tool call.

      - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

      - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

      - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

      - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

    - `Type WebSearchCall`

      The type of the web search tool call. Always `web_search_call`.

      - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

    - `Agent BetaResponseFunctionWebSearchAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionToolCall struct{…}`

    A tool call to run a function. See the
    [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

      - `const FunctionCallFunctionCall FunctionCall = "function_call"`

    - `ID string`

      The unique ID of the function tool call.

    - `Agent BetaResponseFunctionToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `Namespace string`

      The namespace of the function to run.

    - `Status BetaResponseFunctionToolCallStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

      - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

      - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

  - `type BetaResponseInputItemFunctionCallOutput struct{…}`

    The output of a function tool call.

    - `CallID string`

      The unique ID of the function tool call generated by the model.

    - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

      Text, image, or file output of the function tool call.

      - `string`

      - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

        An array of content outputs (text, image, file) for the function tool call.

        - `type BetaResponseInputTextContent 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`.

            - `const InputTextInputText InputText = "input_text"`

          - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputImageContent struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `Type InputImage`

            The type of the input item. Always `input_image`.

            - `const InputImageInputImage InputImage = "input_image"`

          - `Detail BetaResponseInputImageContentDetail`

            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

            - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

            - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

            - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

            - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

          - `FileID string`

            The ID of the file to be sent to the model.

          - `ImageURL string`

            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

          - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFileContent struct{…}`

          A file input to the model.

          - `Type InputFile`

            The type of the input item. Always `input_file`.

            - `const InputFileInputFile InputFile = "input_file"`

          - `Detail BetaResponseInputFileContentDetail`

            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`.

            - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

            - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

            - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

          - `FileData string`

            The base64-encoded data of the file to be sent to the model.

          - `FileID string`

            The ID of the file to be sent to the model.

          - `FileURL string`

            The URL of the file to be sent to the model.

          - `Filename string`

            The name of the file to be sent to the model.

          - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

    - `Type FunctionCallOutput`

      The type of the function tool call output. Always `function_call_output`.

      - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

    - `ID string`

      The unique ID of the function tool call output. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemFunctionCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

      - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

      - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

  - `type BetaResponseInputItemAgentMessage struct{…}`

    A message routed between agents.

    - `Author string`

      The sending agent identity.

    - `Content []BetaResponseInputItemAgentMessageContentUnion`

      Plaintext, image, or encrypted content sent between agents.

      - `type BetaResponseInputTextContent struct{…}`

        A text input to the model.

      - `type BetaResponseInputImageContent struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

      - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

          - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

    - `Recipient string`

      The destination agent identity.

    - `Type AgentMessage`

      The item type. Always `agent_message`.

      - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

    - `ID string`

      The unique ID of this agent message item.

    - `Agent BetaResponseInputItemAgentMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemMultiAgentCall struct{…}`

    - `Action string`

      The multi-agent action that was executed.

      - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

      - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

      - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

      - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

      - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

      - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

    - `Arguments string`

      The action arguments as a JSON string.

    - `CallID string`

      The unique ID linking this call to its output.

    - `Type MultiAgentCall`

      The item type. Always `multi_agent_call`.

      - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

    - `ID string`

      The unique ID of this multi-agent call.

    - `Agent BetaResponseInputItemMultiAgentCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

    - `Action string`

      The multi-agent action that produced this result.

      - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

    - `CallID string`

      The unique ID of the multi-agent call.

    - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

      Text output returned by the multi-agent action.

      - `Text string`

        The text content.

      - `Type OutputText`

        The content type. Always `output_text`.

        - `const OutputTextOutputText OutputText = "output_text"`

      - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

        Citations associated with the text content.

        - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

          - `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 citation type. Always `file_citation`.

            - `const FileCitationFileCitation FileCitation = "file_citation"`

        - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

          - `EndIndex int64`

            The index of the last character of the citation in the message.

          - `StartIndex int64`

            The index of the first character of the citation in the message.

          - `Title string`

            The title of the cited resource.

          - `Type URLCitation`

            The citation type. Always `url_citation`.

            - `const URLCitationURLCitation URLCitation = "url_citation"`

          - `URL string`

            The URL of the cited resource.

        - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

          - `ContainerID string`

            The ID of the container.

          - `EndIndex int64`

            The index of the last character of the citation in the message.

          - `FileID string`

            The ID of the container file.

          - `Filename string`

            The filename of the container file cited.

          - `StartIndex int64`

            The index of the first character of the citation in the message.

          - `Type ContainerFileCitation`

            The citation type. Always `container_file_citation`.

            - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

    - `Type MultiAgentCallOutput`

      The item type. Always `multi_agent_call_output`.

      - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

    - `ID string`

      The unique ID of this multi-agent call output.

    - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemToolSearchCall struct{…}`

    - `Arguments any`

      The arguments supplied to the tool search call.

    - `Type ToolSearchCall`

      The item type. Always `tool_search_call`.

      - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

    - `ID string`

      The unique ID of this tool search call.

    - `Agent BetaResponseInputItemToolSearchCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution string`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

      - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

    - `Status string`

      The status of the tool search call.

      - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

      - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

      - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

  - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

    - `Tools []BetaToolUnion`

      The loaded tool definitions returned by the tool search output.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `Name string`

          The name of the function to call.

        - `Parameters map[string, any]`

          A JSON schema object describing the parameters of the function.

        - `Strict bool`

          Whether strict parameter validation is enforced for this function tool.

        - `Type Function`

          The type of the function tool. Always `function`.

          - `const FunctionFunction Function = "function"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

          - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this function is deferred and loaded via tool search.

        - `Description string`

          A description of the function. Used by the model to determine whether or not to call the function.

        - `OutputSchema map[string, any]`

          A JSON schema object describing the JSON value encoded in string outputs for this function.

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `Type FileSearch`

          The type of the file search tool. Always `file_search`.

          - `const FileSearchFileSearch FileSearch = "file_search"`

        - `VectorStoreIDs []string`

          The IDs of the vector stores to search.

        - `Filters BetaFileSearchToolFiltersUnion`

          A filter to apply.

          - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

            A filter used to compare a specified attribute key to a given value using a defined comparison operation.

            - `Key string`

              The key to compare against the value.

            - `Type string`

              Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

              - `eq`: equals
              - `ne`: not equal
              - `gt`: greater than
              - `gte`: greater than or equal
              - `lt`: less than
              - `lte`: less than or equal
              - `in`: in
              - `nin`: not in

              - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

            - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

              The value to compare against the attribute key; supports string, number, or boolean types.

              - `string`

              - `float64`

              - `bool`

              - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                - `string`

                - `float64`

          - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

            Combine multiple filters using `and` or `or`.

            - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

              Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

              - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

            - `Type string`

              Type of operation: `and` or `or`.

              - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

              - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

        - `MaxNumResults int64`

          The maximum number of results to return. This number should be between 1 and 50 inclusive.

        - `RankingOptions BetaFileSearchToolRankingOptions`

          Ranking options for search.

          - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

            Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

            - `EmbeddingWeight float64`

              The weight of the embedding in the reciprocal ranking fusion.

            - `TextWeight float64`

              The weight of the text in the reciprocal ranking fusion.

          - `Ranker string`

            The ranker to use for the file search.

            - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

            - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

          - `ScoreThreshold float64`

            The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `Type Computer`

          The type of the computer tool. Always `computer`.

          - `const ComputerComputer Computer = "computer"`

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `DisplayHeight int64`

          The height of the computer display.

        - `DisplayWidth int64`

          The width of the computer display.

        - `Environment BetaComputerUsePreviewToolEnvironment`

          The type of computer environment to control.

          - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

          - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

          - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

          - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

          - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

        - `Type ComputerUsePreview`

          The type of the computer use tool. Always `computer_use_preview`.

          - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchToolType`

          The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

          - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

          - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

        - `Filters BetaWebSearchToolFilters`

          Filters for the search.

          - `AllowedDomains []string`

            Allowed domains for the search. If not provided, all domains are allowed.
            Subdomains of the provided domains are allowed as well.

            Example: `["pubmed.ncbi.nlm.nih.gov"]`

        - `SearchContextSize BetaWebSearchToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

          - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

          - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchToolUserLocation`

          The approximate location of the user.

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `Type string`

            The type of location approximation. Always `approximate`.

            - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `ServerLabel string`

          A label for this MCP server, used to identify it in tool calls.

        - `Type Mcp`

          The type of the MCP tool. Always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

          - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

        - `AllowedTools BetaToolMcpAllowedToolsUnion`

          List of allowed tool names or a filter object.

          - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

            A string array of allowed tool names

          - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

        - `Authorization string`

          An OAuth access token that can be used with a remote MCP server, either
          with a custom MCP server URL or a service connector. Your application
          must handle the OAuth authorization flow and provide the token here.

        - `ConnectorID string`

          Identifier for service connectors, like those available in ChatGPT. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
          about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

          Currently supported `connector_id` values are:

          - Dropbox: `connector_dropbox`
          - Gmail: `connector_gmail`
          - Google Calendar: `connector_googlecalendar`
          - Google Drive: `connector_googledrive`
          - Microsoft Teams: `connector_microsoftteams`
          - Outlook Calendar: `connector_outlookcalendar`
          - Outlook Email: `connector_outlookemail`
          - SharePoint: `connector_sharepoint`

          - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

          - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

          - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

          - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

          - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

          - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

          - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

          - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

        - `DeferLoading bool`

          Whether this MCP tool is deferred and discovered via tool search.

        - `Headers map[string, string]`

          Optional HTTP headers to send to the MCP server. Use for authentication
          or other purposes.

        - `RequireApproval BetaToolMcpRequireApprovalUnion`

          Specify which of the MCP server's tools require approval.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

            Specify which of the MCP server's tools require approval. Can be
            `always`, `never`, or a filter object associated with tools
            that require approval.

            - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

            - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

            Specify a single approval policy for all tools. One of `always` or
            `never`. When set to `always`, all tools will require approval. When
            set to `never`, all tools will not require approval.

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

        - `ServerDescription string`

          Optional description of the MCP server, used to provide more context.

        - `ServerURL string`

          The URL for the MCP server. One of `server_url`, `connector_id`, or
          `tunnel_id` must be provided.

        - `TunnelID string`

          The Secure MCP Tunnel ID to use instead of a direct server URL. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided.

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

        - `Container BetaToolCodeInterpreterContainerUnion`

          The code interpreter container. Can be a container ID or an object that
          specifies uploaded file IDs to make available to your code, along with an
          optional `memory_limit` setting.

          - `string`

          - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

            Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

            - `Type Auto`

              Always `auto`.

              - `const AutoAuto Auto = "auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit string`

              The memory limit for the code interpreter container.

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `Type Disabled`

                  Disable outbound network access. Always `disabled`.

                  - `const DisabledDisabled Disabled = "disabled"`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `AllowedDomains []string`

                  A list of allowed domains when type is `allowlist`.

                - `Type Allowlist`

                  Allow outbound network access only to specified domains. Always `allowlist`.

                  - `const AllowlistAllowlist Allowlist = "allowlist"`

                - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                  Optional domain-scoped secrets for allowlisted domains.

                  - `Domain string`

                    The domain associated with the secret.

                  - `Name string`

                    The name of the secret to inject for the domain.

                  - `Value string`

                    The secret value to inject for the domain.

        - `Type CodeInterpreter`

          The type of the code interpreter tool. Always `code_interpreter`.

          - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

          - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

      - `type BetaToolProgrammaticToolCalling struct{…}`

        - `Type ProgrammaticToolCalling`

          The type of the tool. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

        - `Type ImageGeneration`

          The type of the image generation tool. Always `image_generation`.

          - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

        - `Action string`

          Whether to generate a new image or edit an existing image. Default: `auto`.

          - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

          - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

          - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

        - `Background string`

          Allows to set transparency for the background of the generated image(s).
          This parameter is only supported for GPT image models that support
          transparent backgrounds. Must be one of `transparent`, `opaque`, or
          `auto` (default value). When `auto` is used, the model will
          automatically determine the best background for the image.

          `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
          transparent backgrounds. Requests with `background` set to
          `transparent` will return an error for these models; use `opaque` or
          `auto` instead.

          If `transparent`, the output format needs to support transparency,
          so it should be set to either `png` (default value) or `webp`.

          - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

          - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

          - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

        - `InputFidelity string`

          Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

          - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

          - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

        - `InputImageMask BetaToolImageGenerationInputImageMask`

          Optional mask for inpainting. Contains `image_url`
          (string, optional) and `file_id` (string, optional).

          - `FileID string`

            File ID for the mask image.

          - `ImageURL string`

            Base64-encoded mask image.

        - `Model string`

          The image generation model to use. Default: `gpt-image-1`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

            - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

            - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

            - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

            - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

            - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

        - `Moderation string`

          Moderation level for the generated image. Default: `auto`.

          - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

          - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

        - `OutputCompression int64`

          Compression level for the output image. Default: 100.

        - `OutputFormat string`

          The output format of the generated image. One of `png`, `webp`, or
          `jpeg`. Default: `png`.

          - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

          - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

          - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

        - `PartialImages int64`

          Number of partial images to generate in streaming mode, from 0 (default value) to 3.

        - `Quality string`

          The quality of the generated image. One of `low`, `medium`, `high`,
          or `auto`. Default: `auto`.

          - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

          - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

          - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

          - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

        - `Size string`

          The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

            - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

            - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

            - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

        - `Type LocalShell`

          The type of the local shell tool. Always `local_shell`.

          - `const LocalShellLocalShell LocalShell = "local_shell"`

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

        - `Type Shell`

          The type of the shell tool. Always `shell`.

          - `const ShellShell Shell = "shell"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

          - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

        - `Environment BetaFunctionShellToolEnvironmentUnion`

          - `type BetaContainerAuto struct{…}`

            - `Type ContainerAuto`

              Automatically creates a container for this request

              - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit BetaContainerAutoMemoryLimit`

              The memory limit for the container.

              - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

              - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

              - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

              - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

            - `Skills []BetaContainerAutoSkillUnion`

              An optional list of skills referenced by id or inline data.

              - `type BetaSkillReference struct{…}`

                - `SkillID string`

                  The ID of the referenced skill.

                - `Type SkillReference`

                  References a skill created with the /v1/skills endpoint.

                  - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                - `Version string`

                  Optional skill version. Use a positive integer or 'latest'. Omit for default.

              - `type BetaInlineSkill struct{…}`

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Source BetaInlineSkillSource`

                  Inline skill payload

                  - `Data string`

                    Base64-encoded skill zip bundle.

                  - `MediaType ApplicationZip`

                    The media type of the inline skill payload. Must be `application/zip`.

                    - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                  - `Type Base64`

                    The type of the inline skill source. Must be `base64`.

                    - `const Base64Base64 Base64 = "base64"`

                - `Type Inline`

                  Defines an inline skill for this request.

                  - `const InlineInline Inline = "inline"`

          - `type BetaLocalEnvironment struct{…}`

            - `Type Local`

              Use a local computer environment.

              - `const LocalLocal Local = "local"`

            - `Skills []BetaLocalSkill`

              An optional list of skills.

              - `Description string`

                The description of the skill.

              - `Name string`

                The name of the skill.

              - `Path string`

                The path to the directory containing the skill.

          - `type BetaContainerReference struct{…}`

            - `ContainerID string`

              The ID of the referenced container.

            - `Type ContainerReference`

              References a container created with the /v1/containers endpoint

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Name string`

          The name of the custom tool, used to identify it in tool calls.

        - `Type Custom`

          The type of the custom tool. Always `custom`.

          - `const CustomCustom Custom = "custom"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

          - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this tool should be deferred and discovered via tool search.

        - `Description string`

          Optional description of the custom tool, used to provide more context.

        - `Format BetaCustomToolFormatUnion`

          The input format for the custom tool. Default is unconstrained text.

          - `type BetaCustomToolFormatText struct{…}`

            Unconstrained free-form text.

            - `Type Text`

              Unconstrained text format. Always `text`.

              - `const TextText Text = "text"`

          - `type BetaCustomToolFormatGrammar struct{…}`

            A grammar defined by the user.

            - `Definition string`

              The grammar definition.

            - `Syntax string`

              The syntax of the grammar definition. One of `lark` or `regex`.

              - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

              - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

            - `Type Grammar`

              Grammar format. Always `grammar`.

              - `const GrammarGrammar Grammar = "grammar"`

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

        - `Description string`

          A description of the namespace shown to the model.

        - `Name string`

          The namespace name used in tool calls (for example, `crm`).

        - `Tools []BetaNamespaceToolToolUnion`

          The function/custom tools available inside this namespace.

          - `type BetaNamespaceToolToolFunction struct{…}`

            - `Name string`

            - `Type Function`

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

              - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function should be deferred and discovered via tool search.

            - `Description string`

            - `OutputSchema map[string, any]`

              A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

            - `Parameters any`

            - `Strict bool`

              Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Type Namespace`

          The type of the tool. Always `namespace`.

          - `const NamespaceNamespace Namespace = "namespace"`

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

        - `Type ToolSearch`

          The type of the tool. Always `tool_search`.

          - `const ToolSearchToolSearch ToolSearch = "tool_search"`

        - `Description string`

          Description shown to the model for a client-executed tool search tool.

        - `Execution BetaToolSearchToolExecution`

          Whether tool search is executed by the server or by the client.

          - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

          - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

        - `Parameters any`

          Parameter schema for a client-executed tool search tool.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchPreviewToolType`

          The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

        - `SearchContentTypes []string`

          - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

          - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

        - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

          - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

          - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchPreviewToolUserLocation`

          The user's location.

          - `Type Approximate`

            The type of location approximation. Always `approximate`.

            - `const ApproximateApproximate Approximate = "approximate"`

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ApplyPatch`

          The type of the tool. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

          - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

    - `Type ToolSearchOutput`

      The item type. Always `tool_search_output`.

      - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

    - `ID string`

      The unique ID of this tool search output.

    - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchOutputItemParamExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

      - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

    - `Status BetaResponseToolSearchOutputItemParamStatus`

      The status of the tool search output.

      - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

      - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

      - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

  - `type BetaResponseInputItemAdditionalTools struct{…}`

    - `Role Developer`

      The role that provided the additional tools. Only `developer` is supported.

      - `const DeveloperDeveloper Developer = "developer"`

    - `Tools []BetaToolUnion`

      A list of additional tools made available at this item.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `Type AdditionalTools`

      The item type. Always `additional_tools`.

      - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

    - `ID string`

      The unique ID of this additional tools item.

    - `Agent BetaResponseInputItemAdditionalToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

    - `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`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `Type Reasoning`

      The type of the object. Always `reasoning`.

      - `const ReasoningReasoning Reasoning = "reasoning"`

    - `Agent BetaResponseReasoningItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Content []BetaResponseReasoningItemContent`

      Reasoning text content.

      - `Text string`

        The reasoning text from the model.

      - `Type ReasoningText`

        The type of the reasoning text. Always `reasoning_text`.

        - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `EncryptedContent string`

      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.

    - `Status BetaResponseReasoningItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

      - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

      - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

  - `type BetaResponseCompactionItemParamResp struct{…}`

    A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

    - `EncryptedContent string`

      The encrypted content of the compaction summary.

    - `Type Compaction`

      The type of the item. Always `compaction`.

      - `const CompactionCompaction Compaction = "compaction"`

    - `ID string`

      The ID of the compaction item.

    - `Agent BetaResponseCompactionItemParamAgentResp`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemImageGenerationCall struct{…}`

    An image generation request made by the model.

    - `ID string`

      The unique ID of the image generation call.

    - `Result string`

      The generated image encoded in base64.

    - `Status string`

      The status of the image generation call.

      - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

      - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

      - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

      - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

    - `Type ImageGenerationCall`

      The type of the image generation call. Always `image_generation_call`.

      - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

    - `Agent BetaResponseInputItemImageGenerationCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterToolCall struct{…}`

    A tool call to run code.

    - `ID string`

      The unique ID of the code interpreter tool call.

    - `Code string`

      The code to run, or null if not available.

    - `ContainerID string`

      The ID of the container used to run the code.

    - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

      The outputs generated by the code interpreter, such as logs or images.
      Can be null if no outputs are available.

      - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

        The logs output from the code interpreter.

        - `Logs string`

          The logs output from the code interpreter.

        - `Type Logs`

          The type of the output. Always `logs`.

          - `const LogsLogs Logs = "logs"`

      - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

        The image output from the code interpreter.

        - `Type Image`

          The type of the output. Always `image`.

          - `const ImageImage Image = "image"`

        - `URL string`

          The URL of the image output from the code interpreter.

    - `Status BetaResponseCodeInterpreterToolCallStatus`

      The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

      - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

      - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

      - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

      - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

      - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

    - `Type CodeInterpreterCall`

      The type of the code interpreter tool call. Always `code_interpreter_call`.

      - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

    - `Agent BetaResponseCodeInterpreterToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemLocalShellCall struct{…}`

    A tool call to run a command on the local shell.

    - `ID string`

      The unique ID of the local shell call.

    - `Action BetaResponseInputItemLocalShellCallAction`

      Execute a shell command on the server.

      - `Command []string`

        The command to run.

      - `Env map[string, string]`

        Environment variables to set for the command.

      - `Type Exec`

        The type of the local shell action. Always `exec`.

        - `const ExecExec Exec = "exec"`

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the command.

      - `User string`

        Optional user to run the command as.

      - `WorkingDirectory string`

        Optional working directory to run the command in.

    - `CallID string`

      The unique ID of the local shell tool call generated by the model.

    - `Status string`

      The status of the local shell call.

      - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

      - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

      - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

    - `Type LocalShellCall`

      The type of the local shell call. Always `local_shell_call`.

      - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

    - `Agent BetaResponseInputItemLocalShellCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

    The output of a local shell tool call.

    - `ID string`

      The unique ID of the local shell tool call generated by the model.

    - `Output string`

      A JSON string of the output of the local shell tool call.

    - `Type LocalShellCallOutput`

      The type of the local shell tool call output. Always `local_shell_call_output`.

      - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

    - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

      - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

  - `type BetaResponseInputItemShellCall struct{…}`

    A tool representing a request to execute one or more shell commands.

    - `Action BetaResponseInputItemShellCallAction`

      The shell commands and limits that describe how to run the tool call.

      - `Commands []string`

        Ordered shell commands for the execution environment to run.

      - `MaxOutputLength int64`

        Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

      - `TimeoutMs int64`

        Maximum wall-clock time in milliseconds to allow the shell commands to run.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `Type ShellCall`

      The type of the item. Always `shell_call`.

      - `const ShellCallShellCall ShellCall = "shell_call"`

    - `ID string`

      The unique ID of the shell tool call. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemShellCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemShellCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

      The environment to execute the shell commands in.

      - `type BetaLocalEnvironment struct{…}`

      - `type BetaContainerReference struct{…}`

    - `Status string`

      The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

      - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

      - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

  - `type BetaResponseInputItemShellCallOutput struct{…}`

    The streamed output items emitted by a shell tool call.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `Output []BetaResponseFunctionShellCallOutputContent`

      Captured chunks of stdout and stderr output, along with their associated outcomes.

      - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

        The exit or timeout outcome associated with this shell call.

        - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

          Indicates that the shell call exceeded its configured time limit.

          - `Type Timeout`

            The outcome type. Always `timeout`.

            - `const TimeoutTimeout Timeout = "timeout"`

        - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

          Indicates that the shell commands finished and returned an exit code.

          - `ExitCode int64`

            The exit code returned by the shell process.

          - `Type Exit`

            The outcome type. Always `exit`.

            - `const ExitExit Exit = "exit"`

      - `Stderr string`

        Captured stderr output for the shell call.

      - `Stdout string`

        Captured stdout output for the shell call.

    - `Type ShellCallOutput`

      The type of the item. Always `shell_call_output`.

      - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

    - `ID string`

      The unique ID of the shell tool call output. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemShellCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `MaxOutputLength int64`

      The maximum number of UTF-8 characters captured for this shell call's combined output.

    - `Status string`

      The status of the shell call output.

      - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

      - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

  - `type BetaResponseInputItemApplyPatchCall struct{…}`

    A tool call representing a request to create, delete, or update files using diff patches.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

      The specific create, delete, or update instruction for the apply_patch tool call.

      - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

        Instruction for creating a new file via the apply_patch tool.

        - `Diff string`

          Unified diff content to apply when creating the file.

        - `Path string`

          Path of the file to create relative to the workspace root.

        - `Type CreateFile`

          The operation type. Always `create_file`.

          - `const CreateFileCreateFile CreateFile = "create_file"`

      - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

        Instruction for deleting an existing file via the apply_patch tool.

        - `Path string`

          Path of the file to delete relative to the workspace root.

        - `Type DeleteFile`

          The operation type. Always `delete_file`.

          - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

      - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

        Instruction for updating an existing file via the apply_patch tool.

        - `Diff string`

          Unified diff content to apply to the existing file.

        - `Path string`

          Path of the file to update relative to the workspace root.

        - `Type UpdateFile`

          The operation type. Always `update_file`.

          - `const UpdateFileUpdateFile UpdateFile = "update_file"`

    - `Status string`

      The status of the apply patch tool call. One of `in_progress` or `completed`.

      - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

      - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

    - `Type ApplyPatchCall`

      The type of the item. Always `apply_patch_call`.

      - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

    - `ID string`

      The unique ID of the apply patch tool call. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemApplyPatchCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

  - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

    The streamed output emitted by an apply patch tool call.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Status string`

      The status of the apply patch tool call output. One of `completed` or `failed`.

      - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

      - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

    - `Type ApplyPatchCallOutput`

      The type of the item. Always `apply_patch_call_output`.

      - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

    - `ID string`

      The unique ID of the apply patch tool call output. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `Output string`

      Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

  - `type BetaResponseInputItemMcpListTools struct{…}`

    A list of tools available on an MCP server.

    - `ID string`

      The unique ID of the list.

    - `ServerLabel string`

      The label of the MCP server.

    - `Tools []BetaResponseInputItemMcpListToolsTool`

      The tools available on the server.

      - `InputSchema any`

        The JSON schema describing the tool's input.

      - `Name string`

        The name of the tool.

      - `Annotations any`

        Additional annotations about the tool.

      - `Description string`

        The description of the tool.

    - `Type McpListTools`

      The type of the item. Always `mcp_list_tools`.

      - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

    - `Agent BetaResponseInputItemMcpListToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Error string`

      Error message if the server could not list tools.

  - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

    A request for human approval of a tool invocation.

    - `ID string`

      The unique ID of the approval request.

    - `Arguments string`

      A JSON string of arguments for the tool.

    - `Name string`

      The name of the tool to run.

    - `ServerLabel string`

      The label of the MCP server making the request.

    - `Type McpApprovalRequest`

      The type of the item. Always `mcp_approval_request`.

      - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

    - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

    A response to an MCP approval request.

    - `ApprovalRequestID string`

      The ID of the approval request being answered.

    - `Approve bool`

      Whether the request was approved.

    - `Type McpApprovalResponse`

      The type of the item. Always `mcp_approval_response`.

      - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

    - `ID string`

      The unique ID of the approval response

    - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Reason string`

      Optional reason for the decision.

  - `type BetaResponseInputItemMcpCall struct{…}`

    An invocation of a tool on an MCP server.

    - `ID string`

      The unique ID of the tool call.

    - `Arguments string`

      A JSON string of the arguments passed to the tool.

    - `Name string`

      The name of the tool that was run.

    - `ServerLabel string`

      The label of the MCP server running the tool.

    - `Type McpCall`

      The type of the item. Always `mcp_call`.

      - `const McpCallMcpCall McpCall = "mcp_call"`

    - `Agent BetaResponseInputItemMcpCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `ApprovalRequestID string`

      Unique identifier for the MCP tool call approval request.
      Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

    - `Error string`

      The error from the tool call, if any.

    - `Output string`

      The output from the tool call.

    - `Status string`

      The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

      - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

      - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

      - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

      - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

      - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

  - `type BetaResponseCustomToolCallOutput struct{…}`

    The output of a custom tool call from your code, being sent back to the model.

    - `CallID string`

      The call ID, used to map this custom tool call output to a custom tool call.

    - `Output BetaResponseCustomToolCallOutputOutputUnion`

      The output from the custom tool call generated by your code.
      Can be a string or an list of output content.

      - `string`

      - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

        Text, image, or file output of the custom tool call.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

    - `Type CustomToolCallOutput`

      The type of the custom tool call output. Always `custom_tool_call_output`.

      - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

    - `ID string`

      The unique ID of the custom tool call output in the OpenAI platform.

    - `Agent BetaResponseCustomToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseCustomToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

  - `type BetaResponseCustomToolCall struct{…}`

    A call to a custom tool created by the model.

    - `CallID string`

      An identifier used to map this custom tool call to a tool call output.

    - `Input string`

      The input for the custom tool call generated by the model.

    - `Name string`

      The name of the custom tool being called.

    - `Type CustomToolCall`

      The type of the custom tool call. Always `custom_tool_call`.

      - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

    - `ID string`

      The unique ID of the custom tool call in the OpenAI platform.

    - `Agent BetaResponseCustomToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseCustomToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseCustomToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseCustomToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `Namespace string`

      The namespace of the custom tool being called.

  - `type BetaResponseInputItemCompactionTrigger struct{…}`

    Compacts the current context. Must be the final input item.

    - `Type CompactionTrigger`

      The type of the item. Always `compaction_trigger`.

      - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

    - `Agent BetaResponseInputItemCompactionTriggerAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemItemReference struct{…}`

    An internal identifier for an item to reference.

    - `ID string`

      The ID of the item to reference.

    - `Agent BetaResponseInputItemItemReferenceAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Type string`

      The type of item to reference. Always `item_reference`.

      - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

  - `type BetaResponseInputItemProgram struct{…}`

    - `ID string`

      The unique ID of this program item.

    - `CallID string`

      The stable call ID of the program item.

    - `Code string`

      The JavaScript source executed by programmatic tool calling.

    - `Fingerprint string`

      Opaque program replay fingerprint that must be round-tripped.

    - `Type Program`

      The item type. Always `program`.

      - `const ProgramProgram Program = "program"`

    - `Agent BetaResponseInputItemProgramAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemProgramOutput struct{…}`

    - `ID string`

      The unique ID of this program output item.

    - `CallID string`

      The call ID of the program item.

    - `Result string`

      The result produced by the program item.

    - `Status string`

      The terminal status of the program output.

      - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

      - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

    - `Type ProgramOutput`

      The item type. Always `program_output`.

      - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

    - `Agent BetaResponseInputItemProgramOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

### Beta Response Input Audio

- `type BetaResponseInputAudio struct{…}`

  An audio input to the model.

  - `InputAudio BetaResponseInputAudioInputAudio`

    - `Data string`

      Base64-encoded audio data.

    - `Format string`

      The format of the audio data. Currently supported formats are `mp3` and
      `wav`.

      - `const BetaResponseInputAudioInputAudioFormatMP3 BetaResponseInputAudioInputAudioFormat = "mp3"`

      - `const BetaResponseInputAudioInputAudioFormatWAV BetaResponseInputAudioInputAudioFormat = "wav"`

  - `Type InputAudio`

    The type of the input item. Always `input_audio`.

    - `const InputAudioInputAudio InputAudio = "input_audio"`

### Beta Response Input Content

- `type BetaResponseInputContentUnion interface{…}`

  A text input to the model.

  - `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`.

      - `const InputTextInputText InputText = "input_text"`

    - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputImage struct{…}`

    An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

    - `Detail BetaResponseInputImageDetail`

      The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

      - `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`.

      - `const InputImageInputImage InputImage = "input_image"`

    - `FileID string`

      The ID of the file to be sent to the model.

    - `ImageURL string`

      The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

    - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputFile struct{…}`

    A file input to the model.

    - `Type InputFile`

      The type of the input item. Always `input_file`.

      - `const InputFileInputFile InputFile = "input_file"`

    - `Detail BetaResponseInputFileDetail`

      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`.

      - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

      - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

      - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

    - `FileData string`

      The content of the file to be sent to the model.

    - `FileID string`

      The ID of the file to be sent to the model.

    - `FileURL string`

      The URL of the file to be sent to the model.

    - `Filename string`

      The name of the file to be sent to the model.

    - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Input File

- `type BetaResponseInputFile struct{…}`

  A file input to the model.

  - `Type InputFile`

    The type of the input item. Always `input_file`.

    - `const InputFileInputFile InputFile = "input_file"`

  - `Detail BetaResponseInputFileDetail`

    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`.

    - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

    - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

    - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

  - `FileData string`

    The content of the file to be sent to the model.

  - `FileID string`

    The ID of the file to be sent to the model.

  - `FileURL string`

    The URL of the file to be sent to the model.

  - `Filename string`

    The name of the file to be sent to the model.

  - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

    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`.

      - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Input File Content

- `type BetaResponseInputFileContent struct{…}`

  A file input to the model.

  - `Type InputFile`

    The type of the input item. Always `input_file`.

    - `const InputFileInputFile InputFile = "input_file"`

  - `Detail BetaResponseInputFileContentDetail`

    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`.

    - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

    - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

    - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

  - `FileData string`

    The base64-encoded data of the file to be sent to the model.

  - `FileID string`

    The ID of the file to be sent to the model.

  - `FileURL string`

    The URL of the file to be sent to the model.

  - `Filename string`

    The name of the file to be sent to the model.

  - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

    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`.

      - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Input Image

- `type BetaResponseInputImage struct{…}`

  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

  - `Detail BetaResponseInputImageDetail`

    The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

    - `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`.

    - `const InputImageInputImage InputImage = "input_image"`

  - `FileID string`

    The ID of the file to be sent to the model.

  - `ImageURL string`

    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

  - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

    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`.

      - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Input Image Content

- `type BetaResponseInputImageContent struct{…}`

  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

  - `Type InputImage`

    The type of the input item. Always `input_image`.

    - `const InputImageInputImage InputImage = "input_image"`

  - `Detail BetaResponseInputImageContentDetail`

    The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

    - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

    - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

    - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

    - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

  - `FileID string`

    The ID of the file to be sent to the model.

  - `ImageURL string`

    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

  - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

    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`.

      - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Input Item

- `type BetaResponseInputItemUnion interface{…}`

  A message input to the model with a role indicating instruction following
  hierarchy. Instructions given with the `developer` or `system` role take
  precedence over instructions given with the `user` role. Messages with the
  `assistant` role are presumed to have been generated by the model in previous
  interactions.

  - `type BetaEasyInputMessage struct{…}`

    A message input to the model with a role indicating instruction following
    hierarchy. Instructions given with the `developer` or `system` role take
    precedence over instructions given with the `user` role. Messages with the
    `assistant` role are presumed to have been generated by the model in previous
    interactions.

    - `Content BetaEasyInputMessageContentUnion`

      Text, image, or audio input to the model, used to generate a response.
      Can also contain previous assistant responses.

      - `string`

      - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

        A list of one or many input items to the model, containing different content
        types.

        - `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`.

            - `const InputTextInputText InputText = "input_text"`

          - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `Detail BetaResponseInputImageDetail`

            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

            - `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`.

            - `const InputImageInputImage InputImage = "input_image"`

          - `FileID string`

            The ID of the file to be sent to the model.

          - `ImageURL string`

            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

          - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

          - `Type InputFile`

            The type of the input item. Always `input_file`.

            - `const InputFileInputFile InputFile = "input_file"`

          - `Detail BetaResponseInputFileDetail`

            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`.

            - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

            - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

            - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

          - `FileData string`

            The content of the file to be sent to the model.

          - `FileID string`

            The ID of the file to be sent to the model.

          - `FileURL string`

            The URL of the file to be sent to the model.

          - `Filename string`

            The name of the file to be sent to the model.

          - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

    - `Role BetaEasyInputMessageRole`

      The role of the message input. One of `user`, `assistant`, `system`, or
      `developer`.

      - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

      - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

      - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

      - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

    - `Phase BetaEasyInputMessagePhase`

      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.

      - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

      - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

    - `Type BetaEasyInputMessageType`

      The type of the message input. Always `message`.

      - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

  - `type BetaResponseInputItemMessage struct{…}`

    A message input to the model with a role indicating instruction following
    hierarchy. Instructions given with the `developer` or `system` role take
    precedence over instructions given with the `user` role.

    - `Content BetaResponseInputMessageContentList`

      A list of one or many input items to the model, containing different content
      types.

    - `Role string`

      The role of the message input. One of `user`, `system`, or `developer`.

      - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

      - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

      - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

    - `Agent BetaResponseInputItemMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

      - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

      - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

    - `Type string`

      The type of the message input. Always set to `message`.

      - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

  - `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.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

          - `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`.

              - `const FileCitationFileCitation FileCitation = "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`.

              - `const URLCitationURLCitation URLCitation = "url_citation"`

            - `URL string`

              The URL of the web resource.

          - `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`.

              - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

              - `const FilePathFilePath FilePath = "file_path"`

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

          - `const OutputTextOutputText OutputText = "output_text"`

        - `Logprobs []BetaResponseOutputTextLogprob`

          - `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`.

          - `const RefusalRefusal Refusal = "refusal"`

    - `Role Assistant`

      The role of the output message. Always `assistant`.

      - `const AssistantAssistant Assistant = "assistant"`

    - `Status BetaResponseOutputMessageStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

      - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

      - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

    - `Type Message`

      The type of the output message. Always `message`.

      - `const MessageMessage Message = "message"`

    - `Agent BetaResponseOutputMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Phase BetaResponseOutputMessagePhase`

      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.

      - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

      - `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`.

      - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

    - `Agent BetaResponseFileSearchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Results []BetaResponseFileSearchToolCallResult`

      The results of the file search tool call.

      - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

        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.

        - `string`

        - `float64`

        - `bool`

      - `FileID string`

        The unique ID of the file.

      - `Filename string`

        The name of the file.

      - `Score float64`

        The relevance score of the file - a value between 0 and 1.

      - `Text string`

        The text that was retrieved from the file.

  - `type BetaResponseComputerToolCall struct{…}`

    A tool call to a computer use tool. See the
    [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

        The type of the pending safety check.

      - `Message string`

        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.

      - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

      - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

      - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

    - `Type BetaResponseComputerToolCallType`

      The type of the computer call. Always `computer_call`.

      - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

    - `Action BetaComputerActionUnion`

      A click action.

      - `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`.

          - `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`.

          - `const ClickClick Click = "click"`

        - `X int64`

          The x-coordinate where the click occurred.

        - `Y int64`

          The y-coordinate where the click occurred.

        - `Keys []string`

          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`.

          - `const DoubleClickDoubleClick DoubleClick = "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`.

          - `const DragDrag Drag = "drag"`

        - `Keys []string`

          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`.

          - `const KeypressKeypress Keypress = "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`.

          - `const MoveMove Move = "move"`

        - `X int64`

          The x-coordinate to move to.

        - `Y int64`

          The y-coordinate to move to.

        - `Keys []string`

          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`.

          - `const ScreenshotScreenshot Screenshot = "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`.

          - `const ScrollScroll Scroll = "scroll"`

        - `X int64`

          The x-coordinate where the scroll occurred.

        - `Y int64`

          The y-coordinate where the scroll occurred.

        - `Keys []string`

          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`.

          - `const TypeType Type = "type"`

      - `type BetaComputerActionWait struct{…}`

        A wait action.

        - `Type Wait`

          Specifies the event type. For a wait action, this property is always set to `wait`.

          - `const WaitWait Wait = "wait"`

    - `Actions BetaComputerActionList`

      Flattened batched actions for `computer_use`. Each action includes an
      `type` discriminator and action-specific fields.

      - `type BetaComputerActionClick struct{…}`

        A click action.

      - `type BetaComputerActionDoubleClick struct{…}`

        A double click action.

      - `type BetaComputerActionDrag struct{…}`

        A drag action.

      - `type BetaComputerActionKeypress struct{…}`

        A collection of keypresses the model would like to perform.

      - `type BetaComputerActionMove struct{…}`

        A mouse move action.

      - `type BetaComputerActionScreenshot struct{…}`

        A screenshot action.

      - `type BetaComputerActionScroll struct{…}`

        A scroll action.

      - `type BetaComputerActionType struct{…}`

        An action to type in text.

      - `type BetaComputerActionWait struct{…}`

        A wait action.

    - `Agent BetaResponseComputerToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemComputerCallOutput struct{…}`

    The output of a computer tool call.

    - `CallID string`

      The ID of the computer tool call that produced the output.

    - `Output BetaResponseComputerToolCallOutputScreenshot`

      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`.

        - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

      - `FileID string`

        The identifier of an uploaded file that contains the screenshot.

      - `ImageURL string`

        The URL of the screenshot image.

    - `Type ComputerCallOutput`

      The type of the computer tool call output. Always `computer_call_output`.

      - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

    - `ID string`

      The ID of the computer tool call output.

    - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

      The safety checks reported by the API that have been acknowledged by the developer.

      - `ID string`

        The ID of the pending safety check.

      - `Code string`

        The type of the pending safety check.

      - `Message string`

        Details about the pending safety check.

    - `Agent BetaResponseInputItemComputerCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

      - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

      - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

  - `type BetaResponseFunctionWebSearch struct{…}`

    The results of a web search tool call. See the
    [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `ID string`

      The unique ID of the web search tool call.

    - `Action BetaResponseFunctionWebSearchActionUnion`

      An object describing the specific action taken in this web search call.
      Includes details on how the model used the web (search, open_page, find_in_page).

      - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

        Action type "search" - Performs a web search query.

        - `Type Search`

          The action type.

          - `const SearchSearch Search = "search"`

        - `Queries []string`

          The search queries.

        - `Query string`

          The search query.

        - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

          The sources used in the search.

          - `Type URL`

            The type of source. Always `url`.

            - `const URLURL URL = "url"`

          - `URL string`

            The URL of the source.

      - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

        Action type "open_page" - Opens a specific URL from search results.

        - `Type OpenPage`

          The action type.

          - `const OpenPageOpenPage OpenPage = "open_page"`

        - `URL string`

          The URL opened by the model.

      - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

        Action type "find_in_page": Searches for a pattern within a loaded page.

        - `Pattern string`

          The pattern or text to search for within the page.

        - `Type FindInPage`

          The action type.

          - `const FindInPageFindInPage FindInPage = "find_in_page"`

        - `URL string`

          The URL of the page searched for the pattern.

    - `Status BetaResponseFunctionWebSearchStatus`

      The status of the web search tool call.

      - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

      - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

      - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

      - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

    - `Type WebSearchCall`

      The type of the web search tool call. Always `web_search_call`.

      - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

    - `Agent BetaResponseFunctionWebSearchAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionToolCall struct{…}`

    A tool call to run a function. See the
    [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

      - `const FunctionCallFunctionCall FunctionCall = "function_call"`

    - `ID string`

      The unique ID of the function tool call.

    - `Agent BetaResponseFunctionToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `Namespace string`

      The namespace of the function to run.

    - `Status BetaResponseFunctionToolCallStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

      - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

      - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

  - `type BetaResponseInputItemFunctionCallOutput struct{…}`

    The output of a function tool call.

    - `CallID string`

      The unique ID of the function tool call generated by the model.

    - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

      Text, image, or file output of the function tool call.

      - `string`

      - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

        An array of content outputs (text, image, file) for the function tool call.

        - `type BetaResponseInputTextContent 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`.

            - `const InputTextInputText InputText = "input_text"`

          - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputImageContent struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `Type InputImage`

            The type of the input item. Always `input_image`.

            - `const InputImageInputImage InputImage = "input_image"`

          - `Detail BetaResponseInputImageContentDetail`

            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

            - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

            - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

            - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

            - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

          - `FileID string`

            The ID of the file to be sent to the model.

          - `ImageURL string`

            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

          - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFileContent struct{…}`

          A file input to the model.

          - `Type InputFile`

            The type of the input item. Always `input_file`.

            - `const InputFileInputFile InputFile = "input_file"`

          - `Detail BetaResponseInputFileContentDetail`

            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`.

            - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

            - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

            - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

          - `FileData string`

            The base64-encoded data of the file to be sent to the model.

          - `FileID string`

            The ID of the file to be sent to the model.

          - `FileURL string`

            The URL of the file to be sent to the model.

          - `Filename string`

            The name of the file to be sent to the model.

          - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

    - `Type FunctionCallOutput`

      The type of the function tool call output. Always `function_call_output`.

      - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

    - `ID string`

      The unique ID of the function tool call output. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemFunctionCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

      - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

      - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

  - `type BetaResponseInputItemAgentMessage struct{…}`

    A message routed between agents.

    - `Author string`

      The sending agent identity.

    - `Content []BetaResponseInputItemAgentMessageContentUnion`

      Plaintext, image, or encrypted content sent between agents.

      - `type BetaResponseInputTextContent struct{…}`

        A text input to the model.

      - `type BetaResponseInputImageContent struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

      - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

          - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

    - `Recipient string`

      The destination agent identity.

    - `Type AgentMessage`

      The item type. Always `agent_message`.

      - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

    - `ID string`

      The unique ID of this agent message item.

    - `Agent BetaResponseInputItemAgentMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemMultiAgentCall struct{…}`

    - `Action string`

      The multi-agent action that was executed.

      - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

      - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

      - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

      - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

      - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

      - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

    - `Arguments string`

      The action arguments as a JSON string.

    - `CallID string`

      The unique ID linking this call to its output.

    - `Type MultiAgentCall`

      The item type. Always `multi_agent_call`.

      - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

    - `ID string`

      The unique ID of this multi-agent call.

    - `Agent BetaResponseInputItemMultiAgentCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

    - `Action string`

      The multi-agent action that produced this result.

      - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

      - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

    - `CallID string`

      The unique ID of the multi-agent call.

    - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

      Text output returned by the multi-agent action.

      - `Text string`

        The text content.

      - `Type OutputText`

        The content type. Always `output_text`.

        - `const OutputTextOutputText OutputText = "output_text"`

      - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

        Citations associated with the text content.

        - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

          - `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 citation type. Always `file_citation`.

            - `const FileCitationFileCitation FileCitation = "file_citation"`

        - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

          - `EndIndex int64`

            The index of the last character of the citation in the message.

          - `StartIndex int64`

            The index of the first character of the citation in the message.

          - `Title string`

            The title of the cited resource.

          - `Type URLCitation`

            The citation type. Always `url_citation`.

            - `const URLCitationURLCitation URLCitation = "url_citation"`

          - `URL string`

            The URL of the cited resource.

        - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

          - `ContainerID string`

            The ID of the container.

          - `EndIndex int64`

            The index of the last character of the citation in the message.

          - `FileID string`

            The ID of the container file.

          - `Filename string`

            The filename of the container file cited.

          - `StartIndex int64`

            The index of the first character of the citation in the message.

          - `Type ContainerFileCitation`

            The citation type. Always `container_file_citation`.

            - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

    - `Type MultiAgentCallOutput`

      The item type. Always `multi_agent_call_output`.

      - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

    - `ID string`

      The unique ID of this multi-agent call output.

    - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemToolSearchCall struct{…}`

    - `Arguments any`

      The arguments supplied to the tool search call.

    - `Type ToolSearchCall`

      The item type. Always `tool_search_call`.

      - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

    - `ID string`

      The unique ID of this tool search call.

    - `Agent BetaResponseInputItemToolSearchCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution string`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

      - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

    - `Status string`

      The status of the tool search call.

      - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

      - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

      - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

  - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

    - `Tools []BetaToolUnion`

      The loaded tool definitions returned by the tool search output.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `Name string`

          The name of the function to call.

        - `Parameters map[string, any]`

          A JSON schema object describing the parameters of the function.

        - `Strict bool`

          Whether strict parameter validation is enforced for this function tool.

        - `Type Function`

          The type of the function tool. Always `function`.

          - `const FunctionFunction Function = "function"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

          - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this function is deferred and loaded via tool search.

        - `Description string`

          A description of the function. Used by the model to determine whether or not to call the function.

        - `OutputSchema map[string, any]`

          A JSON schema object describing the JSON value encoded in string outputs for this function.

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `Type FileSearch`

          The type of the file search tool. Always `file_search`.

          - `const FileSearchFileSearch FileSearch = "file_search"`

        - `VectorStoreIDs []string`

          The IDs of the vector stores to search.

        - `Filters BetaFileSearchToolFiltersUnion`

          A filter to apply.

          - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

            A filter used to compare a specified attribute key to a given value using a defined comparison operation.

            - `Key string`

              The key to compare against the value.

            - `Type string`

              Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

              - `eq`: equals
              - `ne`: not equal
              - `gt`: greater than
              - `gte`: greater than or equal
              - `lt`: less than
              - `lte`: less than or equal
              - `in`: in
              - `nin`: not in

              - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

            - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

              The value to compare against the attribute key; supports string, number, or boolean types.

              - `string`

              - `float64`

              - `bool`

              - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                - `string`

                - `float64`

          - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

            Combine multiple filters using `and` or `or`.

            - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

              Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

              - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

            - `Type string`

              Type of operation: `and` or `or`.

              - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

              - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

        - `MaxNumResults int64`

          The maximum number of results to return. This number should be between 1 and 50 inclusive.

        - `RankingOptions BetaFileSearchToolRankingOptions`

          Ranking options for search.

          - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

            Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

            - `EmbeddingWeight float64`

              The weight of the embedding in the reciprocal ranking fusion.

            - `TextWeight float64`

              The weight of the text in the reciprocal ranking fusion.

          - `Ranker string`

            The ranker to use for the file search.

            - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

            - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

          - `ScoreThreshold float64`

            The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `Type Computer`

          The type of the computer tool. Always `computer`.

          - `const ComputerComputer Computer = "computer"`

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `DisplayHeight int64`

          The height of the computer display.

        - `DisplayWidth int64`

          The width of the computer display.

        - `Environment BetaComputerUsePreviewToolEnvironment`

          The type of computer environment to control.

          - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

          - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

          - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

          - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

          - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

        - `Type ComputerUsePreview`

          The type of the computer use tool. Always `computer_use_preview`.

          - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchToolType`

          The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

          - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

          - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

        - `Filters BetaWebSearchToolFilters`

          Filters for the search.

          - `AllowedDomains []string`

            Allowed domains for the search. If not provided, all domains are allowed.
            Subdomains of the provided domains are allowed as well.

            Example: `["pubmed.ncbi.nlm.nih.gov"]`

        - `SearchContextSize BetaWebSearchToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

          - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

          - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchToolUserLocation`

          The approximate location of the user.

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `Type string`

            The type of location approximation. Always `approximate`.

            - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `ServerLabel string`

          A label for this MCP server, used to identify it in tool calls.

        - `Type Mcp`

          The type of the MCP tool. Always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

          - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

        - `AllowedTools BetaToolMcpAllowedToolsUnion`

          List of allowed tool names or a filter object.

          - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

            A string array of allowed tool names

          - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

        - `Authorization string`

          An OAuth access token that can be used with a remote MCP server, either
          with a custom MCP server URL or a service connector. Your application
          must handle the OAuth authorization flow and provide the token here.

        - `ConnectorID string`

          Identifier for service connectors, like those available in ChatGPT. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
          about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

          Currently supported `connector_id` values are:

          - Dropbox: `connector_dropbox`
          - Gmail: `connector_gmail`
          - Google Calendar: `connector_googlecalendar`
          - Google Drive: `connector_googledrive`
          - Microsoft Teams: `connector_microsoftteams`
          - Outlook Calendar: `connector_outlookcalendar`
          - Outlook Email: `connector_outlookemail`
          - SharePoint: `connector_sharepoint`

          - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

          - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

          - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

          - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

          - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

          - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

          - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

          - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

        - `DeferLoading bool`

          Whether this MCP tool is deferred and discovered via tool search.

        - `Headers map[string, string]`

          Optional HTTP headers to send to the MCP server. Use for authentication
          or other purposes.

        - `RequireApproval BetaToolMcpRequireApprovalUnion`

          Specify which of the MCP server's tools require approval.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

            Specify which of the MCP server's tools require approval. Can be
            `always`, `never`, or a filter object associated with tools
            that require approval.

            - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

            - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

            Specify a single approval policy for all tools. One of `always` or
            `never`. When set to `always`, all tools will require approval. When
            set to `never`, all tools will not require approval.

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

        - `ServerDescription string`

          Optional description of the MCP server, used to provide more context.

        - `ServerURL string`

          The URL for the MCP server. One of `server_url`, `connector_id`, or
          `tunnel_id` must be provided.

        - `TunnelID string`

          The Secure MCP Tunnel ID to use instead of a direct server URL. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided.

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

        - `Container BetaToolCodeInterpreterContainerUnion`

          The code interpreter container. Can be a container ID or an object that
          specifies uploaded file IDs to make available to your code, along with an
          optional `memory_limit` setting.

          - `string`

          - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

            Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

            - `Type Auto`

              Always `auto`.

              - `const AutoAuto Auto = "auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit string`

              The memory limit for the code interpreter container.

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `Type Disabled`

                  Disable outbound network access. Always `disabled`.

                  - `const DisabledDisabled Disabled = "disabled"`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `AllowedDomains []string`

                  A list of allowed domains when type is `allowlist`.

                - `Type Allowlist`

                  Allow outbound network access only to specified domains. Always `allowlist`.

                  - `const AllowlistAllowlist Allowlist = "allowlist"`

                - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                  Optional domain-scoped secrets for allowlisted domains.

                  - `Domain string`

                    The domain associated with the secret.

                  - `Name string`

                    The name of the secret to inject for the domain.

                  - `Value string`

                    The secret value to inject for the domain.

        - `Type CodeInterpreter`

          The type of the code interpreter tool. Always `code_interpreter`.

          - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

          - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

      - `type BetaToolProgrammaticToolCalling struct{…}`

        - `Type ProgrammaticToolCalling`

          The type of the tool. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

        - `Type ImageGeneration`

          The type of the image generation tool. Always `image_generation`.

          - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

        - `Action string`

          Whether to generate a new image or edit an existing image. Default: `auto`.

          - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

          - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

          - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

        - `Background string`

          Allows to set transparency for the background of the generated image(s).
          This parameter is only supported for GPT image models that support
          transparent backgrounds. Must be one of `transparent`, `opaque`, or
          `auto` (default value). When `auto` is used, the model will
          automatically determine the best background for the image.

          `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
          transparent backgrounds. Requests with `background` set to
          `transparent` will return an error for these models; use `opaque` or
          `auto` instead.

          If `transparent`, the output format needs to support transparency,
          so it should be set to either `png` (default value) or `webp`.

          - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

          - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

          - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

        - `InputFidelity string`

          Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

          - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

          - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

        - `InputImageMask BetaToolImageGenerationInputImageMask`

          Optional mask for inpainting. Contains `image_url`
          (string, optional) and `file_id` (string, optional).

          - `FileID string`

            File ID for the mask image.

          - `ImageURL string`

            Base64-encoded mask image.

        - `Model string`

          The image generation model to use. Default: `gpt-image-1`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

            - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

            - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

            - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

            - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

            - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

        - `Moderation string`

          Moderation level for the generated image. Default: `auto`.

          - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

          - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

        - `OutputCompression int64`

          Compression level for the output image. Default: 100.

        - `OutputFormat string`

          The output format of the generated image. One of `png`, `webp`, or
          `jpeg`. Default: `png`.

          - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

          - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

          - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

        - `PartialImages int64`

          Number of partial images to generate in streaming mode, from 0 (default value) to 3.

        - `Quality string`

          The quality of the generated image. One of `low`, `medium`, `high`,
          or `auto`. Default: `auto`.

          - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

          - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

          - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

          - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

        - `Size string`

          The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

            - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

            - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

            - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

        - `Type LocalShell`

          The type of the local shell tool. Always `local_shell`.

          - `const LocalShellLocalShell LocalShell = "local_shell"`

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

        - `Type Shell`

          The type of the shell tool. Always `shell`.

          - `const ShellShell Shell = "shell"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

          - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

        - `Environment BetaFunctionShellToolEnvironmentUnion`

          - `type BetaContainerAuto struct{…}`

            - `Type ContainerAuto`

              Automatically creates a container for this request

              - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit BetaContainerAutoMemoryLimit`

              The memory limit for the container.

              - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

              - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

              - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

              - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

            - `Skills []BetaContainerAutoSkillUnion`

              An optional list of skills referenced by id or inline data.

              - `type BetaSkillReference struct{…}`

                - `SkillID string`

                  The ID of the referenced skill.

                - `Type SkillReference`

                  References a skill created with the /v1/skills endpoint.

                  - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                - `Version string`

                  Optional skill version. Use a positive integer or 'latest'. Omit for default.

              - `type BetaInlineSkill struct{…}`

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Source BetaInlineSkillSource`

                  Inline skill payload

                  - `Data string`

                    Base64-encoded skill zip bundle.

                  - `MediaType ApplicationZip`

                    The media type of the inline skill payload. Must be `application/zip`.

                    - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                  - `Type Base64`

                    The type of the inline skill source. Must be `base64`.

                    - `const Base64Base64 Base64 = "base64"`

                - `Type Inline`

                  Defines an inline skill for this request.

                  - `const InlineInline Inline = "inline"`

          - `type BetaLocalEnvironment struct{…}`

            - `Type Local`

              Use a local computer environment.

              - `const LocalLocal Local = "local"`

            - `Skills []BetaLocalSkill`

              An optional list of skills.

              - `Description string`

                The description of the skill.

              - `Name string`

                The name of the skill.

              - `Path string`

                The path to the directory containing the skill.

          - `type BetaContainerReference struct{…}`

            - `ContainerID string`

              The ID of the referenced container.

            - `Type ContainerReference`

              References a container created with the /v1/containers endpoint

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Name string`

          The name of the custom tool, used to identify it in tool calls.

        - `Type Custom`

          The type of the custom tool. Always `custom`.

          - `const CustomCustom Custom = "custom"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

          - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this tool should be deferred and discovered via tool search.

        - `Description string`

          Optional description of the custom tool, used to provide more context.

        - `Format BetaCustomToolFormatUnion`

          The input format for the custom tool. Default is unconstrained text.

          - `type BetaCustomToolFormatText struct{…}`

            Unconstrained free-form text.

            - `Type Text`

              Unconstrained text format. Always `text`.

              - `const TextText Text = "text"`

          - `type BetaCustomToolFormatGrammar struct{…}`

            A grammar defined by the user.

            - `Definition string`

              The grammar definition.

            - `Syntax string`

              The syntax of the grammar definition. One of `lark` or `regex`.

              - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

              - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

            - `Type Grammar`

              Grammar format. Always `grammar`.

              - `const GrammarGrammar Grammar = "grammar"`

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

        - `Description string`

          A description of the namespace shown to the model.

        - `Name string`

          The namespace name used in tool calls (for example, `crm`).

        - `Tools []BetaNamespaceToolToolUnion`

          The function/custom tools available inside this namespace.

          - `type BetaNamespaceToolToolFunction struct{…}`

            - `Name string`

            - `Type Function`

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

              - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function should be deferred and discovered via tool search.

            - `Description string`

            - `OutputSchema map[string, any]`

              A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

            - `Parameters any`

            - `Strict bool`

              Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Type Namespace`

          The type of the tool. Always `namespace`.

          - `const NamespaceNamespace Namespace = "namespace"`

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

        - `Type ToolSearch`

          The type of the tool. Always `tool_search`.

          - `const ToolSearchToolSearch ToolSearch = "tool_search"`

        - `Description string`

          Description shown to the model for a client-executed tool search tool.

        - `Execution BetaToolSearchToolExecution`

          Whether tool search is executed by the server or by the client.

          - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

          - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

        - `Parameters any`

          Parameter schema for a client-executed tool search tool.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchPreviewToolType`

          The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

        - `SearchContentTypes []string`

          - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

          - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

        - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

          - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

          - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchPreviewToolUserLocation`

          The user's location.

          - `Type Approximate`

            The type of location approximation. Always `approximate`.

            - `const ApproximateApproximate Approximate = "approximate"`

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ApplyPatch`

          The type of the tool. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

          - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

    - `Type ToolSearchOutput`

      The item type. Always `tool_search_output`.

      - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

    - `ID string`

      The unique ID of this tool search output.

    - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchOutputItemParamExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

      - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

    - `Status BetaResponseToolSearchOutputItemParamStatus`

      The status of the tool search output.

      - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

      - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

      - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

  - `type BetaResponseInputItemAdditionalTools struct{…}`

    - `Role Developer`

      The role that provided the additional tools. Only `developer` is supported.

      - `const DeveloperDeveloper Developer = "developer"`

    - `Tools []BetaToolUnion`

      A list of additional tools made available at this item.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `Type AdditionalTools`

      The item type. Always `additional_tools`.

      - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

    - `ID string`

      The unique ID of this additional tools item.

    - `Agent BetaResponseInputItemAdditionalToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

    - `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`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `Type Reasoning`

      The type of the object. Always `reasoning`.

      - `const ReasoningReasoning Reasoning = "reasoning"`

    - `Agent BetaResponseReasoningItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Content []BetaResponseReasoningItemContent`

      Reasoning text content.

      - `Text string`

        The reasoning text from the model.

      - `Type ReasoningText`

        The type of the reasoning text. Always `reasoning_text`.

        - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `EncryptedContent string`

      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.

    - `Status BetaResponseReasoningItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

      - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

      - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

  - `type BetaResponseCompactionItemParamResp struct{…}`

    A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

    - `EncryptedContent string`

      The encrypted content of the compaction summary.

    - `Type Compaction`

      The type of the item. Always `compaction`.

      - `const CompactionCompaction Compaction = "compaction"`

    - `ID string`

      The ID of the compaction item.

    - `Agent BetaResponseCompactionItemParamAgentResp`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemImageGenerationCall struct{…}`

    An image generation request made by the model.

    - `ID string`

      The unique ID of the image generation call.

    - `Result string`

      The generated image encoded in base64.

    - `Status string`

      The status of the image generation call.

      - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

      - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

      - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

      - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

    - `Type ImageGenerationCall`

      The type of the image generation call. Always `image_generation_call`.

      - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

    - `Agent BetaResponseInputItemImageGenerationCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterToolCall struct{…}`

    A tool call to run code.

    - `ID string`

      The unique ID of the code interpreter tool call.

    - `Code string`

      The code to run, or null if not available.

    - `ContainerID string`

      The ID of the container used to run the code.

    - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

      The outputs generated by the code interpreter, such as logs or images.
      Can be null if no outputs are available.

      - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

        The logs output from the code interpreter.

        - `Logs string`

          The logs output from the code interpreter.

        - `Type Logs`

          The type of the output. Always `logs`.

          - `const LogsLogs Logs = "logs"`

      - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

        The image output from the code interpreter.

        - `Type Image`

          The type of the output. Always `image`.

          - `const ImageImage Image = "image"`

        - `URL string`

          The URL of the image output from the code interpreter.

    - `Status BetaResponseCodeInterpreterToolCallStatus`

      The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

      - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

      - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

      - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

      - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

      - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

    - `Type CodeInterpreterCall`

      The type of the code interpreter tool call. Always `code_interpreter_call`.

      - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

    - `Agent BetaResponseCodeInterpreterToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemLocalShellCall struct{…}`

    A tool call to run a command on the local shell.

    - `ID string`

      The unique ID of the local shell call.

    - `Action BetaResponseInputItemLocalShellCallAction`

      Execute a shell command on the server.

      - `Command []string`

        The command to run.

      - `Env map[string, string]`

        Environment variables to set for the command.

      - `Type Exec`

        The type of the local shell action. Always `exec`.

        - `const ExecExec Exec = "exec"`

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the command.

      - `User string`

        Optional user to run the command as.

      - `WorkingDirectory string`

        Optional working directory to run the command in.

    - `CallID string`

      The unique ID of the local shell tool call generated by the model.

    - `Status string`

      The status of the local shell call.

      - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

      - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

      - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

    - `Type LocalShellCall`

      The type of the local shell call. Always `local_shell_call`.

      - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

    - `Agent BetaResponseInputItemLocalShellCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

    The output of a local shell tool call.

    - `ID string`

      The unique ID of the local shell tool call generated by the model.

    - `Output string`

      A JSON string of the output of the local shell tool call.

    - `Type LocalShellCallOutput`

      The type of the local shell tool call output. Always `local_shell_call_output`.

      - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

    - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

      - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

  - `type BetaResponseInputItemShellCall struct{…}`

    A tool representing a request to execute one or more shell commands.

    - `Action BetaResponseInputItemShellCallAction`

      The shell commands and limits that describe how to run the tool call.

      - `Commands []string`

        Ordered shell commands for the execution environment to run.

      - `MaxOutputLength int64`

        Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

      - `TimeoutMs int64`

        Maximum wall-clock time in milliseconds to allow the shell commands to run.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `Type ShellCall`

      The type of the item. Always `shell_call`.

      - `const ShellCallShellCall ShellCall = "shell_call"`

    - `ID string`

      The unique ID of the shell tool call. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemShellCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemShellCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

      The environment to execute the shell commands in.

      - `type BetaLocalEnvironment struct{…}`

      - `type BetaContainerReference struct{…}`

    - `Status string`

      The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

      - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

      - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

  - `type BetaResponseInputItemShellCallOutput struct{…}`

    The streamed output items emitted by a shell tool call.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `Output []BetaResponseFunctionShellCallOutputContent`

      Captured chunks of stdout and stderr output, along with their associated outcomes.

      - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

        The exit or timeout outcome associated with this shell call.

        - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

          Indicates that the shell call exceeded its configured time limit.

          - `Type Timeout`

            The outcome type. Always `timeout`.

            - `const TimeoutTimeout Timeout = "timeout"`

        - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

          Indicates that the shell commands finished and returned an exit code.

          - `ExitCode int64`

            The exit code returned by the shell process.

          - `Type Exit`

            The outcome type. Always `exit`.

            - `const ExitExit Exit = "exit"`

      - `Stderr string`

        Captured stderr output for the shell call.

      - `Stdout string`

        Captured stdout output for the shell call.

    - `Type ShellCallOutput`

      The type of the item. Always `shell_call_output`.

      - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

    - `ID string`

      The unique ID of the shell tool call output. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemShellCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `MaxOutputLength int64`

      The maximum number of UTF-8 characters captured for this shell call's combined output.

    - `Status string`

      The status of the shell call output.

      - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

      - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

      - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

  - `type BetaResponseInputItemApplyPatchCall struct{…}`

    A tool call representing a request to create, delete, or update files using diff patches.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

      The specific create, delete, or update instruction for the apply_patch tool call.

      - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

        Instruction for creating a new file via the apply_patch tool.

        - `Diff string`

          Unified diff content to apply when creating the file.

        - `Path string`

          Path of the file to create relative to the workspace root.

        - `Type CreateFile`

          The operation type. Always `create_file`.

          - `const CreateFileCreateFile CreateFile = "create_file"`

      - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

        Instruction for deleting an existing file via the apply_patch tool.

        - `Path string`

          Path of the file to delete relative to the workspace root.

        - `Type DeleteFile`

          The operation type. Always `delete_file`.

          - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

      - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

        Instruction for updating an existing file via the apply_patch tool.

        - `Diff string`

          Unified diff content to apply to the existing file.

        - `Path string`

          Path of the file to update relative to the workspace root.

        - `Type UpdateFile`

          The operation type. Always `update_file`.

          - `const UpdateFileUpdateFile UpdateFile = "update_file"`

    - `Status string`

      The status of the apply patch tool call. One of `in_progress` or `completed`.

      - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

      - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

    - `Type ApplyPatchCall`

      The type of the item. Always `apply_patch_call`.

      - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

    - `ID string`

      The unique ID of the apply patch tool call. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemApplyPatchCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

  - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

    The streamed output emitted by an apply patch tool call.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Status string`

      The status of the apply patch tool call output. One of `completed` or `failed`.

      - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

      - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

    - `Type ApplyPatchCallOutput`

      The type of the item. Always `apply_patch_call_output`.

      - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

    - `ID string`

      The unique ID of the apply patch tool call output. Populated when this item is returned via API.

    - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `Output string`

      Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

  - `type BetaResponseInputItemMcpListTools struct{…}`

    A list of tools available on an MCP server.

    - `ID string`

      The unique ID of the list.

    - `ServerLabel string`

      The label of the MCP server.

    - `Tools []BetaResponseInputItemMcpListToolsTool`

      The tools available on the server.

      - `InputSchema any`

        The JSON schema describing the tool's input.

      - `Name string`

        The name of the tool.

      - `Annotations any`

        Additional annotations about the tool.

      - `Description string`

        The description of the tool.

    - `Type McpListTools`

      The type of the item. Always `mcp_list_tools`.

      - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

    - `Agent BetaResponseInputItemMcpListToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Error string`

      Error message if the server could not list tools.

  - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

    A request for human approval of a tool invocation.

    - `ID string`

      The unique ID of the approval request.

    - `Arguments string`

      A JSON string of arguments for the tool.

    - `Name string`

      The name of the tool to run.

    - `ServerLabel string`

      The label of the MCP server making the request.

    - `Type McpApprovalRequest`

      The type of the item. Always `mcp_approval_request`.

      - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

    - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

    A response to an MCP approval request.

    - `ApprovalRequestID string`

      The ID of the approval request being answered.

    - `Approve bool`

      Whether the request was approved.

    - `Type McpApprovalResponse`

      The type of the item. Always `mcp_approval_response`.

      - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

    - `ID string`

      The unique ID of the approval response

    - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Reason string`

      Optional reason for the decision.

  - `type BetaResponseInputItemMcpCall struct{…}`

    An invocation of a tool on an MCP server.

    - `ID string`

      The unique ID of the tool call.

    - `Arguments string`

      A JSON string of the arguments passed to the tool.

    - `Name string`

      The name of the tool that was run.

    - `ServerLabel string`

      The label of the MCP server running the tool.

    - `Type McpCall`

      The type of the item. Always `mcp_call`.

      - `const McpCallMcpCall McpCall = "mcp_call"`

    - `Agent BetaResponseInputItemMcpCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `ApprovalRequestID string`

      Unique identifier for the MCP tool call approval request.
      Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

    - `Error string`

      The error from the tool call, if any.

    - `Output string`

      The output from the tool call.

    - `Status string`

      The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

      - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

      - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

      - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

      - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

      - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

  - `type BetaResponseCustomToolCallOutput struct{…}`

    The output of a custom tool call from your code, being sent back to the model.

    - `CallID string`

      The call ID, used to map this custom tool call output to a custom tool call.

    - `Output BetaResponseCustomToolCallOutputOutputUnion`

      The output from the custom tool call generated by your code.
      Can be a string or an list of output content.

      - `string`

      - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

        Text, image, or file output of the custom tool call.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

    - `Type CustomToolCallOutput`

      The type of the custom tool call output. Always `custom_tool_call_output`.

      - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

    - `ID string`

      The unique ID of the custom tool call output in the OpenAI platform.

    - `Agent BetaResponseCustomToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseCustomToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

  - `type BetaResponseCustomToolCall struct{…}`

    A call to a custom tool created by the model.

    - `CallID string`

      An identifier used to map this custom tool call to a tool call output.

    - `Input string`

      The input for the custom tool call generated by the model.

    - `Name string`

      The name of the custom tool being called.

    - `Type CustomToolCall`

      The type of the custom tool call. Always `custom_tool_call`.

      - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

    - `ID string`

      The unique ID of the custom tool call in the OpenAI platform.

    - `Agent BetaResponseCustomToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseCustomToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseCustomToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseCustomToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `Namespace string`

      The namespace of the custom tool being called.

  - `type BetaResponseInputItemCompactionTrigger struct{…}`

    Compacts the current context. Must be the final input item.

    - `Type CompactionTrigger`

      The type of the item. Always `compaction_trigger`.

      - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

    - `Agent BetaResponseInputItemCompactionTriggerAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemItemReference struct{…}`

    An internal identifier for an item to reference.

    - `ID string`

      The ID of the item to reference.

    - `Agent BetaResponseInputItemItemReferenceAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Type string`

      The type of item to reference. Always `item_reference`.

      - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

  - `type BetaResponseInputItemProgram struct{…}`

    - `ID string`

      The unique ID of this program item.

    - `CallID string`

      The stable call ID of the program item.

    - `Code string`

      The JavaScript source executed by programmatic tool calling.

    - `Fingerprint string`

      Opaque program replay fingerprint that must be round-tripped.

    - `Type Program`

      The item type. Always `program`.

      - `const ProgramProgram Program = "program"`

    - `Agent BetaResponseInputItemProgramAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInputItemProgramOutput struct{…}`

    - `ID string`

      The unique ID of this program output item.

    - `CallID string`

      The call ID of the program item.

    - `Result string`

      The result produced by the program item.

    - `Status string`

      The terminal status of the program output.

      - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

      - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

    - `Type ProgramOutput`

      The item type. Always `program_output`.

      - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

    - `Agent BetaResponseInputItemProgramOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

### Beta Response Input Message Content List

- `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

  A list of one or many input items to the model, containing different content
  types.

  - `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`.

      - `const InputTextInputText InputText = "input_text"`

    - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputImage struct{…}`

    An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

    - `Detail BetaResponseInputImageDetail`

      The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

      - `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`.

      - `const InputImageInputImage InputImage = "input_image"`

    - `FileID string`

      The ID of the file to be sent to the model.

    - `ImageURL string`

      The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

    - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

  - `type BetaResponseInputFile struct{…}`

    A file input to the model.

    - `Type InputFile`

      The type of the input item. Always `input_file`.

      - `const InputFileInputFile InputFile = "input_file"`

    - `Detail BetaResponseInputFileDetail`

      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`.

      - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

      - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

      - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

    - `FileData string`

      The content of the file to be sent to the model.

    - `FileID string`

      The ID of the file to be sent to the model.

    - `FileURL string`

      The URL of the file to be sent to the model.

    - `Filename string`

      The name of the file to be sent to the model.

    - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

      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`.

        - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Input Message Item

- `type BetaResponseInputMessageItem struct{…}`

  - `ID string`

    The unique ID of the message input.

  - `Content BetaResponseInputMessageContentList`

    A list of one or many input items to the model, containing different content
    types.

    - `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`.

        - `const InputTextInputText InputText = "input_text"`

      - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

        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`.

          - `const ExplicitExplicit Explicit = "explicit"`

    - `type BetaResponseInputImage struct{…}`

      An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `Detail BetaResponseInputImageDetail`

        The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

        - `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`.

        - `const InputImageInputImage InputImage = "input_image"`

      - `FileID string`

        The ID of the file to be sent to the model.

      - `ImageURL string`

        The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

      - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

        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`.

          - `const ExplicitExplicit Explicit = "explicit"`

    - `type BetaResponseInputFile struct{…}`

      A file input to the model.

      - `Type InputFile`

        The type of the input item. Always `input_file`.

        - `const InputFileInputFile InputFile = "input_file"`

      - `Detail BetaResponseInputFileDetail`

        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`.

        - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

        - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

        - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

      - `FileData string`

        The content of the file to be sent to the model.

      - `FileID string`

        The ID of the file to be sent to the model.

      - `FileURL string`

        The URL of the file to be sent to the model.

      - `Filename string`

        The name of the file to be sent to the model.

      - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

        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`.

          - `const ExplicitExplicit Explicit = "explicit"`

  - `Role BetaResponseInputMessageItemRole`

    The role of the message input. One of `user`, `system`, or `developer`.

    - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"`

    - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"`

    - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"`

  - `Type Message`

    The type of the message input. Always set to `message`.

    - `const MessageMessage Message = "message"`

  - `Agent BetaResponseInputMessageItemAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Status BetaResponseInputMessageItemStatus`

    The status of item. One of `in_progress`, `completed`, or
    `incomplete`. Populated when items are returned via API.

    - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"`

    - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"`

    - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"`

### Beta Response Input Text

- `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`.

    - `const InputTextInputText InputText = "input_text"`

  - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

    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`.

      - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Input Text Content

- `type BetaResponseInputTextContent 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`.

    - `const InputTextInputText InputText = "input_text"`

  - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

    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`.

      - `const ExplicitExplicit Explicit = "explicit"`

### Beta Response Item

- `type BetaResponseItemUnion interface{…}`

  Content item used to generate a response.

  - `type BetaResponseInputMessageItem struct{…}`

    - `ID string`

      The unique ID of the message input.

    - `Content BetaResponseInputMessageContentList`

      A list of one or many input items to the model, containing different content
      types.

      - `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`.

          - `const InputTextInputText InputText = "input_text"`

        - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `Detail BetaResponseInputImageDetail`

          The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

          - `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`.

          - `const InputImageInputImage InputImage = "input_image"`

        - `FileID string`

          The ID of the file to be sent to the model.

        - `ImageURL string`

          The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

        - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

        - `Type InputFile`

          The type of the input item. Always `input_file`.

          - `const InputFileInputFile InputFile = "input_file"`

        - `Detail BetaResponseInputFileDetail`

          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`.

          - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

          - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

          - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

        - `FileData string`

          The content of the file to be sent to the model.

        - `FileID string`

          The ID of the file to be sent to the model.

        - `FileURL string`

          The URL of the file to be sent to the model.

        - `Filename string`

          The name of the file to be sent to the model.

        - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

    - `Role BetaResponseInputMessageItemRole`

      The role of the message input. One of `user`, `system`, or `developer`.

      - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"`

      - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"`

      - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"`

    - `Type Message`

      The type of the message input. Always set to `message`.

      - `const MessageMessage Message = "message"`

    - `Agent BetaResponseInputMessageItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status BetaResponseInputMessageItemStatus`

      The status of item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"`

      - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"`

      - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"`

  - `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.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

          - `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`.

              - `const FileCitationFileCitation FileCitation = "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`.

              - `const URLCitationURLCitation URLCitation = "url_citation"`

            - `URL string`

              The URL of the web resource.

          - `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`.

              - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

              - `const FilePathFilePath FilePath = "file_path"`

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

          - `const OutputTextOutputText OutputText = "output_text"`

        - `Logprobs []BetaResponseOutputTextLogprob`

          - `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`.

          - `const RefusalRefusal Refusal = "refusal"`

    - `Role Assistant`

      The role of the output message. Always `assistant`.

      - `const AssistantAssistant Assistant = "assistant"`

    - `Status BetaResponseOutputMessageStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

      - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

      - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

    - `Type Message`

      The type of the output message. Always `message`.

      - `const MessageMessage Message = "message"`

    - `Agent BetaResponseOutputMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Phase BetaResponseOutputMessagePhase`

      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.

      - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

      - `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`.

      - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

    - `Agent BetaResponseFileSearchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Results []BetaResponseFileSearchToolCallResult`

      The results of the file search tool call.

      - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

        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.

        - `string`

        - `float64`

        - `bool`

      - `FileID string`

        The unique ID of the file.

      - `Filename string`

        The name of the file.

      - `Score float64`

        The relevance score of the file - a value between 0 and 1.

      - `Text string`

        The text that was retrieved from the file.

  - `type BetaResponseComputerToolCall struct{…}`

    A tool call to a computer use tool. See the
    [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

        The type of the pending safety check.

      - `Message string`

        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.

      - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

      - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

      - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

    - `Type BetaResponseComputerToolCallType`

      The type of the computer call. Always `computer_call`.

      - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

    - `Action BetaComputerActionUnion`

      A click action.

      - `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`.

          - `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`.

          - `const ClickClick Click = "click"`

        - `X int64`

          The x-coordinate where the click occurred.

        - `Y int64`

          The y-coordinate where the click occurred.

        - `Keys []string`

          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`.

          - `const DoubleClickDoubleClick DoubleClick = "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`.

          - `const DragDrag Drag = "drag"`

        - `Keys []string`

          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`.

          - `const KeypressKeypress Keypress = "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`.

          - `const MoveMove Move = "move"`

        - `X int64`

          The x-coordinate to move to.

        - `Y int64`

          The y-coordinate to move to.

        - `Keys []string`

          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`.

          - `const ScreenshotScreenshot Screenshot = "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`.

          - `const ScrollScroll Scroll = "scroll"`

        - `X int64`

          The x-coordinate where the scroll occurred.

        - `Y int64`

          The y-coordinate where the scroll occurred.

        - `Keys []string`

          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`.

          - `const TypeType Type = "type"`

      - `type BetaComputerActionWait struct{…}`

        A wait action.

        - `Type Wait`

          Specifies the event type. For a wait action, this property is always set to `wait`.

          - `const WaitWait Wait = "wait"`

    - `Actions BetaComputerActionList`

      Flattened batched actions for `computer_use`. Each action includes an
      `type` discriminator and action-specific fields.

      - `type BetaComputerActionClick struct{…}`

        A click action.

      - `type BetaComputerActionDoubleClick struct{…}`

        A double click action.

      - `type BetaComputerActionDrag struct{…}`

        A drag action.

      - `type BetaComputerActionKeypress struct{…}`

        A collection of keypresses the model would like to perform.

      - `type BetaComputerActionMove struct{…}`

        A mouse move action.

      - `type BetaComputerActionScreenshot struct{…}`

        A screenshot action.

      - `type BetaComputerActionScroll struct{…}`

        A scroll action.

      - `type BetaComputerActionType struct{…}`

        An action to type in text.

      - `type BetaComputerActionWait struct{…}`

        A wait action.

    - `Agent BetaResponseComputerToolCallAgent`

      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.

    - `Output BetaResponseComputerToolCallOutputScreenshot`

      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`.

        - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

      - `FileID string`

        The identifier of an uploaded file that contains the screenshot.

      - `ImageURL string`

        The URL of the screenshot image.

    - `Status BetaResponseComputerToolCallOutputItemStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `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`.

      - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

    - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

      The safety checks reported by the API that have been acknowledged by the
      developer.

      - `ID string`

        The ID of the pending safety check.

      - `Code string`

        The type of the pending safety check.

      - `Message string`

        Details about the pending safety check.

    - `Agent BetaResponseComputerToolCallOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseFunctionWebSearch struct{…}`

    The results of a web search tool call. See the
    [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `ID string`

      The unique ID of the web search tool call.

    - `Action BetaResponseFunctionWebSearchActionUnion`

      An object describing the specific action taken in this web search call.
      Includes details on how the model used the web (search, open_page, find_in_page).

      - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

        Action type "search" - Performs a web search query.

        - `Type Search`

          The action type.

          - `const SearchSearch Search = "search"`

        - `Queries []string`

          The search queries.

        - `Query string`

          The search query.

        - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

          The sources used in the search.

          - `Type URL`

            The type of source. Always `url`.

            - `const URLURL URL = "url"`

          - `URL string`

            The URL of the source.

      - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

        Action type "open_page" - Opens a specific URL from search results.

        - `Type OpenPage`

          The action type.

          - `const OpenPageOpenPage OpenPage = "open_page"`

        - `URL string`

          The URL opened by the model.

      - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

        Action type "find_in_page": Searches for a pattern within a loaded page.

        - `Pattern string`

          The pattern or text to search for within the page.

        - `Type FindInPage`

          The action type.

          - `const FindInPageFindInPage FindInPage = "find_in_page"`

        - `URL string`

          The URL of the page searched for the pattern.

    - `Status BetaResponseFunctionWebSearchStatus`

      The status of the web search tool call.

      - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

      - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

      - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

      - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

    - `Type WebSearchCall`

      The type of the web search tool call. Always `web_search_call`.

      - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

    - `Agent BetaResponseFunctionWebSearchAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionToolCallItem struct{…}`

    A tool call to run a function. See the
    [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

    - `ID string`

      The unique ID of the function tool call.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseFunctionToolCallItemStatusInProgress BetaResponseFunctionToolCallItemStatus = "in_progress"`

      - `const BetaResponseFunctionToolCallItemStatusCompleted BetaResponseFunctionToolCallItemStatus = "completed"`

      - `const BetaResponseFunctionToolCallItemStatusIncomplete BetaResponseFunctionToolCallItemStatus = "incomplete"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseFunctionToolCallOutputItem struct{…}`

    - `ID string`

      The unique ID of the function call tool output.

    - `CallID string`

      The unique ID of the function tool call generated by the model.

    - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

      The output from the function call generated by your code.
      Can be a string or an list of output content.

      - `string`

      - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

        Text, image, or file output of the function call.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

    - `Status BetaResponseFunctionToolCallOutputItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `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`.

      - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

    - `Agent BetaResponseFunctionToolCallOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseItemAgentMessage struct{…}`

    - `ID string`

      The unique ID of the agent message.

    - `Author string`

      The sending agent identity.

    - `Content []BetaResponseItemAgentMessageContentUnion`

      Encrypted content sent between agents.

      - `type BetaResponseInputText struct{…}`

        A text input to the model.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

      - `type BetaResponseItemAgentMessageContentText struct{…}`

        A text content.

        - `Text string`

        - `Type Text`

          - `const TextText Text = "text"`

      - `type BetaResponseItemAgentMessageContentSummaryText 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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `type BetaResponseItemAgentMessageContentReasoningText 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`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `type BetaResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `type BetaResponseItemAgentMessageContentComputerScreenshot 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`.

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailLow BetaResponseItemAgentMessageContentComputerScreenshotDetail = "low"`

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailHigh BetaResponseItemAgentMessageContentComputerScreenshotDetail = "high"`

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailAuto BetaResponseItemAgentMessageContentComputerScreenshotDetail = "auto"`

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailOriginal BetaResponseItemAgentMessageContentComputerScreenshotDetail = "original"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

        - `Type ComputerScreenshot`

          Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `PromptCacheBreakpoint BetaResponseItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

      - `type BetaResponseItemAgentMessageContentEncryptedContent 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`.

          - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

    - `Recipient string`

      The destination agent identity.

    - `Type AgentMessage`

      The type of the item. Always `agent_message`.

      - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

    - `Agent BetaResponseItemAgentMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemMultiAgentCall struct{…}`

    - `ID string`

      The unique ID of the multi-agent call item.

    - `Action string`

      The multi-agent action to execute.

      - `const BetaResponseItemMultiAgentCallActionSpawnAgent BetaResponseItemMultiAgentCallAction = "spawn_agent"`

      - `const BetaResponseItemMultiAgentCallActionInterruptAgent BetaResponseItemMultiAgentCallAction = "interrupt_agent"`

      - `const BetaResponseItemMultiAgentCallActionListAgents BetaResponseItemMultiAgentCallAction = "list_agents"`

      - `const BetaResponseItemMultiAgentCallActionSendMessage BetaResponseItemMultiAgentCallAction = "send_message"`

      - `const BetaResponseItemMultiAgentCallActionFollowupTask BetaResponseItemMultiAgentCallAction = "followup_task"`

      - `const BetaResponseItemMultiAgentCallActionWaitAgent BetaResponseItemMultiAgentCallAction = "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`.

      - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

    - `Agent BetaResponseItemMultiAgentCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemMultiAgentCallOutput struct{…}`

    - `ID string`

      The unique ID of the multi-agent call output item.

    - `Action string`

      The multi-agent action that produced this result.

      - `const BetaResponseItemMultiAgentCallOutputActionSpawnAgent BetaResponseItemMultiAgentCallOutputAction = "spawn_agent"`

      - `const BetaResponseItemMultiAgentCallOutputActionInterruptAgent BetaResponseItemMultiAgentCallOutputAction = "interrupt_agent"`

      - `const BetaResponseItemMultiAgentCallOutputActionListAgents BetaResponseItemMultiAgentCallOutputAction = "list_agents"`

      - `const BetaResponseItemMultiAgentCallOutputActionSendMessage BetaResponseItemMultiAgentCallOutputAction = "send_message"`

      - `const BetaResponseItemMultiAgentCallOutputActionFollowupTask BetaResponseItemMultiAgentCallOutputAction = "followup_task"`

      - `const BetaResponseItemMultiAgentCallOutputActionWaitAgent BetaResponseItemMultiAgentCallOutputAction = "wait_agent"`

    - `CallID string`

      The unique ID of the multi-agent call.

    - `Output []BetaResponseOutputText`

      Text output returned by the multi-agent action.

      - `Annotations []BetaResponseOutputTextAnnotationUnion`

        The annotations of the text output.

      - `Text string`

        The text output from the model.

      - `Type OutputText`

        The type of the output text. Always `output_text`.

      - `Logprobs []BetaResponseOutputTextLogprob`

    - `Type MultiAgentCallOutput`

      The type of the multi-agent result. Always `multi_agent_call_output`.

      - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

    - `Agent BetaResponseItemMultiAgentCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseToolSearchCall struct{…}`

    - `ID string`

      The unique ID of the tool search call item.

    - `Arguments any`

      Arguments used for the tool search call.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchCallExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

      - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

    - `Status BetaResponseToolSearchCallStatus`

      The status of the tool search call item that was recorded.

      - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

      - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

      - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

    - `Type ToolSearchCall`

      The type of the item. Always `tool_search_call`.

      - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

    - `Agent BetaResponseToolSearchCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseToolSearchOutputItem struct{…}`

    - `ID string`

      The unique ID of the tool search output item.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchOutputItemExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

      - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

    - `Status BetaResponseToolSearchOutputItemStatus`

      The status of the tool search output item that was recorded.

      - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

      - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

      - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

    - `Tools []BetaToolUnion`

      The loaded tool definitions returned by tool search.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `Name string`

          The name of the function to call.

        - `Parameters map[string, any]`

          A JSON schema object describing the parameters of the function.

        - `Strict bool`

          Whether strict parameter validation is enforced for this function tool.

        - `Type Function`

          The type of the function tool. Always `function`.

          - `const FunctionFunction Function = "function"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

          - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this function is deferred and loaded via tool search.

        - `Description string`

          A description of the function. Used by the model to determine whether or not to call the function.

        - `OutputSchema map[string, any]`

          A JSON schema object describing the JSON value encoded in string outputs for this function.

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `Type FileSearch`

          The type of the file search tool. Always `file_search`.

          - `const FileSearchFileSearch FileSearch = "file_search"`

        - `VectorStoreIDs []string`

          The IDs of the vector stores to search.

        - `Filters BetaFileSearchToolFiltersUnion`

          A filter to apply.

          - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

            A filter used to compare a specified attribute key to a given value using a defined comparison operation.

            - `Key string`

              The key to compare against the value.

            - `Type string`

              Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

              - `eq`: equals
              - `ne`: not equal
              - `gt`: greater than
              - `gte`: greater than or equal
              - `lt`: less than
              - `lte`: less than or equal
              - `in`: in
              - `nin`: not in

              - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

            - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

              The value to compare against the attribute key; supports string, number, or boolean types.

              - `string`

              - `float64`

              - `bool`

              - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                - `string`

                - `float64`

          - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

            Combine multiple filters using `and` or `or`.

            - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

              Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

              - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

            - `Type string`

              Type of operation: `and` or `or`.

              - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

              - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

        - `MaxNumResults int64`

          The maximum number of results to return. This number should be between 1 and 50 inclusive.

        - `RankingOptions BetaFileSearchToolRankingOptions`

          Ranking options for search.

          - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

            Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

            - `EmbeddingWeight float64`

              The weight of the embedding in the reciprocal ranking fusion.

            - `TextWeight float64`

              The weight of the text in the reciprocal ranking fusion.

          - `Ranker string`

            The ranker to use for the file search.

            - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

            - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

          - `ScoreThreshold float64`

            The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `Type Computer`

          The type of the computer tool. Always `computer`.

          - `const ComputerComputer Computer = "computer"`

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `DisplayHeight int64`

          The height of the computer display.

        - `DisplayWidth int64`

          The width of the computer display.

        - `Environment BetaComputerUsePreviewToolEnvironment`

          The type of computer environment to control.

          - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

          - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

          - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

          - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

          - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

        - `Type ComputerUsePreview`

          The type of the computer use tool. Always `computer_use_preview`.

          - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchToolType`

          The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

          - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

          - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

        - `Filters BetaWebSearchToolFilters`

          Filters for the search.

          - `AllowedDomains []string`

            Allowed domains for the search. If not provided, all domains are allowed.
            Subdomains of the provided domains are allowed as well.

            Example: `["pubmed.ncbi.nlm.nih.gov"]`

        - `SearchContextSize BetaWebSearchToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

          - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

          - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchToolUserLocation`

          The approximate location of the user.

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `Type string`

            The type of location approximation. Always `approximate`.

            - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `ServerLabel string`

          A label for this MCP server, used to identify it in tool calls.

        - `Type Mcp`

          The type of the MCP tool. Always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

          - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

        - `AllowedTools BetaToolMcpAllowedToolsUnion`

          List of allowed tool names or a filter object.

          - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

            A string array of allowed tool names

          - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

        - `Authorization string`

          An OAuth access token that can be used with a remote MCP server, either
          with a custom MCP server URL or a service connector. Your application
          must handle the OAuth authorization flow and provide the token here.

        - `ConnectorID string`

          Identifier for service connectors, like those available in ChatGPT. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
          about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

          Currently supported `connector_id` values are:

          - Dropbox: `connector_dropbox`
          - Gmail: `connector_gmail`
          - Google Calendar: `connector_googlecalendar`
          - Google Drive: `connector_googledrive`
          - Microsoft Teams: `connector_microsoftteams`
          - Outlook Calendar: `connector_outlookcalendar`
          - Outlook Email: `connector_outlookemail`
          - SharePoint: `connector_sharepoint`

          - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

          - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

          - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

          - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

          - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

          - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

          - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

          - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

        - `DeferLoading bool`

          Whether this MCP tool is deferred and discovered via tool search.

        - `Headers map[string, string]`

          Optional HTTP headers to send to the MCP server. Use for authentication
          or other purposes.

        - `RequireApproval BetaToolMcpRequireApprovalUnion`

          Specify which of the MCP server's tools require approval.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

            Specify which of the MCP server's tools require approval. Can be
            `always`, `never`, or a filter object associated with tools
            that require approval.

            - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

            - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

            Specify a single approval policy for all tools. One of `always` or
            `never`. When set to `always`, all tools will require approval. When
            set to `never`, all tools will not require approval.

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

        - `ServerDescription string`

          Optional description of the MCP server, used to provide more context.

        - `ServerURL string`

          The URL for the MCP server. One of `server_url`, `connector_id`, or
          `tunnel_id` must be provided.

        - `TunnelID string`

          The Secure MCP Tunnel ID to use instead of a direct server URL. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided.

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

        - `Container BetaToolCodeInterpreterContainerUnion`

          The code interpreter container. Can be a container ID or an object that
          specifies uploaded file IDs to make available to your code, along with an
          optional `memory_limit` setting.

          - `string`

          - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

            Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

            - `Type Auto`

              Always `auto`.

              - `const AutoAuto Auto = "auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit string`

              The memory limit for the code interpreter container.

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `Type Disabled`

                  Disable outbound network access. Always `disabled`.

                  - `const DisabledDisabled Disabled = "disabled"`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `AllowedDomains []string`

                  A list of allowed domains when type is `allowlist`.

                - `Type Allowlist`

                  Allow outbound network access only to specified domains. Always `allowlist`.

                  - `const AllowlistAllowlist Allowlist = "allowlist"`

                - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                  Optional domain-scoped secrets for allowlisted domains.

                  - `Domain string`

                    The domain associated with the secret.

                  - `Name string`

                    The name of the secret to inject for the domain.

                  - `Value string`

                    The secret value to inject for the domain.

        - `Type CodeInterpreter`

          The type of the code interpreter tool. Always `code_interpreter`.

          - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

          - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

      - `type BetaToolProgrammaticToolCalling struct{…}`

        - `Type ProgrammaticToolCalling`

          The type of the tool. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

        - `Type ImageGeneration`

          The type of the image generation tool. Always `image_generation`.

          - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

        - `Action string`

          Whether to generate a new image or edit an existing image. Default: `auto`.

          - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

          - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

          - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

        - `Background string`

          Allows to set transparency for the background of the generated image(s).
          This parameter is only supported for GPT image models that support
          transparent backgrounds. Must be one of `transparent`, `opaque`, or
          `auto` (default value). When `auto` is used, the model will
          automatically determine the best background for the image.

          `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
          transparent backgrounds. Requests with `background` set to
          `transparent` will return an error for these models; use `opaque` or
          `auto` instead.

          If `transparent`, the output format needs to support transparency,
          so it should be set to either `png` (default value) or `webp`.

          - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

          - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

          - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

        - `InputFidelity string`

          Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

          - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

          - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

        - `InputImageMask BetaToolImageGenerationInputImageMask`

          Optional mask for inpainting. Contains `image_url`
          (string, optional) and `file_id` (string, optional).

          - `FileID string`

            File ID for the mask image.

          - `ImageURL string`

            Base64-encoded mask image.

        - `Model string`

          The image generation model to use. Default: `gpt-image-1`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

            - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

            - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

            - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

            - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

            - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

        - `Moderation string`

          Moderation level for the generated image. Default: `auto`.

          - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

          - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

        - `OutputCompression int64`

          Compression level for the output image. Default: 100.

        - `OutputFormat string`

          The output format of the generated image. One of `png`, `webp`, or
          `jpeg`. Default: `png`.

          - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

          - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

          - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

        - `PartialImages int64`

          Number of partial images to generate in streaming mode, from 0 (default value) to 3.

        - `Quality string`

          The quality of the generated image. One of `low`, `medium`, `high`,
          or `auto`. Default: `auto`.

          - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

          - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

          - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

          - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

        - `Size string`

          The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

            - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

            - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

            - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

        - `Type LocalShell`

          The type of the local shell tool. Always `local_shell`.

          - `const LocalShellLocalShell LocalShell = "local_shell"`

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

        - `Type Shell`

          The type of the shell tool. Always `shell`.

          - `const ShellShell Shell = "shell"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

          - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

        - `Environment BetaFunctionShellToolEnvironmentUnion`

          - `type BetaContainerAuto struct{…}`

            - `Type ContainerAuto`

              Automatically creates a container for this request

              - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit BetaContainerAutoMemoryLimit`

              The memory limit for the container.

              - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

              - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

              - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

              - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

            - `Skills []BetaContainerAutoSkillUnion`

              An optional list of skills referenced by id or inline data.

              - `type BetaSkillReference struct{…}`

                - `SkillID string`

                  The ID of the referenced skill.

                - `Type SkillReference`

                  References a skill created with the /v1/skills endpoint.

                  - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                - `Version string`

                  Optional skill version. Use a positive integer or 'latest'. Omit for default.

              - `type BetaInlineSkill struct{…}`

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Source BetaInlineSkillSource`

                  Inline skill payload

                  - `Data string`

                    Base64-encoded skill zip bundle.

                  - `MediaType ApplicationZip`

                    The media type of the inline skill payload. Must be `application/zip`.

                    - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                  - `Type Base64`

                    The type of the inline skill source. Must be `base64`.

                    - `const Base64Base64 Base64 = "base64"`

                - `Type Inline`

                  Defines an inline skill for this request.

                  - `const InlineInline Inline = "inline"`

          - `type BetaLocalEnvironment struct{…}`

            - `Type Local`

              Use a local computer environment.

              - `const LocalLocal Local = "local"`

            - `Skills []BetaLocalSkill`

              An optional list of skills.

              - `Description string`

                The description of the skill.

              - `Name string`

                The name of the skill.

              - `Path string`

                The path to the directory containing the skill.

          - `type BetaContainerReference struct{…}`

            - `ContainerID string`

              The ID of the referenced container.

            - `Type ContainerReference`

              References a container created with the /v1/containers endpoint

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Name string`

          The name of the custom tool, used to identify it in tool calls.

        - `Type Custom`

          The type of the custom tool. Always `custom`.

          - `const CustomCustom Custom = "custom"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

          - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this tool should be deferred and discovered via tool search.

        - `Description string`

          Optional description of the custom tool, used to provide more context.

        - `Format BetaCustomToolFormatUnion`

          The input format for the custom tool. Default is unconstrained text.

          - `type BetaCustomToolFormatText struct{…}`

            Unconstrained free-form text.

            - `Type Text`

              Unconstrained text format. Always `text`.

              - `const TextText Text = "text"`

          - `type BetaCustomToolFormatGrammar struct{…}`

            A grammar defined by the user.

            - `Definition string`

              The grammar definition.

            - `Syntax string`

              The syntax of the grammar definition. One of `lark` or `regex`.

              - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

              - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

            - `Type Grammar`

              Grammar format. Always `grammar`.

              - `const GrammarGrammar Grammar = "grammar"`

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

        - `Description string`

          A description of the namespace shown to the model.

        - `Name string`

          The namespace name used in tool calls (for example, `crm`).

        - `Tools []BetaNamespaceToolToolUnion`

          The function/custom tools available inside this namespace.

          - `type BetaNamespaceToolToolFunction struct{…}`

            - `Name string`

            - `Type Function`

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

              - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function should be deferred and discovered via tool search.

            - `Description string`

            - `OutputSchema map[string, any]`

              A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

            - `Parameters any`

            - `Strict bool`

              Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Type Namespace`

          The type of the tool. Always `namespace`.

          - `const NamespaceNamespace Namespace = "namespace"`

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

        - `Type ToolSearch`

          The type of the tool. Always `tool_search`.

          - `const ToolSearchToolSearch ToolSearch = "tool_search"`

        - `Description string`

          Description shown to the model for a client-executed tool search tool.

        - `Execution BetaToolSearchToolExecution`

          Whether tool search is executed by the server or by the client.

          - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

          - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

        - `Parameters any`

          Parameter schema for a client-executed tool search tool.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchPreviewToolType`

          The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

        - `SearchContentTypes []string`

          - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

          - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

        - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

          - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

          - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchPreviewToolUserLocation`

          The user's location.

          - `Type Approximate`

            The type of location approximation. Always `approximate`.

            - `const ApproximateApproximate Approximate = "approximate"`

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ApplyPatch`

          The type of the tool. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

          - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

    - `Type ToolSearchOutput`

      The type of the item. Always `tool_search_output`.

      - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

    - `Agent BetaResponseToolSearchOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseItemAdditionalTools struct{…}`

    - `ID string`

      The unique ID of the additional tools item.

    - `Role string`

      The role that provided the additional tools.

      - `const BetaResponseItemAdditionalToolsRoleUnknown BetaResponseItemAdditionalToolsRole = "unknown"`

      - `const BetaResponseItemAdditionalToolsRoleUser BetaResponseItemAdditionalToolsRole = "user"`

      - `const BetaResponseItemAdditionalToolsRoleAssistant BetaResponseItemAdditionalToolsRole = "assistant"`

      - `const BetaResponseItemAdditionalToolsRoleSystem BetaResponseItemAdditionalToolsRole = "system"`

      - `const BetaResponseItemAdditionalToolsRoleCritic BetaResponseItemAdditionalToolsRole = "critic"`

      - `const BetaResponseItemAdditionalToolsRoleDiscriminator BetaResponseItemAdditionalToolsRole = "discriminator"`

      - `const BetaResponseItemAdditionalToolsRoleDeveloper BetaResponseItemAdditionalToolsRole = "developer"`

      - `const BetaResponseItemAdditionalToolsRoleTool BetaResponseItemAdditionalToolsRole = "tool"`

    - `Tools []BetaToolUnion`

      The additional tool definitions made available at this item.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `Type AdditionalTools`

      The type of the item. Always `additional_tools`.

      - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

    - `Agent BetaResponseItemAdditionalToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

    - `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`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `Type Reasoning`

      The type of the object. Always `reasoning`.

      - `const ReasoningReasoning Reasoning = "reasoning"`

    - `Agent BetaResponseReasoningItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Content []BetaResponseReasoningItemContent`

      Reasoning text content.

      - `Text string`

        The reasoning text from the model.

      - `Type ReasoningText`

        The type of the reasoning text. Always `reasoning_text`.

        - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `EncryptedContent string`

      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.

    - `Status BetaResponseReasoningItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

      - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

      - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

  - `type BetaResponseItemProgram struct{…}`

    - `ID string`

      The unique ID of the program item.

    - `CallID string`

      The stable call ID of the program item.

    - `Code string`

      The JavaScript source executed by programmatic tool calling.

    - `Fingerprint string`

      Opaque program replay fingerprint that must be round-tripped.

    - `Type Program`

      The type of the item. Always `program`.

      - `const ProgramProgram Program = "program"`

    - `Agent BetaResponseItemProgramAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemProgramOutput struct{…}`

    - `ID string`

      The unique ID of the program output item.

    - `CallID string`

      The call ID of the program item.

    - `Result string`

      The result produced by the program item.

    - `Status string`

      The terminal status of the program output item.

      - `const BetaResponseItemProgramOutputStatusCompleted BetaResponseItemProgramOutputStatus = "completed"`

      - `const BetaResponseItemProgramOutputStatusIncomplete BetaResponseItemProgramOutputStatus = "incomplete"`

    - `Type ProgramOutput`

      The type of the item. Always `program_output`.

      - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

    - `Agent BetaResponseItemProgramOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCompactionItem struct{…}`

    A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

    - `ID string`

      The unique ID of the compaction item.

    - `EncryptedContent string`

      The encrypted content that was produced by compaction.

    - `Type Compaction`

      The type of the item. Always `compaction`.

      - `const CompactionCompaction Compaction = "compaction"`

    - `Agent BetaResponseCompactionItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseItemImageGenerationCall struct{…}`

    An image generation request made by the model.

    - `ID string`

      The unique ID of the image generation call.

    - `Result string`

      The generated image encoded in base64.

    - `Status string`

      The status of the image generation call.

      - `const BetaResponseItemImageGenerationCallStatusInProgress BetaResponseItemImageGenerationCallStatus = "in_progress"`

      - `const BetaResponseItemImageGenerationCallStatusCompleted BetaResponseItemImageGenerationCallStatus = "completed"`

      - `const BetaResponseItemImageGenerationCallStatusGenerating BetaResponseItemImageGenerationCallStatus = "generating"`

      - `const BetaResponseItemImageGenerationCallStatusFailed BetaResponseItemImageGenerationCallStatus = "failed"`

    - `Type ImageGenerationCall`

      The type of the image generation call. Always `image_generation_call`.

      - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

    - `Agent BetaResponseItemImageGenerationCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterToolCall struct{…}`

    A tool call to run code.

    - `ID string`

      The unique ID of the code interpreter tool call.

    - `Code string`

      The code to run, or null if not available.

    - `ContainerID string`

      The ID of the container used to run the code.

    - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

      The outputs generated by the code interpreter, such as logs or images.
      Can be null if no outputs are available.

      - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

        The logs output from the code interpreter.

        - `Logs string`

          The logs output from the code interpreter.

        - `Type Logs`

          The type of the output. Always `logs`.

          - `const LogsLogs Logs = "logs"`

      - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

        The image output from the code interpreter.

        - `Type Image`

          The type of the output. Always `image`.

          - `const ImageImage Image = "image"`

        - `URL string`

          The URL of the image output from the code interpreter.

    - `Status BetaResponseCodeInterpreterToolCallStatus`

      The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

      - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

      - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

      - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

      - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

      - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

    - `Type CodeInterpreterCall`

      The type of the code interpreter tool call. Always `code_interpreter_call`.

      - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

    - `Agent BetaResponseCodeInterpreterToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemLocalShellCall struct{…}`

    A tool call to run a command on the local shell.

    - `ID string`

      The unique ID of the local shell call.

    - `Action BetaResponseItemLocalShellCallAction`

      Execute a shell command on the server.

      - `Command []string`

        The command to run.

      - `Env map[string, string]`

        Environment variables to set for the command.

      - `Type Exec`

        The type of the local shell action. Always `exec`.

        - `const ExecExec Exec = "exec"`

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the command.

      - `User string`

        Optional user to run the command as.

      - `WorkingDirectory string`

        Optional working directory to run the command in.

    - `CallID string`

      The unique ID of the local shell tool call generated by the model.

    - `Status string`

      The status of the local shell call.

      - `const BetaResponseItemLocalShellCallStatusInProgress BetaResponseItemLocalShellCallStatus = "in_progress"`

      - `const BetaResponseItemLocalShellCallStatusCompleted BetaResponseItemLocalShellCallStatus = "completed"`

      - `const BetaResponseItemLocalShellCallStatusIncomplete BetaResponseItemLocalShellCallStatus = "incomplete"`

    - `Type LocalShellCall`

      The type of the local shell call. Always `local_shell_call`.

      - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

    - `Agent BetaResponseItemLocalShellCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemLocalShellCallOutput struct{…}`

    The output of a local shell tool call.

    - `ID string`

      The unique ID of the local shell tool call generated by the model.

    - `Output string`

      A JSON string of the output of the local shell tool call.

    - `Type LocalShellCallOutput`

      The type of the local shell tool call output. Always `local_shell_call_output`.

      - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

    - `Agent BetaResponseItemLocalShellCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseItemLocalShellCallOutputStatusInProgress BetaResponseItemLocalShellCallOutputStatus = "in_progress"`

      - `const BetaResponseItemLocalShellCallOutputStatusCompleted BetaResponseItemLocalShellCallOutputStatus = "completed"`

      - `const BetaResponseItemLocalShellCallOutputStatusIncomplete BetaResponseItemLocalShellCallOutputStatus = "incomplete"`

  - `type BetaResponseFunctionShellToolCall struct{…}`

    A tool call that executes one or more shell commands in a managed environment.

    - `ID string`

      The unique ID of the shell tool call. Populated when this item is returned via API.

    - `Action BetaResponseFunctionShellToolCallAction`

      The shell commands and limits that describe how to run the tool call.

      - `Commands []string`

      - `MaxOutputLength int64`

        Optional maximum number of characters to return from each command.

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the commands.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

      Represents the use of a local environment to perform shell actions.

      - `type BetaResponseLocalEnvironment struct{…}`

        Represents the use of a local environment to perform shell actions.

        - `Type Local`

          The environment type. Always `local`.

          - `const LocalLocal Local = "local"`

      - `type BetaResponseContainerReference struct{…}`

        Represents a container created with /v1/containers.

        - `ContainerID string`

        - `Type ContainerReference`

          The environment type. Always `container_reference`.

          - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

    - `Status BetaResponseFunctionShellToolCallStatus`

      The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

      - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

      - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

    - `Type ShellCall`

      The type of the item. Always `shell_call`.

      - `const ShellCallShellCall ShellCall = "shell_call"`

    - `Agent BetaResponseFunctionShellToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionShellToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call.

  - `type BetaResponseFunctionShellToolCallOutput struct{…}`

    The output of a shell tool call that was emitted.

    - `ID string`

      The unique ID of the shell call output. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `MaxOutputLength int64`

      The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

    - `Output []BetaResponseFunctionShellToolCallOutputOutput`

      An array of shell call output contents

      - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

        Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

        - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

          Indicates that the shell call exceeded its configured time limit.

          - `Type Timeout`

            The outcome type. Always `timeout`.

            - `const TimeoutTimeout Timeout = "timeout"`

        - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

          Indicates that the shell commands finished and returned an exit code.

          - `ExitCode int64`

            Exit code from the shell process.

          - `Type Exit`

            The outcome type. Always `exit`.

            - `const ExitExit Exit = "exit"`

      - `Stderr string`

        The standard error output that was captured.

      - `Stdout string`

        The standard output that was captured.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `Status BetaResponseFunctionShellToolCallOutputStatus`

      The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

      - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

      - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

    - `Type ShellCallOutput`

      The type of the shell call output. Always `shell_call_output`.

      - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

    - `Agent BetaResponseFunctionShellToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseApplyPatchToolCall struct{…}`

    A tool call that applies file diffs by creating, deleting, or updating files.

    - `ID string`

      The unique ID of the apply patch tool call. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Operation BetaResponseApplyPatchToolCallOperationUnion`

      One of the create_file, delete_file, or update_file operations applied via apply_patch.

      - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

        Instruction describing how to create a file via the apply_patch tool.

        - `Diff string`

          Diff to apply.

        - `Path string`

          Path of the file to create.

        - `Type CreateFile`

          Create a new file with the provided diff.

          - `const CreateFileCreateFile CreateFile = "create_file"`

      - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

        Instruction describing how to delete a file via the apply_patch tool.

        - `Path string`

          Path of the file to delete.

        - `Type DeleteFile`

          Delete the specified file.

          - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

      - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

        Instruction describing how to update a file via the apply_patch tool.

        - `Diff string`

          Diff to apply.

        - `Path string`

          Path of the file to update.

        - `Type UpdateFile`

          Update an existing file with the provided diff.

          - `const UpdateFileUpdateFile UpdateFile = "update_file"`

    - `Status BetaResponseApplyPatchToolCallStatus`

      The status of the apply patch tool call. One of `in_progress` or `completed`.

      - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

      - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

    - `Type ApplyPatchCall`

      The type of the item. Always `apply_patch_call`.

      - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

    - `Agent BetaResponseApplyPatchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseApplyPatchToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call.

  - `type BetaResponseApplyPatchToolCallOutput struct{…}`

    The output emitted by an apply patch tool call.

    - `ID string`

      The unique ID of the apply patch tool call output. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Status BetaResponseApplyPatchToolCallOutputStatus`

      The status of the apply patch tool call output. One of `completed` or `failed`.

      - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

      - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

    - `Type ApplyPatchCallOutput`

      The type of the item. Always `apply_patch_call_output`.

      - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

    - `Agent BetaResponseApplyPatchToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call output.

    - `Output string`

      Optional textual output returned by the apply patch tool.

  - `type BetaResponseItemMcpListTools struct{…}`

    A list of tools available on an MCP server.

    - `ID string`

      The unique ID of the list.

    - `ServerLabel string`

      The label of the MCP server.

    - `Tools []BetaResponseItemMcpListToolsTool`

      The tools available on the server.

      - `InputSchema any`

        The JSON schema describing the tool's input.

      - `Name string`

        The name of the tool.

      - `Annotations any`

        Additional annotations about the tool.

      - `Description string`

        The description of the tool.

    - `Type McpListTools`

      The type of the item. Always `mcp_list_tools`.

      - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

    - `Agent BetaResponseItemMcpListToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Error string`

      Error message if the server could not list tools.

  - `type BetaResponseItemMcpApprovalRequest struct{…}`

    A request for human approval of a tool invocation.

    - `ID string`

      The unique ID of the approval request.

    - `Arguments string`

      A JSON string of arguments for the tool.

    - `Name string`

      The name of the tool to run.

    - `ServerLabel string`

      The label of the MCP server making the request.

    - `Type McpApprovalRequest`

      The type of the item. Always `mcp_approval_request`.

      - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

    - `Agent BetaResponseItemMcpApprovalRequestAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemMcpApprovalResponse struct{…}`

    A response to an MCP approval request.

    - `ID string`

      The unique ID of the approval response

    - `ApprovalRequestID string`

      The ID of the approval request being answered.

    - `Approve bool`

      Whether the request was approved.

    - `Type McpApprovalResponse`

      The type of the item. Always `mcp_approval_response`.

      - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

    - `Agent BetaResponseItemMcpApprovalResponseAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Reason string`

      Optional reason for the decision.

  - `type BetaResponseItemMcpCall struct{…}`

    An invocation of a tool on an MCP server.

    - `ID string`

      The unique ID of the tool call.

    - `Arguments string`

      A JSON string of the arguments passed to the tool.

    - `Name string`

      The name of the tool that was run.

    - `ServerLabel string`

      The label of the MCP server running the tool.

    - `Type McpCall`

      The type of the item. Always `mcp_call`.

      - `const McpCallMcpCall McpCall = "mcp_call"`

    - `Agent BetaResponseItemMcpCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `ApprovalRequestID string`

      Unique identifier for the MCP tool call approval request.
      Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

    - `Error string`

      The error from the tool call, if any.

    - `Output string`

      The output from the tool call.

    - `Status string`

      The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

      - `const BetaResponseItemMcpCallStatusInProgress BetaResponseItemMcpCallStatus = "in_progress"`

      - `const BetaResponseItemMcpCallStatusCompleted BetaResponseItemMcpCallStatus = "completed"`

      - `const BetaResponseItemMcpCallStatusIncomplete BetaResponseItemMcpCallStatus = "incomplete"`

      - `const BetaResponseItemMcpCallStatusCalling BetaResponseItemMcpCallStatus = "calling"`

      - `const BetaResponseItemMcpCallStatusFailed BetaResponseItemMcpCallStatus = "failed"`

  - `type BetaResponseCustomToolCallItem struct{…}`

    A call to a custom tool created by the model.

    - `ID string`

      The unique ID of the custom tool call item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseCustomToolCallItemStatusInProgress BetaResponseCustomToolCallItemStatus = "in_progress"`

      - `const BetaResponseCustomToolCallItemStatusCompleted BetaResponseCustomToolCallItemStatus = "completed"`

      - `const BetaResponseCustomToolCallItemStatusIncomplete BetaResponseCustomToolCallItemStatus = "incomplete"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseCustomToolCallOutputItem struct{…}`

    The output of a custom tool call from your code, being sent back to the model.

    - `ID string`

      The unique ID of the custom tool call output item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

      - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

      - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

### Beta Response Local Environment

- `type BetaResponseLocalEnvironment struct{…}`

  Represents the use of a local environment to perform shell actions.

  - `Type Local`

    The environment type. Always `local`.

    - `const LocalLocal Local = "local"`

### Beta Response Mcp Call Arguments Delta Event

- `type BetaResponseMcpCallArgumentsDeltaEvent struct{…}`

  Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

  - `Delta string`

    A JSON string containing the partial update to the arguments for the MCP tool call.

  - `ItemID string`

    The unique identifier of the MCP tool call item being processed.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpCallArgumentsDelta`

    The type of the event. Always 'response.mcp_call_arguments.delta'.

    - `const ResponseMcpCallArgumentsDeltaResponseMcpCallArgumentsDelta ResponseMcpCallArgumentsDelta = "response.mcp_call_arguments.delta"`

  - `Agent BetaResponseMcpCallArgumentsDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Mcp Call Arguments Done Event

- `type BetaResponseMcpCallArgumentsDoneEvent struct{…}`

  Emitted when the arguments for an MCP tool call are finalized.

  - `Arguments string`

    A JSON string containing the finalized arguments for the MCP tool call.

  - `ItemID string`

    The unique identifier of the MCP tool call item being processed.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpCallArgumentsDone`

    The type of the event. Always 'response.mcp_call_arguments.done'.

    - `const ResponseMcpCallArgumentsDoneResponseMcpCallArgumentsDone ResponseMcpCallArgumentsDone = "response.mcp_call_arguments.done"`

  - `Agent BetaResponseMcpCallArgumentsDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Mcp Call Completed Event

- `type BetaResponseMcpCallCompletedEvent struct{…}`

  Emitted when an MCP  tool call has completed successfully.

  - `ItemID string`

    The ID of the MCP tool call item that completed.

  - `OutputIndex int64`

    The index of the output item that completed.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpCallCompleted`

    The type of the event. Always 'response.mcp_call.completed'.

    - `const ResponseMcpCallCompletedResponseMcpCallCompleted ResponseMcpCallCompleted = "response.mcp_call.completed"`

  - `Agent BetaResponseMcpCallCompletedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Mcp Call Failed Event

- `type BetaResponseMcpCallFailedEvent struct{…}`

  Emitted when an MCP  tool call has failed.

  - `ItemID string`

    The ID of the MCP tool call item that failed.

  - `OutputIndex int64`

    The index of the output item that failed.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpCallFailed`

    The type of the event. Always 'response.mcp_call.failed'.

    - `const ResponseMcpCallFailedResponseMcpCallFailed ResponseMcpCallFailed = "response.mcp_call.failed"`

  - `Agent BetaResponseMcpCallFailedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Mcp Call In Progress Event

- `type BetaResponseMcpCallInProgressEvent struct{…}`

  Emitted when an MCP  tool call is in progress.

  - `ItemID string`

    The unique identifier of the MCP tool call item being processed.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpCallInProgress`

    The type of the event. Always 'response.mcp_call.in_progress'.

    - `const ResponseMcpCallInProgressResponseMcpCallInProgress ResponseMcpCallInProgress = "response.mcp_call.in_progress"`

  - `Agent BetaResponseMcpCallInProgressEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Mcp List Tools Completed Event

- `type BetaResponseMcpListToolsCompletedEvent struct{…}`

  Emitted when the list of available MCP tools has been successfully retrieved.

  - `ItemID string`

    The ID of the MCP tool call item that produced this output.

  - `OutputIndex int64`

    The index of the output item that was processed.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpListToolsCompleted`

    The type of the event. Always 'response.mcp_list_tools.completed'.

    - `const ResponseMcpListToolsCompletedResponseMcpListToolsCompleted ResponseMcpListToolsCompleted = "response.mcp_list_tools.completed"`

  - `Agent BetaResponseMcpListToolsCompletedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Mcp List Tools Failed Event

- `type BetaResponseMcpListToolsFailedEvent struct{…}`

  Emitted when the attempt to list available MCP tools has failed.

  - `ItemID string`

    The ID of the MCP tool call item that failed.

  - `OutputIndex int64`

    The index of the output item that failed.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpListToolsFailed`

    The type of the event. Always 'response.mcp_list_tools.failed'.

    - `const ResponseMcpListToolsFailedResponseMcpListToolsFailed ResponseMcpListToolsFailed = "response.mcp_list_tools.failed"`

  - `Agent BetaResponseMcpListToolsFailedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Mcp List Tools In Progress Event

- `type BetaResponseMcpListToolsInProgressEvent struct{…}`

  Emitted when the system is in the process of retrieving the list of available MCP tools.

  - `ItemID string`

    The ID of the MCP tool call item that is being processed.

  - `OutputIndex int64`

    The index of the output item that is being processed.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseMcpListToolsInProgress`

    The type of the event. Always 'response.mcp_list_tools.in_progress'.

    - `const ResponseMcpListToolsInProgressResponseMcpListToolsInProgress ResponseMcpListToolsInProgress = "response.mcp_list_tools.in_progress"`

  - `Agent BetaResponseMcpListToolsInProgressEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Output Audio

- `type BetaResponseOutputAudio struct{…}`

  An audio output from the model.

  - `Data string`

    Base64-encoded audio data from the model.

  - `Transcript string`

    The transcript of the audio data from the model.

  - `Type OutputAudio`

    The type of the output audio. Always `output_audio`.

    - `const OutputAudioOutputAudio OutputAudio = "output_audio"`

### Beta Response Output Item

- `type BetaResponseOutputItemUnion interface{…}`

  An output message from the model.

  - `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.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

          - `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`.

              - `const FileCitationFileCitation FileCitation = "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`.

              - `const URLCitationURLCitation URLCitation = "url_citation"`

            - `URL string`

              The URL of the web resource.

          - `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`.

              - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

              - `const FilePathFilePath FilePath = "file_path"`

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

          - `const OutputTextOutputText OutputText = "output_text"`

        - `Logprobs []BetaResponseOutputTextLogprob`

          - `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`.

          - `const RefusalRefusal Refusal = "refusal"`

    - `Role Assistant`

      The role of the output message. Always `assistant`.

      - `const AssistantAssistant Assistant = "assistant"`

    - `Status BetaResponseOutputMessageStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

      - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

      - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

    - `Type Message`

      The type of the output message. Always `message`.

      - `const MessageMessage Message = "message"`

    - `Agent BetaResponseOutputMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Phase BetaResponseOutputMessagePhase`

      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.

      - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

      - `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`.

      - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

    - `Agent BetaResponseFileSearchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Results []BetaResponseFileSearchToolCallResult`

      The results of the file search tool call.

      - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

        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.

        - `string`

        - `float64`

        - `bool`

      - `FileID string`

        The unique ID of the file.

      - `Filename string`

        The name of the file.

      - `Score float64`

        The relevance score of the file - a value between 0 and 1.

      - `Text string`

        The text that was retrieved from the file.

  - `type BetaResponseFunctionToolCall struct{…}`

    A tool call to run a function. See the
    [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

      - `const FunctionCallFunctionCall FunctionCall = "function_call"`

    - `ID string`

      The unique ID of the function tool call.

    - `Agent BetaResponseFunctionToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `Namespace string`

      The namespace of the function to run.

    - `Status BetaResponseFunctionToolCallStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `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.

    - `CallID string`

      The unique ID of the function tool call generated by the model.

    - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

      The output from the function call generated by your code.
      Can be a string or an list of output content.

      - `string`

      - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

        Text, image, or file output of the function call.

        - `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`.

            - `const InputTextInputText InputText = "input_text"`

          - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `Detail BetaResponseInputImageDetail`

            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

            - `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`.

            - `const InputImageInputImage InputImage = "input_image"`

          - `FileID string`

            The ID of the file to be sent to the model.

          - `ImageURL string`

            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

          - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

          - `Type InputFile`

            The type of the input item. Always `input_file`.

            - `const InputFileInputFile InputFile = "input_file"`

          - `Detail BetaResponseInputFileDetail`

            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`.

            - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

            - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

            - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

          - `FileData string`

            The content of the file to be sent to the model.

          - `FileID string`

            The ID of the file to be sent to the model.

          - `FileURL string`

            The URL of the file to be sent to the model.

          - `Filename string`

            The name of the file to be sent to the model.

          - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

    - `Status BetaResponseFunctionToolCallOutputItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `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`.

      - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

    - `Agent BetaResponseFunctionToolCallOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `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.

      - `type BetaResponseInputText struct{…}`

        A text input to the model.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

      - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

        A text content.

        - `Text string`

        - `Type Text`

          - `const TextText Text = "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`.

          - `const SummaryTextSummaryText SummaryText = "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`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `type BetaResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `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`.

          - `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.

        - `Type ComputerScreenshot`

          Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

      - `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`.

          - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

    - `Recipient string`

      The destination agent identity.

    - `Type AgentMessage`

      The type of the item. Always `agent_message`.

      - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

    - `Agent BetaResponseOutputItemAgentMessageAgent`

      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.

      - `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`.

      - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

    - `Agent BetaResponseOutputItemMultiAgentCallAgent`

      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.

      - `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.

    - `Output []BetaResponseOutputText`

      Text output returned by the multi-agent action.

      - `Annotations []BetaResponseOutputTextAnnotationUnion`

        The annotations of the text output.

      - `Text string`

        The text output from the model.

      - `Type OutputText`

        The type of the output text. Always `output_text`.

      - `Logprobs []BetaResponseOutputTextLogprob`

    - `Type MultiAgentCallOutput`

      The type of the multi-agent result. Always `multi_agent_call_output`.

      - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

    - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionWebSearch struct{…}`

    The results of a web search tool call. See the
    [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `ID string`

      The unique ID of the web search tool call.

    - `Action BetaResponseFunctionWebSearchActionUnion`

      An object describing the specific action taken in this web search call.
      Includes details on how the model used the web (search, open_page, find_in_page).

      - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

        Action type "search" - Performs a web search query.

        - `Type Search`

          The action type.

          - `const SearchSearch Search = "search"`

        - `Queries []string`

          The search queries.

        - `Query string`

          The search query.

        - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

          The sources used in the search.

          - `Type URL`

            The type of source. Always `url`.

            - `const URLURL URL = "url"`

          - `URL string`

            The URL of the source.

      - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

        Action type "open_page" - Opens a specific URL from search results.

        - `Type OpenPage`

          The action type.

          - `const OpenPageOpenPage OpenPage = "open_page"`

        - `URL string`

          The URL opened by the model.

      - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

        Action type "find_in_page": Searches for a pattern within a loaded page.

        - `Pattern string`

          The pattern or text to search for within the page.

        - `Type FindInPage`

          The action type.

          - `const FindInPageFindInPage FindInPage = "find_in_page"`

        - `URL string`

          The URL of the page searched for the pattern.

    - `Status BetaResponseFunctionWebSearchStatus`

      The status of the web search tool call.

      - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

      - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

      - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

      - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

    - `Type WebSearchCall`

      The type of the web search tool call. Always `web_search_call`.

      - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

    - `Agent BetaResponseFunctionWebSearchAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseComputerToolCall struct{…}`

    A tool call to a computer use tool. See the
    [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

        The type of the pending safety check.

      - `Message string`

        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.

      - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

      - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

      - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

    - `Type BetaResponseComputerToolCallType`

      The type of the computer call. Always `computer_call`.

      - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

    - `Action BetaComputerActionUnion`

      A click action.

      - `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`.

          - `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`.

          - `const ClickClick Click = "click"`

        - `X int64`

          The x-coordinate where the click occurred.

        - `Y int64`

          The y-coordinate where the click occurred.

        - `Keys []string`

          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`.

          - `const DoubleClickDoubleClick DoubleClick = "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`.

          - `const DragDrag Drag = "drag"`

        - `Keys []string`

          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`.

          - `const KeypressKeypress Keypress = "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`.

          - `const MoveMove Move = "move"`

        - `X int64`

          The x-coordinate to move to.

        - `Y int64`

          The y-coordinate to move to.

        - `Keys []string`

          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`.

          - `const ScreenshotScreenshot Screenshot = "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`.

          - `const ScrollScroll Scroll = "scroll"`

        - `X int64`

          The x-coordinate where the scroll occurred.

        - `Y int64`

          The y-coordinate where the scroll occurred.

        - `Keys []string`

          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`.

          - `const TypeType Type = "type"`

      - `type BetaComputerActionWait struct{…}`

        A wait action.

        - `Type Wait`

          Specifies the event type. For a wait action, this property is always set to `wait`.

          - `const WaitWait Wait = "wait"`

    - `Actions BetaComputerActionList`

      Flattened batched actions for `computer_use`. Each action includes an
      `type` discriminator and action-specific fields.

      - `type BetaComputerActionClick struct{…}`

        A click action.

      - `type BetaComputerActionDoubleClick struct{…}`

        A double click action.

      - `type BetaComputerActionDrag struct{…}`

        A drag action.

      - `type BetaComputerActionKeypress struct{…}`

        A collection of keypresses the model would like to perform.

      - `type BetaComputerActionMove struct{…}`

        A mouse move action.

      - `type BetaComputerActionScreenshot struct{…}`

        A screenshot action.

      - `type BetaComputerActionScroll struct{…}`

        A scroll action.

      - `type BetaComputerActionType struct{…}`

        An action to type in text.

      - `type BetaComputerActionWait struct{…}`

        A wait action.

    - `Agent BetaResponseComputerToolCallAgent`

      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.

    - `Output BetaResponseComputerToolCallOutputScreenshot`

      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`.

        - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

      - `FileID string`

        The identifier of an uploaded file that contains the screenshot.

      - `ImageURL string`

        The URL of the screenshot image.

    - `Status BetaResponseComputerToolCallOutputItemStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `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`.

      - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

    - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

      The safety checks reported by the API that have been acknowledged by the
      developer.

      - `ID string`

        The ID of the pending safety check.

      - `Code string`

        The type of the pending safety check.

      - `Message string`

        Details about the pending safety check.

    - `Agent BetaResponseComputerToolCallOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      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](https://platform.openai.com/docs/guides/conversation-state).

    - `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`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `Type Reasoning`

      The type of the object. Always `reasoning`.

      - `const ReasoningReasoning Reasoning = "reasoning"`

    - `Agent BetaResponseReasoningItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Content []BetaResponseReasoningItemContent`

      Reasoning text content.

      - `Text string`

        The reasoning text from the model.

      - `Type ReasoningText`

        The type of the reasoning text. Always `reasoning_text`.

        - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `EncryptedContent string`

      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.

    - `Status BetaResponseReasoningItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

      - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

      - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

  - `type BetaResponseOutputItemProgram struct{…}`

    - `ID string`

      The unique ID of the program item.

    - `CallID string`

      The stable call ID of the program item.

    - `Code string`

      The JavaScript source executed by programmatic tool calling.

    - `Fingerprint string`

      Opaque program replay fingerprint that must be round-tripped.

    - `Type Program`

      The type of the item. Always `program`.

      - `const ProgramProgram Program = "program"`

    - `Agent BetaResponseOutputItemProgramAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemProgramOutput struct{…}`

    - `ID string`

      The unique ID of the program output item.

    - `CallID string`

      The call ID of the program item.

    - `Result string`

      The result produced by the program item.

    - `Status string`

      The terminal status of the program output item.

      - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

      - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

    - `Type ProgramOutput`

      The type of the item. Always `program_output`.

      - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

    - `Agent BetaResponseOutputItemProgramOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseToolSearchCall struct{…}`

    - `ID string`

      The unique ID of the tool search call item.

    - `Arguments any`

      Arguments used for the tool search call.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchCallExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

      - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

    - `Status BetaResponseToolSearchCallStatus`

      The status of the tool search call item that was recorded.

      - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

      - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

      - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

    - `Type ToolSearchCall`

      The type of the item. Always `tool_search_call`.

      - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

    - `Agent BetaResponseToolSearchCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseToolSearchOutputItem struct{…}`

    - `ID string`

      The unique ID of the tool search output item.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchOutputItemExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

      - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

    - `Status BetaResponseToolSearchOutputItemStatus`

      The status of the tool search output item that was recorded.

      - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

      - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

      - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

    - `Tools []BetaToolUnion`

      The loaded tool definitions returned by tool search.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `Name string`

          The name of the function to call.

        - `Parameters map[string, any]`

          A JSON schema object describing the parameters of the function.

        - `Strict bool`

          Whether strict parameter validation is enforced for this function tool.

        - `Type Function`

          The type of the function tool. Always `function`.

          - `const FunctionFunction Function = "function"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

          - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this function is deferred and loaded via tool search.

        - `Description string`

          A description of the function. Used by the model to determine whether or not to call the function.

        - `OutputSchema map[string, any]`

          A JSON schema object describing the JSON value encoded in string outputs for this function.

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `Type FileSearch`

          The type of the file search tool. Always `file_search`.

          - `const FileSearchFileSearch FileSearch = "file_search"`

        - `VectorStoreIDs []string`

          The IDs of the vector stores to search.

        - `Filters BetaFileSearchToolFiltersUnion`

          A filter to apply.

          - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

            A filter used to compare a specified attribute key to a given value using a defined comparison operation.

            - `Key string`

              The key to compare against the value.

            - `Type string`

              Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

              - `eq`: equals
              - `ne`: not equal
              - `gt`: greater than
              - `gte`: greater than or equal
              - `lt`: less than
              - `lte`: less than or equal
              - `in`: in
              - `nin`: not in

              - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

            - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

              The value to compare against the attribute key; supports string, number, or boolean types.

              - `string`

              - `float64`

              - `bool`

              - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                - `string`

                - `float64`

          - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

            Combine multiple filters using `and` or `or`.

            - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

              Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

              - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

            - `Type string`

              Type of operation: `and` or `or`.

              - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

              - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

        - `MaxNumResults int64`

          The maximum number of results to return. This number should be between 1 and 50 inclusive.

        - `RankingOptions BetaFileSearchToolRankingOptions`

          Ranking options for search.

          - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

            Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

            - `EmbeddingWeight float64`

              The weight of the embedding in the reciprocal ranking fusion.

            - `TextWeight float64`

              The weight of the text in the reciprocal ranking fusion.

          - `Ranker string`

            The ranker to use for the file search.

            - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

            - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

          - `ScoreThreshold float64`

            The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `Type Computer`

          The type of the computer tool. Always `computer`.

          - `const ComputerComputer Computer = "computer"`

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `DisplayHeight int64`

          The height of the computer display.

        - `DisplayWidth int64`

          The width of the computer display.

        - `Environment BetaComputerUsePreviewToolEnvironment`

          The type of computer environment to control.

          - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

          - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

          - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

          - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

          - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

        - `Type ComputerUsePreview`

          The type of the computer use tool. Always `computer_use_preview`.

          - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchToolType`

          The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

          - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

          - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

        - `Filters BetaWebSearchToolFilters`

          Filters for the search.

          - `AllowedDomains []string`

            Allowed domains for the search. If not provided, all domains are allowed.
            Subdomains of the provided domains are allowed as well.

            Example: `["pubmed.ncbi.nlm.nih.gov"]`

        - `SearchContextSize BetaWebSearchToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

          - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

          - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchToolUserLocation`

          The approximate location of the user.

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `Type string`

            The type of location approximation. Always `approximate`.

            - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `ServerLabel string`

          A label for this MCP server, used to identify it in tool calls.

        - `Type Mcp`

          The type of the MCP tool. Always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

          - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

        - `AllowedTools BetaToolMcpAllowedToolsUnion`

          List of allowed tool names or a filter object.

          - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

            A string array of allowed tool names

          - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

        - `Authorization string`

          An OAuth access token that can be used with a remote MCP server, either
          with a custom MCP server URL or a service connector. Your application
          must handle the OAuth authorization flow and provide the token here.

        - `ConnectorID string`

          Identifier for service connectors, like those available in ChatGPT. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
          about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

          Currently supported `connector_id` values are:

          - Dropbox: `connector_dropbox`
          - Gmail: `connector_gmail`
          - Google Calendar: `connector_googlecalendar`
          - Google Drive: `connector_googledrive`
          - Microsoft Teams: `connector_microsoftteams`
          - Outlook Calendar: `connector_outlookcalendar`
          - Outlook Email: `connector_outlookemail`
          - SharePoint: `connector_sharepoint`

          - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

          - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

          - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

          - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

          - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

          - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

          - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

          - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

        - `DeferLoading bool`

          Whether this MCP tool is deferred and discovered via tool search.

        - `Headers map[string, string]`

          Optional HTTP headers to send to the MCP server. Use for authentication
          or other purposes.

        - `RequireApproval BetaToolMcpRequireApprovalUnion`

          Specify which of the MCP server's tools require approval.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

            Specify which of the MCP server's tools require approval. Can be
            `always`, `never`, or a filter object associated with tools
            that require approval.

            - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

            - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

            Specify a single approval policy for all tools. One of `always` or
            `never`. When set to `always`, all tools will require approval. When
            set to `never`, all tools will not require approval.

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

        - `ServerDescription string`

          Optional description of the MCP server, used to provide more context.

        - `ServerURL string`

          The URL for the MCP server. One of `server_url`, `connector_id`, or
          `tunnel_id` must be provided.

        - `TunnelID string`

          The Secure MCP Tunnel ID to use instead of a direct server URL. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided.

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

        - `Container BetaToolCodeInterpreterContainerUnion`

          The code interpreter container. Can be a container ID or an object that
          specifies uploaded file IDs to make available to your code, along with an
          optional `memory_limit` setting.

          - `string`

          - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

            Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

            - `Type Auto`

              Always `auto`.

              - `const AutoAuto Auto = "auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit string`

              The memory limit for the code interpreter container.

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `Type Disabled`

                  Disable outbound network access. Always `disabled`.

                  - `const DisabledDisabled Disabled = "disabled"`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `AllowedDomains []string`

                  A list of allowed domains when type is `allowlist`.

                - `Type Allowlist`

                  Allow outbound network access only to specified domains. Always `allowlist`.

                  - `const AllowlistAllowlist Allowlist = "allowlist"`

                - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                  Optional domain-scoped secrets for allowlisted domains.

                  - `Domain string`

                    The domain associated with the secret.

                  - `Name string`

                    The name of the secret to inject for the domain.

                  - `Value string`

                    The secret value to inject for the domain.

        - `Type CodeInterpreter`

          The type of the code interpreter tool. Always `code_interpreter`.

          - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

          - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

      - `type BetaToolProgrammaticToolCalling struct{…}`

        - `Type ProgrammaticToolCalling`

          The type of the tool. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

        - `Type ImageGeneration`

          The type of the image generation tool. Always `image_generation`.

          - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

        - `Action string`

          Whether to generate a new image or edit an existing image. Default: `auto`.

          - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

          - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

          - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

        - `Background string`

          Allows to set transparency for the background of the generated image(s).
          This parameter is only supported for GPT image models that support
          transparent backgrounds. Must be one of `transparent`, `opaque`, or
          `auto` (default value). When `auto` is used, the model will
          automatically determine the best background for the image.

          `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
          transparent backgrounds. Requests with `background` set to
          `transparent` will return an error for these models; use `opaque` or
          `auto` instead.

          If `transparent`, the output format needs to support transparency,
          so it should be set to either `png` (default value) or `webp`.

          - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

          - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

          - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

        - `InputFidelity string`

          Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

          - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

          - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

        - `InputImageMask BetaToolImageGenerationInputImageMask`

          Optional mask for inpainting. Contains `image_url`
          (string, optional) and `file_id` (string, optional).

          - `FileID string`

            File ID for the mask image.

          - `ImageURL string`

            Base64-encoded mask image.

        - `Model string`

          The image generation model to use. Default: `gpt-image-1`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

            - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

            - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

            - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

            - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

            - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

        - `Moderation string`

          Moderation level for the generated image. Default: `auto`.

          - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

          - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

        - `OutputCompression int64`

          Compression level for the output image. Default: 100.

        - `OutputFormat string`

          The output format of the generated image. One of `png`, `webp`, or
          `jpeg`. Default: `png`.

          - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

          - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

          - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

        - `PartialImages int64`

          Number of partial images to generate in streaming mode, from 0 (default value) to 3.

        - `Quality string`

          The quality of the generated image. One of `low`, `medium`, `high`,
          or `auto`. Default: `auto`.

          - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

          - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

          - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

          - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

        - `Size string`

          The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

            - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

            - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

            - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

        - `Type LocalShell`

          The type of the local shell tool. Always `local_shell`.

          - `const LocalShellLocalShell LocalShell = "local_shell"`

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

        - `Type Shell`

          The type of the shell tool. Always `shell`.

          - `const ShellShell Shell = "shell"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

          - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

        - `Environment BetaFunctionShellToolEnvironmentUnion`

          - `type BetaContainerAuto struct{…}`

            - `Type ContainerAuto`

              Automatically creates a container for this request

              - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit BetaContainerAutoMemoryLimit`

              The memory limit for the container.

              - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

              - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

              - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

              - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

            - `Skills []BetaContainerAutoSkillUnion`

              An optional list of skills referenced by id or inline data.

              - `type BetaSkillReference struct{…}`

                - `SkillID string`

                  The ID of the referenced skill.

                - `Type SkillReference`

                  References a skill created with the /v1/skills endpoint.

                  - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                - `Version string`

                  Optional skill version. Use a positive integer or 'latest'. Omit for default.

              - `type BetaInlineSkill struct{…}`

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Source BetaInlineSkillSource`

                  Inline skill payload

                  - `Data string`

                    Base64-encoded skill zip bundle.

                  - `MediaType ApplicationZip`

                    The media type of the inline skill payload. Must be `application/zip`.

                    - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                  - `Type Base64`

                    The type of the inline skill source. Must be `base64`.

                    - `const Base64Base64 Base64 = "base64"`

                - `Type Inline`

                  Defines an inline skill for this request.

                  - `const InlineInline Inline = "inline"`

          - `type BetaLocalEnvironment struct{…}`

            - `Type Local`

              Use a local computer environment.

              - `const LocalLocal Local = "local"`

            - `Skills []BetaLocalSkill`

              An optional list of skills.

              - `Description string`

                The description of the skill.

              - `Name string`

                The name of the skill.

              - `Path string`

                The path to the directory containing the skill.

          - `type BetaContainerReference struct{…}`

            - `ContainerID string`

              The ID of the referenced container.

            - `Type ContainerReference`

              References a container created with the /v1/containers endpoint

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Name string`

          The name of the custom tool, used to identify it in tool calls.

        - `Type Custom`

          The type of the custom tool. Always `custom`.

          - `const CustomCustom Custom = "custom"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

          - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this tool should be deferred and discovered via tool search.

        - `Description string`

          Optional description of the custom tool, used to provide more context.

        - `Format BetaCustomToolFormatUnion`

          The input format for the custom tool. Default is unconstrained text.

          - `type BetaCustomToolFormatText struct{…}`

            Unconstrained free-form text.

            - `Type Text`

              Unconstrained text format. Always `text`.

              - `const TextText Text = "text"`

          - `type BetaCustomToolFormatGrammar struct{…}`

            A grammar defined by the user.

            - `Definition string`

              The grammar definition.

            - `Syntax string`

              The syntax of the grammar definition. One of `lark` or `regex`.

              - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

              - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

            - `Type Grammar`

              Grammar format. Always `grammar`.

              - `const GrammarGrammar Grammar = "grammar"`

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

        - `Description string`

          A description of the namespace shown to the model.

        - `Name string`

          The namespace name used in tool calls (for example, `crm`).

        - `Tools []BetaNamespaceToolToolUnion`

          The function/custom tools available inside this namespace.

          - `type BetaNamespaceToolToolFunction struct{…}`

            - `Name string`

            - `Type Function`

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

              - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function should be deferred and discovered via tool search.

            - `Description string`

            - `OutputSchema map[string, any]`

              A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

            - `Parameters any`

            - `Strict bool`

              Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Type Namespace`

          The type of the tool. Always `namespace`.

          - `const NamespaceNamespace Namespace = "namespace"`

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

        - `Type ToolSearch`

          The type of the tool. Always `tool_search`.

          - `const ToolSearchToolSearch ToolSearch = "tool_search"`

        - `Description string`

          Description shown to the model for a client-executed tool search tool.

        - `Execution BetaToolSearchToolExecution`

          Whether tool search is executed by the server or by the client.

          - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

          - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

        - `Parameters any`

          Parameter schema for a client-executed tool search tool.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchPreviewToolType`

          The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

        - `SearchContentTypes []string`

          - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

          - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

        - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

          - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

          - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchPreviewToolUserLocation`

          The user's location.

          - `Type Approximate`

            The type of location approximation. Always `approximate`.

            - `const ApproximateApproximate Approximate = "approximate"`

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ApplyPatch`

          The type of the tool. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

          - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

    - `Type ToolSearchOutput`

      The type of the item. Always `tool_search_output`.

      - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

    - `Agent BetaResponseToolSearchOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseOutputItemAdditionalTools struct{…}`

    - `ID string`

      The unique ID of the additional tools item.

    - `Role string`

      The role that provided the additional tools.

      - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

      - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

      - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

      - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

      - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

      - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

      - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

      - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

    - `Tools []BetaToolUnion`

      The additional tool definitions made available at this item.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `Type AdditionalTools`

      The type of the item. Always `additional_tools`.

      - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

    - `Agent BetaResponseOutputItemAdditionalToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCompactionItem struct{…}`

    A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

    - `ID string`

      The unique ID of the compaction item.

    - `EncryptedContent string`

      The encrypted content that was produced by compaction.

    - `Type Compaction`

      The type of the item. Always `compaction`.

      - `const CompactionCompaction Compaction = "compaction"`

    - `Agent BetaResponseCompactionItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseOutputItemImageGenerationCall struct{…}`

    An image generation request made by the model.

    - `ID string`

      The unique ID of the image generation call.

    - `Result string`

      The generated image encoded in base64.

    - `Status string`

      The status of the image generation call.

      - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

      - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

      - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

      - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

    - `Type ImageGenerationCall`

      The type of the image generation call. Always `image_generation_call`.

      - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

    - `Agent BetaResponseOutputItemImageGenerationCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterToolCall struct{…}`

    A tool call to run code.

    - `ID string`

      The unique ID of the code interpreter tool call.

    - `Code string`

      The code to run, or null if not available.

    - `ContainerID string`

      The ID of the container used to run the code.

    - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

      The outputs generated by the code interpreter, such as logs or images.
      Can be null if no outputs are available.

      - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

        The logs output from the code interpreter.

        - `Logs string`

          The logs output from the code interpreter.

        - `Type Logs`

          The type of the output. Always `logs`.

          - `const LogsLogs Logs = "logs"`

      - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

        The image output from the code interpreter.

        - `Type Image`

          The type of the output. Always `image`.

          - `const ImageImage Image = "image"`

        - `URL string`

          The URL of the image output from the code interpreter.

    - `Status BetaResponseCodeInterpreterToolCallStatus`

      The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

      - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

      - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

      - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

      - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

      - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

    - `Type CodeInterpreterCall`

      The type of the code interpreter tool call. Always `code_interpreter_call`.

      - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

    - `Agent BetaResponseCodeInterpreterToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemLocalShellCall struct{…}`

    A tool call to run a command on the local shell.

    - `ID string`

      The unique ID of the local shell call.

    - `Action BetaResponseOutputItemLocalShellCallAction`

      Execute a shell command on the server.

      - `Command []string`

        The command to run.

      - `Env map[string, string]`

        Environment variables to set for the command.

      - `Type Exec`

        The type of the local shell action. Always `exec`.

        - `const ExecExec Exec = "exec"`

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the command.

      - `User string`

        Optional user to run the command as.

      - `WorkingDirectory string`

        Optional working directory to run the command in.

    - `CallID string`

      The unique ID of the local shell tool call generated by the model.

    - `Status string`

      The status of the local shell call.

      - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

      - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

      - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

    - `Type LocalShellCall`

      The type of the local shell call. Always `local_shell_call`.

      - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

    - `Agent BetaResponseOutputItemLocalShellCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

    The output of a local shell tool call.

    - `ID string`

      The unique ID of the local shell tool call generated by the model.

    - `Output string`

      A JSON string of the output of the local shell tool call.

    - `Type LocalShellCallOutput`

      The type of the local shell tool call output. Always `local_shell_call_output`.

      - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

    - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

      - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

      - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

  - `type BetaResponseFunctionShellToolCall struct{…}`

    A tool call that executes one or more shell commands in a managed environment.

    - `ID string`

      The unique ID of the shell tool call. Populated when this item is returned via API.

    - `Action BetaResponseFunctionShellToolCallAction`

      The shell commands and limits that describe how to run the tool call.

      - `Commands []string`

      - `MaxOutputLength int64`

        Optional maximum number of characters to return from each command.

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the commands.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

      Represents the use of a local environment to perform shell actions.

      - `type BetaResponseLocalEnvironment struct{…}`

        Represents the use of a local environment to perform shell actions.

        - `Type Local`

          The environment type. Always `local`.

          - `const LocalLocal Local = "local"`

      - `type BetaResponseContainerReference struct{…}`

        Represents a container created with /v1/containers.

        - `ContainerID string`

        - `Type ContainerReference`

          The environment type. Always `container_reference`.

          - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

    - `Status BetaResponseFunctionShellToolCallStatus`

      The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

      - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

      - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

    - `Type ShellCall`

      The type of the item. Always `shell_call`.

      - `const ShellCallShellCall ShellCall = "shell_call"`

    - `Agent BetaResponseFunctionShellToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionShellToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call.

  - `type BetaResponseFunctionShellToolCallOutput struct{…}`

    The output of a shell tool call that was emitted.

    - `ID string`

      The unique ID of the shell call output. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `MaxOutputLength int64`

      The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

    - `Output []BetaResponseFunctionShellToolCallOutputOutput`

      An array of shell call output contents

      - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

        Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

        - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

          Indicates that the shell call exceeded its configured time limit.

          - `Type Timeout`

            The outcome type. Always `timeout`.

            - `const TimeoutTimeout Timeout = "timeout"`

        - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

          Indicates that the shell commands finished and returned an exit code.

          - `ExitCode int64`

            Exit code from the shell process.

          - `Type Exit`

            The outcome type. Always `exit`.

            - `const ExitExit Exit = "exit"`

      - `Stderr string`

        The standard error output that was captured.

      - `Stdout string`

        The standard output that was captured.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `Status BetaResponseFunctionShellToolCallOutputStatus`

      The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

      - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

      - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

    - `Type ShellCallOutput`

      The type of the shell call output. Always `shell_call_output`.

      - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

    - `Agent BetaResponseFunctionShellToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseApplyPatchToolCall struct{…}`

    A tool call that applies file diffs by creating, deleting, or updating files.

    - `ID string`

      The unique ID of the apply patch tool call. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Operation BetaResponseApplyPatchToolCallOperationUnion`

      One of the create_file, delete_file, or update_file operations applied via apply_patch.

      - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

        Instruction describing how to create a file via the apply_patch tool.

        - `Diff string`

          Diff to apply.

        - `Path string`

          Path of the file to create.

        - `Type CreateFile`

          Create a new file with the provided diff.

          - `const CreateFileCreateFile CreateFile = "create_file"`

      - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

        Instruction describing how to delete a file via the apply_patch tool.

        - `Path string`

          Path of the file to delete.

        - `Type DeleteFile`

          Delete the specified file.

          - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

      - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

        Instruction describing how to update a file via the apply_patch tool.

        - `Diff string`

          Diff to apply.

        - `Path string`

          Path of the file to update.

        - `Type UpdateFile`

          Update an existing file with the provided diff.

          - `const UpdateFileUpdateFile UpdateFile = "update_file"`

    - `Status BetaResponseApplyPatchToolCallStatus`

      The status of the apply patch tool call. One of `in_progress` or `completed`.

      - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

      - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

    - `Type ApplyPatchCall`

      The type of the item. Always `apply_patch_call`.

      - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

    - `Agent BetaResponseApplyPatchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseApplyPatchToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call.

  - `type BetaResponseApplyPatchToolCallOutput struct{…}`

    The output emitted by an apply patch tool call.

    - `ID string`

      The unique ID of the apply patch tool call output. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Status BetaResponseApplyPatchToolCallOutputStatus`

      The status of the apply patch tool call output. One of `completed` or `failed`.

      - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

      - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

    - `Type ApplyPatchCallOutput`

      The type of the item. Always `apply_patch_call_output`.

      - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

    - `Agent BetaResponseApplyPatchToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call output.

    - `Output string`

      Optional textual output returned by the apply patch tool.

  - `type BetaResponseOutputItemMcpCall struct{…}`

    An invocation of a tool on an MCP server.

    - `ID string`

      The unique ID of the tool call.

    - `Arguments string`

      A JSON string of the arguments passed to the tool.

    - `Name string`

      The name of the tool that was run.

    - `ServerLabel string`

      The label of the MCP server running the tool.

    - `Type McpCall`

      The type of the item. Always `mcp_call`.

      - `const McpCallMcpCall McpCall = "mcp_call"`

    - `Agent BetaResponseOutputItemMcpCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `ApprovalRequestID string`

      Unique identifier for the MCP tool call approval request.
      Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

    - `Error string`

      The error from the tool call, if any.

    - `Output string`

      The output from the tool call.

    - `Status string`

      The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

      - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

      - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

      - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

      - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

      - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

  - `type BetaResponseOutputItemMcpListTools struct{…}`

    A list of tools available on an MCP server.

    - `ID string`

      The unique ID of the list.

    - `ServerLabel string`

      The label of the MCP server.

    - `Tools []BetaResponseOutputItemMcpListToolsTool`

      The tools available on the server.

      - `InputSchema any`

        The JSON schema describing the tool's input.

      - `Name string`

        The name of the tool.

      - `Annotations any`

        Additional annotations about the tool.

      - `Description string`

        The description of the tool.

    - `Type McpListTools`

      The type of the item. Always `mcp_list_tools`.

      - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

    - `Agent BetaResponseOutputItemMcpListToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Error string`

      Error message if the server could not list tools.

  - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

    A request for human approval of a tool invocation.

    - `ID string`

      The unique ID of the approval request.

    - `Arguments string`

      A JSON string of arguments for the tool.

    - `Name string`

      The name of the tool to run.

    - `ServerLabel string`

      The label of the MCP server making the request.

    - `Type McpApprovalRequest`

      The type of the item. Always `mcp_approval_request`.

      - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

    - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

    A response to an MCP approval request.

    - `ID string`

      The unique ID of the approval response

    - `ApprovalRequestID string`

      The ID of the approval request being answered.

    - `Approve bool`

      Whether the request was approved.

    - `Type McpApprovalResponse`

      The type of the item. Always `mcp_approval_response`.

      - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

    - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Reason string`

      Optional reason for the decision.

  - `type BetaResponseCustomToolCall struct{…}`

    A call to a custom tool created by the model.

    - `CallID string`

      An identifier used to map this custom tool call to a tool call output.

    - `Input string`

      The input for the custom tool call generated by the model.

    - `Name string`

      The name of the custom tool being called.

    - `Type CustomToolCall`

      The type of the custom tool call. Always `custom_tool_call`.

      - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

    - `ID string`

      The unique ID of the custom tool call in the OpenAI platform.

    - `Agent BetaResponseCustomToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseCustomToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseCustomToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseCustomToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `Namespace string`

      The namespace of the custom tool being called.

  - `type BetaResponseCustomToolCallOutputItem struct{…}`

    The output of a custom tool call from your code, being sent back to the model.

    - `ID string`

      The unique ID of the custom tool call output item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

      - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

      - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

### Beta Response Output Item Added Event

- `type BetaResponseOutputItemAddedEvent struct{…}`

  Emitted when a new output item is added.

  - `Item BetaResponseOutputItemUnion`

    The output item that was added.

    - `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.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

            - `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`.

                - `const FileCitationFileCitation FileCitation = "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`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the web resource.

            - `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`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []BetaResponseOutputTextLogprob`

            - `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`.

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        The role of the output message. Always `assistant`.

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status BetaResponseOutputMessageStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

        - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

        - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        The type of the output message. Always `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseOutputMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Phase BetaResponseOutputMessagePhase`

        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.

        - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

        - `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`.

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Agent BetaResponseFileSearchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Results []BetaResponseFileSearchToolCallResult`

        The results of the file search tool call.

        - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

          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.

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

          The unique ID of the file.

        - `Filename string`

          The name of the file.

        - `Score float64`

          The relevance score of the file - a value between 0 and 1.

        - `Text string`

          The text that was retrieved from the file.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

        - `const FunctionCallFunctionCall FunctionCall = "function_call"`

      - `ID string`

        The unique ID of the function tool call.

      - `Agent BetaResponseFunctionToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the function to run.

      - `Status BetaResponseFunctionToolCallStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `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.

      - `CallID string`

        The unique ID of the function tool call generated by the model.

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

        The output from the function call generated by your code.
        Can be a string or an list of output content.

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

          Text, image, or file output of the function call.

          - `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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `Detail BetaResponseInputImageDetail`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `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`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `FileID string`

              The ID of the file to be sent to the model.

            - `ImageURL string`

              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

            - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileDetail`

              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`.

              - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

              - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

              - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

            - `FileData string`

              The content of the file to be sent to the model.

            - `FileID string`

              The ID of the file to be sent to the model.

            - `FileURL string`

              The URL of the file to be sent to the model.

            - `Filename string`

              The name of the file to be sent to the model.

            - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

            Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

        The type of the multi-agent result. Always `multi_agent_call_output`.

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `ID string`

        The unique ID of the web search tool call.

      - `Action BetaResponseFunctionWebSearchActionUnion`

        An object describing the specific action taken in this web search call.
        Includes details on how the model used the web (search, open_page, find_in_page).

        - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

          Action type "search" - Performs a web search query.

          - `Type Search`

            The action type.

            - `const SearchSearch Search = "search"`

          - `Queries []string`

            The search queries.

          - `Query string`

            The search query.

          - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

            The sources used in the search.

            - `Type URL`

              The type of source. Always `url`.

              - `const URLURL URL = "url"`

            - `URL string`

              The URL of the source.

        - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

          Action type "open_page" - Opens a specific URL from search results.

          - `Type OpenPage`

            The action type.

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

            The URL opened by the model.

        - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

          Action type "find_in_page": Searches for a pattern within a loaded page.

          - `Pattern string`

            The pattern or text to search for within the page.

          - `Type FindInPage`

            The action type.

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

            The URL of the page searched for the pattern.

      - `Status BetaResponseFunctionWebSearchStatus`

        The status of the web search tool call.

        - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

        - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

        - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

        - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        The type of the web search tool call. Always `web_search_call`.

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `Agent BetaResponseFunctionWebSearchAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

          The type of the pending safety check.

        - `Message string`

          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.

        - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

        - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

        - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

      - `Type BetaResponseComputerToolCallType`

        The type of the computer call. Always `computer_call`.

        - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

      - `Action BetaComputerActionUnion`

        A click action.

        - `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`.

            - `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`.

            - `const ClickClick Click = "click"`

          - `X int64`

            The x-coordinate where the click occurred.

          - `Y int64`

            The y-coordinate where the click occurred.

          - `Keys []string`

            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`.

            - `const DoubleClickDoubleClick DoubleClick = "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`.

            - `const DragDrag Drag = "drag"`

          - `Keys []string`

            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`.

            - `const KeypressKeypress Keypress = "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`.

            - `const MoveMove Move = "move"`

          - `X int64`

            The x-coordinate to move to.

          - `Y int64`

            The y-coordinate to move to.

          - `Keys []string`

            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`.

            - `const ScreenshotScreenshot Screenshot = "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`.

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

            The x-coordinate where the scroll occurred.

          - `Y int64`

            The y-coordinate where the scroll occurred.

          - `Keys []string`

            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`.

            - `const TypeType Type = "type"`

        - `type BetaComputerActionWait struct{…}`

          A wait action.

          - `Type Wait`

            Specifies the event type. For a wait action, this property is always set to `wait`.

            - `const WaitWait Wait = "wait"`

      - `Actions BetaComputerActionList`

        Flattened batched actions for `computer_use`. Each action includes an
        `type` discriminator and action-specific fields.

        - `type BetaComputerActionClick struct{…}`

          A click action.

        - `type BetaComputerActionDoubleClick struct{…}`

          A double click action.

        - `type BetaComputerActionDrag struct{…}`

          A drag action.

        - `type BetaComputerActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

        - `type BetaComputerActionMove struct{…}`

          A mouse move action.

        - `type BetaComputerActionScreenshot struct{…}`

          A screenshot action.

        - `type BetaComputerActionScroll struct{…}`

          A scroll action.

        - `type BetaComputerActionType struct{…}`

          An action to type in text.

        - `type BetaComputerActionWait struct{…}`

          A wait action.

      - `Agent BetaResponseComputerToolCallAgent`

        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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        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`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

        The safety checks reported by the API that have been acknowledged by the
        developer.

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

      - `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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        The type of the object. Always `reasoning`.

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Agent BetaResponseReasoningItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Content []BetaResponseReasoningItemContent`

        Reasoning text content.

        - `Text string`

          The reasoning text from the model.

        - `Type ReasoningText`

          The type of the reasoning text. Always `reasoning_text`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

        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.

      - `Status BetaResponseReasoningItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

        - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

        - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `Name string`

            The name of the function to call.

          - `Parameters map[string, any]`

            A JSON schema object describing the parameters of the function.

          - `Strict bool`

            Whether strict parameter validation is enforced for this function tool.

          - `Type Function`

            The type of the function tool. Always `function`.

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

            - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function is deferred and loaded via tool search.

          - `Description string`

            A description of the function. Used by the model to determine whether or not to call the function.

          - `OutputSchema map[string, any]`

            A JSON schema object describing the JSON value encoded in string outputs for this function.

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `Type FileSearch`

            The type of the file search tool. Always `file_search`.

            - `const FileSearchFileSearch FileSearch = "file_search"`

          - `VectorStoreIDs []string`

            The IDs of the vector stores to search.

          - `Filters BetaFileSearchToolFiltersUnion`

            A filter to apply.

            - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

            - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

              Combine multiple filters using `and` or `or`.

              - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

              - `Type string`

                Type of operation: `and` or `or`.

                - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

          - `MaxNumResults int64`

            The maximum number of results to return. This number should be between 1 and 50 inclusive.

          - `RankingOptions BetaFileSearchToolRankingOptions`

            Ranking options for search.

            - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

              - `EmbeddingWeight float64`

                The weight of the embedding in the reciprocal ranking fusion.

              - `TextWeight float64`

                The weight of the text in the reciprocal ranking fusion.

            - `Ranker string`

              The ranker to use for the file search.

              - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

              - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

            - `ScoreThreshold float64`

              The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `Type Computer`

            The type of the computer tool. Always `computer`.

            - `const ComputerComputer Computer = "computer"`

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `DisplayHeight int64`

            The height of the computer display.

          - `DisplayWidth int64`

            The width of the computer display.

          - `Environment BetaComputerUsePreviewToolEnvironment`

            The type of computer environment to control.

            - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

            - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

            - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

            - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

            - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

          - `Type ComputerUsePreview`

            The type of the computer use tool. Always `computer_use_preview`.

            - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchToolType`

            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

            - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

            - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

          - `Filters BetaWebSearchToolFilters`

            Filters for the search.

            - `AllowedDomains []string`

              Allowed domains for the search. If not provided, all domains are allowed.
              Subdomains of the provided domains are allowed as well.

              Example: `["pubmed.ncbi.nlm.nih.gov"]`

          - `SearchContextSize BetaWebSearchToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

            - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

            - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchToolUserLocation`

            The approximate location of the user.

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `Type string`

              The type of location approximation. Always `approximate`.

              - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `ServerLabel string`

            A label for this MCP server, used to identify it in tool calls.

          - `Type Mcp`

            The type of the MCP tool. Always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

            - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

          - `AllowedTools BetaToolMcpAllowedToolsUnion`

            List of allowed tool names or a filter object.

            - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

              A string array of allowed tool names

            - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `Authorization string`

            An OAuth access token that can be used with a remote MCP server, either
            with a custom MCP server URL or a service connector. Your application
            must handle the OAuth authorization flow and provide the token here.

          - `ConnectorID string`

            Identifier for service connectors, like those available in ChatGPT. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
            about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

            Currently supported `connector_id` values are:

            - Dropbox: `connector_dropbox`
            - Gmail: `connector_gmail`
            - Google Calendar: `connector_googlecalendar`
            - Google Drive: `connector_googledrive`
            - Microsoft Teams: `connector_microsoftteams`
            - Outlook Calendar: `connector_outlookcalendar`
            - Outlook Email: `connector_outlookemail`
            - SharePoint: `connector_sharepoint`

            - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

            - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

            - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

            - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

            - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

            - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

            - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

            - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

          - `DeferLoading bool`

            Whether this MCP tool is deferred and discovered via tool search.

          - `Headers map[string, string]`

            Optional HTTP headers to send to the MCP server. Use for authentication
            or other purposes.

          - `RequireApproval BetaToolMcpRequireApprovalUnion`

            Specify which of the MCP server's tools require approval.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

              Specify which of the MCP server's tools require approval. Can be
              `always`, `never`, or a filter object associated with tools
              that require approval.

              - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

              - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

              Specify a single approval policy for all tools. One of `always` or
              `never`. When set to `always`, all tools will require approval. When
              set to `never`, all tools will not require approval.

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

          - `ServerDescription string`

            Optional description of the MCP server, used to provide more context.

          - `ServerURL string`

            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.

          - `TunnelID string`

            The Secure MCP Tunnel ID to use instead of a direct server URL. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided.

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

          - `Container BetaToolCodeInterpreterContainerUnion`

            The code interpreter container. Can be a container ID or an object that
            specifies uploaded file IDs to make available to your code, along with an
            optional `memory_limit` setting.

            - `string`

            - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

              - `Type Auto`

                Always `auto`.

                - `const AutoAuto Auto = "auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit string`

                The memory limit for the code interpreter container.

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `Type Disabled`

                    Disable outbound network access. Always `disabled`.

                    - `const DisabledDisabled Disabled = "disabled"`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `AllowedDomains []string`

                    A list of allowed domains when type is `allowlist`.

                  - `Type Allowlist`

                    Allow outbound network access only to specified domains. Always `allowlist`.

                    - `const AllowlistAllowlist Allowlist = "allowlist"`

                  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                    Optional domain-scoped secrets for allowlisted domains.

                    - `Domain string`

                      The domain associated with the secret.

                    - `Name string`

                      The name of the secret to inject for the domain.

                    - `Value string`

                      The secret value to inject for the domain.

          - `Type CodeInterpreter`

            The type of the code interpreter tool. Always `code_interpreter`.

            - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

            - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

        - `type BetaToolProgrammaticToolCalling struct{…}`

          - `Type ProgrammaticToolCalling`

            The type of the tool. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

          - `Type ImageGeneration`

            The type of the image generation tool. Always `image_generation`.

            - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

          - `Action string`

            Whether to generate a new image or edit an existing image. Default: `auto`.

            - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

            - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

            - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

          - `Background string`

            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for GPT image models that support
            transparent backgrounds. Must be one of `transparent`, `opaque`, or
            `auto` (default value). When `auto` is used, the model will
            automatically determine the best background for the image.

            `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
            transparent backgrounds. Requests with `background` set to
            `transparent` will return an error for these models; use `opaque` or
            `auto` instead.

            If `transparent`, the output format needs to support transparency,
            so it should be set to either `png` (default value) or `webp`.

            - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

            - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

            - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

          - `InputFidelity string`

            Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

            - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

            - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

          - `InputImageMask BetaToolImageGenerationInputImageMask`

            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).

            - `FileID string`

              File ID for the mask image.

            - `ImageURL string`

              Base64-encoded mask image.

          - `Model string`

            The image generation model to use. Default: `gpt-image-1`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

              - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

              - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

              - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

              - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

              - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

          - `Moderation string`

            Moderation level for the generated image. Default: `auto`.

            - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

            - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

          - `OutputCompression int64`

            Compression level for the output image. Default: 100.

          - `OutputFormat string`

            The output format of the generated image. One of `png`, `webp`, or
            `jpeg`. Default: `png`.

            - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

            - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

            - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

          - `PartialImages int64`

            Number of partial images to generate in streaming mode, from 0 (default value) to 3.

          - `Quality string`

            The quality of the generated image. One of `low`, `medium`, `high`,
            or `auto`. Default: `auto`.

            - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

            - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

            - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

            - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

          - `Size string`

            The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

              - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

              - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

              - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

          - `Type LocalShell`

            The type of the local shell tool. Always `local_shell`.

            - `const LocalShellLocalShell LocalShell = "local_shell"`

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

          - `Type Shell`

            The type of the shell tool. Always `shell`.

            - `const ShellShell Shell = "shell"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

            - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

          - `Environment BetaFunctionShellToolEnvironmentUnion`

            - `type BetaContainerAuto struct{…}`

              - `Type ContainerAuto`

                Automatically creates a container for this request

                - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit BetaContainerAutoMemoryLimit`

                The memory limit for the container.

                - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `Skills []BetaContainerAutoSkillUnion`

                An optional list of skills referenced by id or inline data.

                - `type BetaSkillReference struct{…}`

                  - `SkillID string`

                    The ID of the referenced skill.

                  - `Type SkillReference`

                    References a skill created with the /v1/skills endpoint.

                    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                  - `Version string`

                    Optional skill version. Use a positive integer or 'latest'. Omit for default.

                - `type BetaInlineSkill struct{…}`

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Source BetaInlineSkillSource`

                    Inline skill payload

                    - `Data string`

                      Base64-encoded skill zip bundle.

                    - `MediaType ApplicationZip`

                      The media type of the inline skill payload. Must be `application/zip`.

                      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                    - `Type Base64`

                      The type of the inline skill source. Must be `base64`.

                      - `const Base64Base64 Base64 = "base64"`

                  - `Type Inline`

                    Defines an inline skill for this request.

                    - `const InlineInline Inline = "inline"`

            - `type BetaLocalEnvironment struct{…}`

              - `Type Local`

                Use a local computer environment.

                - `const LocalLocal Local = "local"`

              - `Skills []BetaLocalSkill`

                An optional list of skills.

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Path string`

                  The path to the directory containing the skill.

            - `type BetaContainerReference struct{…}`

              - `ContainerID string`

                The ID of the referenced container.

              - `Type ContainerReference`

                References a container created with the /v1/containers endpoint

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Name string`

            The name of the custom tool, used to identify it in tool calls.

          - `Type Custom`

            The type of the custom tool. Always `custom`.

            - `const CustomCustom Custom = "custom"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

            - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this tool should be deferred and discovered via tool search.

          - `Description string`

            Optional description of the custom tool, used to provide more context.

          - `Format BetaCustomToolFormatUnion`

            The input format for the custom tool. Default is unconstrained text.

            - `type BetaCustomToolFormatText struct{…}`

              Unconstrained free-form text.

              - `Type Text`

                Unconstrained text format. Always `text`.

                - `const TextText Text = "text"`

            - `type BetaCustomToolFormatGrammar struct{…}`

              A grammar defined by the user.

              - `Definition string`

                The grammar definition.

              - `Syntax string`

                The syntax of the grammar definition. One of `lark` or `regex`.

                - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

              - `Type Grammar`

                Grammar format. Always `grammar`.

                - `const GrammarGrammar Grammar = "grammar"`

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

          - `Description string`

            A description of the namespace shown to the model.

          - `Name string`

            The namespace name used in tool calls (for example, `crm`).

          - `Tools []BetaNamespaceToolToolUnion`

            The function/custom tools available inside this namespace.

            - `type BetaNamespaceToolToolFunction struct{…}`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function should be deferred and discovered via tool search.

              - `Description string`

              - `OutputSchema map[string, any]`

                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

              - `Parameters any`

              - `Strict bool`

                Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Type Namespace`

            The type of the tool. Always `namespace`.

            - `const NamespaceNamespace Namespace = "namespace"`

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

          - `Type ToolSearch`

            The type of the tool. Always `tool_search`.

            - `const ToolSearchToolSearch ToolSearch = "tool_search"`

          - `Description string`

            Description shown to the model for a client-executed tool search tool.

          - `Execution BetaToolSearchToolExecution`

            Whether tool search is executed by the server or by the client.

            - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

            - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

          - `Parameters any`

            Parameter schema for a client-executed tool search tool.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchPreviewToolType`

            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

          - `SearchContentTypes []string`

            - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

            - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

          - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

            - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

            - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchPreviewToolUserLocation`

            The user's location.

            - `Type Approximate`

              The type of location approximation. Always `approximate`.

              - `const ApproximateApproximate Approximate = "approximate"`

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ApplyPatch`

            The type of the tool. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

            - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

        The unique ID of the code interpreter tool call.

      - `Code string`

        The code to run, or null if not available.

      - `ContainerID string`

        The ID of the container used to run the code.

      - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

        The outputs generated by the code interpreter, such as logs or images.
        Can be null if no outputs are available.

        - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

            The logs output from the code interpreter.

          - `Type Logs`

            The type of the output. Always `logs`.

            - `const LogsLogs Logs = "logs"`

        - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            The type of the output. Always `image`.

            - `const ImageImage Image = "image"`

          - `URL string`

            The URL of the image output from the code interpreter.

      - `Status BetaResponseCodeInterpreterToolCallStatus`

        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

        - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

        - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        The type of the code interpreter tool call. Always `code_interpreter_call`.

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Agent BetaResponseCodeInterpreterToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

      A tool call to run a command on the local shell.

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

      A tool call that executes one or more shell commands in a managed environment.

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

      A tool call that applies file diffs by creating, deleting, or updating files.

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `type BetaResponseCustomToolCall struct{…}`

      A call to a custom tool created by the model.

      - `CallID string`

        An identifier used to map this custom tool call to a tool call output.

      - `Input string`

        The input for the custom tool call generated by the model.

      - `Name string`

        The name of the custom tool being called.

      - `Type CustomToolCall`

        The type of the custom tool call. Always `custom_tool_call`.

        - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

      - `ID string`

        The unique ID of the custom tool call in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the custom tool being called.

    - `type BetaResponseCustomToolCallOutputItem struct{…}`

      The output of a custom tool call from your code, being sent back to the model.

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `OutputIndex int64`

    The index of the output item that was added.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseOutputItemAdded`

    The type of the event. Always `response.output_item.added`.

    - `const ResponseOutputItemAddedResponseOutputItemAdded ResponseOutputItemAdded = "response.output_item.added"`

  - `Agent BetaResponseOutputItemAddedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Output Item Done Event

- `type BetaResponseOutputItemDoneEvent struct{…}`

  Emitted when an output item is marked done.

  - `Item BetaResponseOutputItemUnion`

    The output item that was marked done.

    - `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.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

            - `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`.

                - `const FileCitationFileCitation FileCitation = "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`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the web resource.

            - `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`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []BetaResponseOutputTextLogprob`

            - `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`.

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        The role of the output message. Always `assistant`.

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status BetaResponseOutputMessageStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

        - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

        - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        The type of the output message. Always `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseOutputMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Phase BetaResponseOutputMessagePhase`

        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.

        - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

        - `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`.

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Agent BetaResponseFileSearchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Results []BetaResponseFileSearchToolCallResult`

        The results of the file search tool call.

        - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

          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.

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

          The unique ID of the file.

        - `Filename string`

          The name of the file.

        - `Score float64`

          The relevance score of the file - a value between 0 and 1.

        - `Text string`

          The text that was retrieved from the file.

    - `type BetaResponseFunctionToolCall struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

        - `const FunctionCallFunctionCall FunctionCall = "function_call"`

      - `ID string`

        The unique ID of the function tool call.

      - `Agent BetaResponseFunctionToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the function to run.

      - `Status BetaResponseFunctionToolCallStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `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.

      - `CallID string`

        The unique ID of the function tool call generated by the model.

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

        The output from the function call generated by your code.
        Can be a string or an list of output content.

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

          Text, image, or file output of the function call.

          - `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`.

              - `const InputTextInputText InputText = "input_text"`

            - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `Detail BetaResponseInputImageDetail`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `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`.

              - `const InputImageInputImage InputImage = "input_image"`

            - `FileID string`

              The ID of the file to be sent to the model.

            - `ImageURL string`

              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

            - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

            - `Type InputFile`

              The type of the input item. Always `input_file`.

              - `const InputFileInputFile InputFile = "input_file"`

            - `Detail BetaResponseInputFileDetail`

              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`.

              - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

              - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

              - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

            - `FileData string`

              The content of the file to be sent to the model.

            - `FileID string`

              The ID of the file to be sent to the model.

            - `FileURL string`

              The URL of the file to be sent to the model.

            - `Filename string`

              The name of the file to be sent to the model.

            - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `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.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "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`.

            - `const SummaryTextSummaryText SummaryText = "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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `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`.

            - `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.

          - `Type ComputerScreenshot`

            Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseOutputItemAgentMessageAgent`

        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.

        - `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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseOutputItemMultiAgentCallAgent`

        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.

        - `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.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

        The type of the multi-agent result. Always `multi_agent_call_output`.

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `ID string`

        The unique ID of the web search tool call.

      - `Action BetaResponseFunctionWebSearchActionUnion`

        An object describing the specific action taken in this web search call.
        Includes details on how the model used the web (search, open_page, find_in_page).

        - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

          Action type "search" - Performs a web search query.

          - `Type Search`

            The action type.

            - `const SearchSearch Search = "search"`

          - `Queries []string`

            The search queries.

          - `Query string`

            The search query.

          - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

            The sources used in the search.

            - `Type URL`

              The type of source. Always `url`.

              - `const URLURL URL = "url"`

            - `URL string`

              The URL of the source.

        - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

          Action type "open_page" - Opens a specific URL from search results.

          - `Type OpenPage`

            The action type.

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

            The URL opened by the model.

        - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

          Action type "find_in_page": Searches for a pattern within a loaded page.

          - `Pattern string`

            The pattern or text to search for within the page.

          - `Type FindInPage`

            The action type.

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

            The URL of the page searched for the pattern.

      - `Status BetaResponseFunctionWebSearchStatus`

        The status of the web search tool call.

        - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

        - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

        - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

        - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        The type of the web search tool call. Always `web_search_call`.

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `Agent BetaResponseFunctionWebSearchAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

          The type of the pending safety check.

        - `Message string`

          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.

        - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

        - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

        - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

      - `Type BetaResponseComputerToolCallType`

        The type of the computer call. Always `computer_call`.

        - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

      - `Action BetaComputerActionUnion`

        A click action.

        - `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`.

            - `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`.

            - `const ClickClick Click = "click"`

          - `X int64`

            The x-coordinate where the click occurred.

          - `Y int64`

            The y-coordinate where the click occurred.

          - `Keys []string`

            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`.

            - `const DoubleClickDoubleClick DoubleClick = "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`.

            - `const DragDrag Drag = "drag"`

          - `Keys []string`

            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`.

            - `const KeypressKeypress Keypress = "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`.

            - `const MoveMove Move = "move"`

          - `X int64`

            The x-coordinate to move to.

          - `Y int64`

            The y-coordinate to move to.

          - `Keys []string`

            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`.

            - `const ScreenshotScreenshot Screenshot = "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`.

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

            The x-coordinate where the scroll occurred.

          - `Y int64`

            The y-coordinate where the scroll occurred.

          - `Keys []string`

            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`.

            - `const TypeType Type = "type"`

        - `type BetaComputerActionWait struct{…}`

          A wait action.

          - `Type Wait`

            Specifies the event type. For a wait action, this property is always set to `wait`.

            - `const WaitWait Wait = "wait"`

      - `Actions BetaComputerActionList`

        Flattened batched actions for `computer_use`. Each action includes an
        `type` discriminator and action-specific fields.

        - `type BetaComputerActionClick struct{…}`

          A click action.

        - `type BetaComputerActionDoubleClick struct{…}`

          A double click action.

        - `type BetaComputerActionDrag struct{…}`

          A drag action.

        - `type BetaComputerActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

        - `type BetaComputerActionMove struct{…}`

          A mouse move action.

        - `type BetaComputerActionScreenshot struct{…}`

          A screenshot action.

        - `type BetaComputerActionScroll struct{…}`

          A scroll action.

        - `type BetaComputerActionType struct{…}`

          An action to type in text.

        - `type BetaComputerActionWait struct{…}`

          A wait action.

      - `Agent BetaResponseComputerToolCallAgent`

        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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        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`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

        The safety checks reported by the API that have been acknowledged by the
        developer.

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        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](https://platform.openai.com/docs/guides/conversation-state).

      - `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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        The type of the object. Always `reasoning`.

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Agent BetaResponseReasoningItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Content []BetaResponseReasoningItemContent`

        Reasoning text content.

        - `Text string`

          The reasoning text from the model.

        - `Type ReasoningText`

          The type of the reasoning text. Always `reasoning_text`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

        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.

      - `Status BetaResponseReasoningItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

        - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

        - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

    - `type BetaResponseOutputItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseOutputItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

        - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseOutputItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `Name string`

            The name of the function to call.

          - `Parameters map[string, any]`

            A JSON schema object describing the parameters of the function.

          - `Strict bool`

            Whether strict parameter validation is enforced for this function tool.

          - `Type Function`

            The type of the function tool. Always `function`.

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

            - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function is deferred and loaded via tool search.

          - `Description string`

            A description of the function. Used by the model to determine whether or not to call the function.

          - `OutputSchema map[string, any]`

            A JSON schema object describing the JSON value encoded in string outputs for this function.

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `Type FileSearch`

            The type of the file search tool. Always `file_search`.

            - `const FileSearchFileSearch FileSearch = "file_search"`

          - `VectorStoreIDs []string`

            The IDs of the vector stores to search.

          - `Filters BetaFileSearchToolFiltersUnion`

            A filter to apply.

            - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

            - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

              Combine multiple filters using `and` or `or`.

              - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

              - `Type string`

                Type of operation: `and` or `or`.

                - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

          - `MaxNumResults int64`

            The maximum number of results to return. This number should be between 1 and 50 inclusive.

          - `RankingOptions BetaFileSearchToolRankingOptions`

            Ranking options for search.

            - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

              - `EmbeddingWeight float64`

                The weight of the embedding in the reciprocal ranking fusion.

              - `TextWeight float64`

                The weight of the text in the reciprocal ranking fusion.

            - `Ranker string`

              The ranker to use for the file search.

              - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

              - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

            - `ScoreThreshold float64`

              The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `Type Computer`

            The type of the computer tool. Always `computer`.

            - `const ComputerComputer Computer = "computer"`

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `DisplayHeight int64`

            The height of the computer display.

          - `DisplayWidth int64`

            The width of the computer display.

          - `Environment BetaComputerUsePreviewToolEnvironment`

            The type of computer environment to control.

            - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

            - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

            - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

            - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

            - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

          - `Type ComputerUsePreview`

            The type of the computer use tool. Always `computer_use_preview`.

            - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchToolType`

            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

            - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

            - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

          - `Filters BetaWebSearchToolFilters`

            Filters for the search.

            - `AllowedDomains []string`

              Allowed domains for the search. If not provided, all domains are allowed.
              Subdomains of the provided domains are allowed as well.

              Example: `["pubmed.ncbi.nlm.nih.gov"]`

          - `SearchContextSize BetaWebSearchToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

            - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

            - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchToolUserLocation`

            The approximate location of the user.

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `Type string`

              The type of location approximation. Always `approximate`.

              - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `ServerLabel string`

            A label for this MCP server, used to identify it in tool calls.

          - `Type Mcp`

            The type of the MCP tool. Always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

            - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

          - `AllowedTools BetaToolMcpAllowedToolsUnion`

            List of allowed tool names or a filter object.

            - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

              A string array of allowed tool names

            - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `Authorization string`

            An OAuth access token that can be used with a remote MCP server, either
            with a custom MCP server URL or a service connector. Your application
            must handle the OAuth authorization flow and provide the token here.

          - `ConnectorID string`

            Identifier for service connectors, like those available in ChatGPT. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
            about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

            Currently supported `connector_id` values are:

            - Dropbox: `connector_dropbox`
            - Gmail: `connector_gmail`
            - Google Calendar: `connector_googlecalendar`
            - Google Drive: `connector_googledrive`
            - Microsoft Teams: `connector_microsoftteams`
            - Outlook Calendar: `connector_outlookcalendar`
            - Outlook Email: `connector_outlookemail`
            - SharePoint: `connector_sharepoint`

            - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

            - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

            - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

            - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

            - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

            - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

            - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

            - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

          - `DeferLoading bool`

            Whether this MCP tool is deferred and discovered via tool search.

          - `Headers map[string, string]`

            Optional HTTP headers to send to the MCP server. Use for authentication
            or other purposes.

          - `RequireApproval BetaToolMcpRequireApprovalUnion`

            Specify which of the MCP server's tools require approval.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

              Specify which of the MCP server's tools require approval. Can be
              `always`, `never`, or a filter object associated with tools
              that require approval.

              - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

              - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

              Specify a single approval policy for all tools. One of `always` or
              `never`. When set to `always`, all tools will require approval. When
              set to `never`, all tools will not require approval.

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

          - `ServerDescription string`

            Optional description of the MCP server, used to provide more context.

          - `ServerURL string`

            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.

          - `TunnelID string`

            The Secure MCP Tunnel ID to use instead of a direct server URL. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided.

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

          - `Container BetaToolCodeInterpreterContainerUnion`

            The code interpreter container. Can be a container ID or an object that
            specifies uploaded file IDs to make available to your code, along with an
            optional `memory_limit` setting.

            - `string`

            - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

              - `Type Auto`

                Always `auto`.

                - `const AutoAuto Auto = "auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit string`

                The memory limit for the code interpreter container.

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `Type Disabled`

                    Disable outbound network access. Always `disabled`.

                    - `const DisabledDisabled Disabled = "disabled"`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `AllowedDomains []string`

                    A list of allowed domains when type is `allowlist`.

                  - `Type Allowlist`

                    Allow outbound network access only to specified domains. Always `allowlist`.

                    - `const AllowlistAllowlist Allowlist = "allowlist"`

                  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                    Optional domain-scoped secrets for allowlisted domains.

                    - `Domain string`

                      The domain associated with the secret.

                    - `Name string`

                      The name of the secret to inject for the domain.

                    - `Value string`

                      The secret value to inject for the domain.

          - `Type CodeInterpreter`

            The type of the code interpreter tool. Always `code_interpreter`.

            - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

            - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

        - `type BetaToolProgrammaticToolCalling struct{…}`

          - `Type ProgrammaticToolCalling`

            The type of the tool. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

          - `Type ImageGeneration`

            The type of the image generation tool. Always `image_generation`.

            - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

          - `Action string`

            Whether to generate a new image or edit an existing image. Default: `auto`.

            - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

            - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

            - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

          - `Background string`

            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for GPT image models that support
            transparent backgrounds. Must be one of `transparent`, `opaque`, or
            `auto` (default value). When `auto` is used, the model will
            automatically determine the best background for the image.

            `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
            transparent backgrounds. Requests with `background` set to
            `transparent` will return an error for these models; use `opaque` or
            `auto` instead.

            If `transparent`, the output format needs to support transparency,
            so it should be set to either `png` (default value) or `webp`.

            - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

            - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

            - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

          - `InputFidelity string`

            Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

            - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

            - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

          - `InputImageMask BetaToolImageGenerationInputImageMask`

            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).

            - `FileID string`

              File ID for the mask image.

            - `ImageURL string`

              Base64-encoded mask image.

          - `Model string`

            The image generation model to use. Default: `gpt-image-1`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

              - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

              - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

              - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

              - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

              - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

          - `Moderation string`

            Moderation level for the generated image. Default: `auto`.

            - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

            - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

          - `OutputCompression int64`

            Compression level for the output image. Default: 100.

          - `OutputFormat string`

            The output format of the generated image. One of `png`, `webp`, or
            `jpeg`. Default: `png`.

            - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

            - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

            - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

          - `PartialImages int64`

            Number of partial images to generate in streaming mode, from 0 (default value) to 3.

          - `Quality string`

            The quality of the generated image. One of `low`, `medium`, `high`,
            or `auto`. Default: `auto`.

            - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

            - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

            - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

            - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

          - `Size string`

            The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

              - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

              - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

              - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

          - `Type LocalShell`

            The type of the local shell tool. Always `local_shell`.

            - `const LocalShellLocalShell LocalShell = "local_shell"`

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

          - `Type Shell`

            The type of the shell tool. Always `shell`.

            - `const ShellShell Shell = "shell"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

            - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

          - `Environment BetaFunctionShellToolEnvironmentUnion`

            - `type BetaContainerAuto struct{…}`

              - `Type ContainerAuto`

                Automatically creates a container for this request

                - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit BetaContainerAutoMemoryLimit`

                The memory limit for the container.

                - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `Skills []BetaContainerAutoSkillUnion`

                An optional list of skills referenced by id or inline data.

                - `type BetaSkillReference struct{…}`

                  - `SkillID string`

                    The ID of the referenced skill.

                  - `Type SkillReference`

                    References a skill created with the /v1/skills endpoint.

                    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                  - `Version string`

                    Optional skill version. Use a positive integer or 'latest'. Omit for default.

                - `type BetaInlineSkill struct{…}`

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Source BetaInlineSkillSource`

                    Inline skill payload

                    - `Data string`

                      Base64-encoded skill zip bundle.

                    - `MediaType ApplicationZip`

                      The media type of the inline skill payload. Must be `application/zip`.

                      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                    - `Type Base64`

                      The type of the inline skill source. Must be `base64`.

                      - `const Base64Base64 Base64 = "base64"`

                  - `Type Inline`

                    Defines an inline skill for this request.

                    - `const InlineInline Inline = "inline"`

            - `type BetaLocalEnvironment struct{…}`

              - `Type Local`

                Use a local computer environment.

                - `const LocalLocal Local = "local"`

              - `Skills []BetaLocalSkill`

                An optional list of skills.

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Path string`

                  The path to the directory containing the skill.

            - `type BetaContainerReference struct{…}`

              - `ContainerID string`

                The ID of the referenced container.

              - `Type ContainerReference`

                References a container created with the /v1/containers endpoint

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Name string`

            The name of the custom tool, used to identify it in tool calls.

          - `Type Custom`

            The type of the custom tool. Always `custom`.

            - `const CustomCustom Custom = "custom"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

            - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this tool should be deferred and discovered via tool search.

          - `Description string`

            Optional description of the custom tool, used to provide more context.

          - `Format BetaCustomToolFormatUnion`

            The input format for the custom tool. Default is unconstrained text.

            - `type BetaCustomToolFormatText struct{…}`

              Unconstrained free-form text.

              - `Type Text`

                Unconstrained text format. Always `text`.

                - `const TextText Text = "text"`

            - `type BetaCustomToolFormatGrammar struct{…}`

              A grammar defined by the user.

              - `Definition string`

                The grammar definition.

              - `Syntax string`

                The syntax of the grammar definition. One of `lark` or `regex`.

                - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

              - `Type Grammar`

                Grammar format. Always `grammar`.

                - `const GrammarGrammar Grammar = "grammar"`

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

          - `Description string`

            A description of the namespace shown to the model.

          - `Name string`

            The namespace name used in tool calls (for example, `crm`).

          - `Tools []BetaNamespaceToolToolUnion`

            The function/custom tools available inside this namespace.

            - `type BetaNamespaceToolToolFunction struct{…}`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function should be deferred and discovered via tool search.

              - `Description string`

              - `OutputSchema map[string, any]`

                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

              - `Parameters any`

              - `Strict bool`

                Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Type Namespace`

            The type of the tool. Always `namespace`.

            - `const NamespaceNamespace Namespace = "namespace"`

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

          - `Type ToolSearch`

            The type of the tool. Always `tool_search`.

            - `const ToolSearchToolSearch ToolSearch = "tool_search"`

          - `Description string`

            Description shown to the model for a client-executed tool search tool.

          - `Execution BetaToolSearchToolExecution`

            Whether tool search is executed by the server or by the client.

            - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

            - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

          - `Parameters any`

            Parameter schema for a client-executed tool search tool.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchPreviewToolType`

            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

          - `SearchContentTypes []string`

            - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

            - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

          - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

            - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

            - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchPreviewToolUserLocation`

            The user's location.

            - `Type Approximate`

              The type of location approximation. Always `approximate`.

              - `const ApproximateApproximate Approximate = "approximate"`

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ApplyPatch`

            The type of the tool. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

            - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

        - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

        - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

        - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseOutputItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseOutputItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

        The unique ID of the code interpreter tool call.

      - `Code string`

        The code to run, or null if not available.

      - `ContainerID string`

        The ID of the container used to run the code.

      - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

        The outputs generated by the code interpreter, such as logs or images.
        Can be null if no outputs are available.

        - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

            The logs output from the code interpreter.

          - `Type Logs`

            The type of the output. Always `logs`.

            - `const LogsLogs Logs = "logs"`

        - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            The type of the output. Always `image`.

            - `const ImageImage Image = "image"`

          - `URL string`

            The URL of the image output from the code interpreter.

      - `Status BetaResponseCodeInterpreterToolCallStatus`

        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

        - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

        - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        The type of the code interpreter tool call. Always `code_interpreter_call`.

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Agent BetaResponseCodeInterpreterToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCall struct{…}`

      A tool call to run a command on the local shell.

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseOutputItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

      A tool call that executes one or more shell commands in a managed environment.

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

      A tool call that applies file diffs by creating, deleting, or updating files.

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseOutputItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

        - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

        - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

        - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

        - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

    - `type BetaResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseOutputItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseOutputItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `type BetaResponseCustomToolCall struct{…}`

      A call to a custom tool created by the model.

      - `CallID string`

        An identifier used to map this custom tool call to a tool call output.

      - `Input string`

        The input for the custom tool call generated by the model.

      - `Name string`

        The name of the custom tool being called.

      - `Type CustomToolCall`

        The type of the custom tool call. Always `custom_tool_call`.

        - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

      - `ID string`

        The unique ID of the custom tool call in the OpenAI platform.

      - `Agent BetaResponseCustomToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseCustomToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseCustomToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseCustomToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `Namespace string`

        The namespace of the custom tool being called.

    - `type BetaResponseCustomToolCallOutputItem struct{…}`

      The output of a custom tool call from your code, being sent back to the model.

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `OutputIndex int64`

    The index of the output item that was marked done.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseOutputItemDone`

    The type of the event. Always `response.output_item.done`.

    - `const ResponseOutputItemDoneResponseOutputItemDone ResponseOutputItemDone = "response.output_item.done"`

  - `Agent BetaResponseOutputItemDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Output Message

- `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.

    - `type BetaResponseOutputText struct{…}`

      A text output from the model.

      - `Annotations []BetaResponseOutputTextAnnotationUnion`

        The annotations of the text output.

        - `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`.

            - `const FileCitationFileCitation FileCitation = "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`.

            - `const URLCitationURLCitation URLCitation = "url_citation"`

          - `URL string`

            The URL of the web resource.

        - `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`.

            - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

            - `const FilePathFilePath FilePath = "file_path"`

      - `Text string`

        The text output from the model.

      - `Type OutputText`

        The type of the output text. Always `output_text`.

        - `const OutputTextOutputText OutputText = "output_text"`

      - `Logprobs []BetaResponseOutputTextLogprob`

        - `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`.

        - `const RefusalRefusal Refusal = "refusal"`

  - `Role Assistant`

    The role of the output message. Always `assistant`.

    - `const AssistantAssistant Assistant = "assistant"`

  - `Status BetaResponseOutputMessageStatus`

    The status of the message input. One of `in_progress`, `completed`, or
    `incomplete`. Populated when input items are returned via API.

    - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

    - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

    - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

  - `Type Message`

    The type of the output message. Always `message`.

    - `const MessageMessage Message = "message"`

  - `Agent BetaResponseOutputMessageAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Phase BetaResponseOutputMessagePhase`

    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.

    - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"`

    - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"`

### Beta Response Output Refusal

- `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`.

    - `const RefusalRefusal Refusal = "refusal"`

### Beta Response Output Text

- `type BetaResponseOutputText struct{…}`

  A text output from the model.

  - `Annotations []BetaResponseOutputTextAnnotationUnion`

    The annotations of the text output.

    - `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`.

        - `const FileCitationFileCitation FileCitation = "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`.

        - `const URLCitationURLCitation URLCitation = "url_citation"`

      - `URL string`

        The URL of the web resource.

    - `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`.

        - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

        - `const FilePathFilePath FilePath = "file_path"`

  - `Text string`

    The text output from the model.

  - `Type OutputText`

    The type of the output text. Always `output_text`.

    - `const OutputTextOutputText OutputText = "output_text"`

  - `Logprobs []BetaResponseOutputTextLogprob`

    - `Token string`

    - `Bytes []int64`

    - `Logprob float64`

    - `TopLogprobs []BetaResponseOutputTextLogprobTopLogprob`

      - `Token string`

      - `Bytes []int64`

      - `Logprob float64`

### Beta Response Output Text Annotation Added Event

- `type BetaResponseOutputTextAnnotationAddedEvent struct{…}`

  Emitted when an annotation is added to output text content.

  - `Annotation any`

    The annotation object being added. (See annotation schema for details.)

  - `AnnotationIndex int64`

    The index of the annotation within the content part.

  - `ContentIndex int64`

    The index of the content part within the output item.

  - `ItemID string`

    The unique identifier of the item to which the annotation is being added.

  - `OutputIndex int64`

    The index of the output item in the response's output array.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseOutputTextAnnotationAdded`

    The type of the event. Always 'response.output_text.annotation.added'.

    - `const ResponseOutputTextAnnotationAddedResponseOutputTextAnnotationAdded ResponseOutputTextAnnotationAdded = "response.output_text.annotation.added"`

  - `Agent BetaResponseOutputTextAnnotationAddedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Prompt

- `type BetaResponsePrompt struct{…}`

  Reference to a prompt template and its variables.
  [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

  - `ID string`

    The unique identifier of the prompt template to use.

  - `Variables map[string, BetaResponsePromptVariableUnion]`

    Optional map of values to substitute in for variables in your
    prompt. The substitution values can either be strings, or other
    Response input types like images or files.

    - `string`

    - `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`.

        - `const InputTextInputText InputText = "input_text"`

      - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

        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`.

          - `const ExplicitExplicit Explicit = "explicit"`

    - `type BetaResponseInputImage struct{…}`

      An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `Detail BetaResponseInputImageDetail`

        The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

        - `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`.

        - `const InputImageInputImage InputImage = "input_image"`

      - `FileID string`

        The ID of the file to be sent to the model.

      - `ImageURL string`

        The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

      - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

        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`.

          - `const ExplicitExplicit Explicit = "explicit"`

    - `type BetaResponseInputFile struct{…}`

      A file input to the model.

      - `Type InputFile`

        The type of the input item. Always `input_file`.

        - `const InputFileInputFile InputFile = "input_file"`

      - `Detail BetaResponseInputFileDetail`

        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`.

        - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

        - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

        - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

      - `FileData string`

        The content of the file to be sent to the model.

      - `FileID string`

        The ID of the file to be sent to the model.

      - `FileURL string`

        The URL of the file to be sent to the model.

      - `Filename string`

        The name of the file to be sent to the model.

      - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

        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`.

          - `const ExplicitExplicit Explicit = "explicit"`

  - `Version string`

    Optional version of the prompt template.

### Beta Response Queued Event

- `type BetaResponseQueuedEvent struct{…}`

  Emitted when a response is queued and waiting to be processed.

  - `Response BetaResponse`

    The full response object that is queued.

    - `ID string`

      Unique identifier for this Response.

    - `CreatedAt float64`

      Unix timestamp (in seconds) of when this Response was created.

    - `Error BetaResponseError`

      An error object returned when the model fails to generate a Response.

      - `Code BetaResponseErrorCode`

        The error code for the response.

        - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

        - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

        - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

        - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

        - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

        - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

        - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

        - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

        - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

        - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

        - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

        - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

        - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

        - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

        - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

        - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

        - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

        - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

        - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

        - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

      - `Message string`

        A human-readable description of the error.

    - `IncompleteDetails BetaResponseIncompleteDetails`

      Details about why the response is incomplete.

      - `Reason string`

        The reason why the response is incomplete.

        - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

        - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

    - `Instructions BetaResponseInstructionsUnion`

      A system (or developer) message inserted into the model's context.

      When using along with `previous_response_id`, the instructions from a previous
      response will not be carried over to the next response. This makes it simple
      to swap out system (or developer) messages in new responses.

      - `string`

      - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

        A list of one or many input items to the model, containing
        different content types.

        - `type BetaEasyInputMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role. Messages with the
          `assistant` role are presumed to have been generated by the model in previous
          interactions.

          - `Content BetaEasyInputMessageContentUnion`

            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.

            - `string`

            - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

              A list of one or many input items to the model, containing different content
              types.

              - `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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail BetaResponseInputImageDetail`

                  The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                  - `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`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `ImageURL string`

                  The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileDetail`

                  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`.

                  - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                  - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                  - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                - `FileData string`

                  The content of the file to be sent to the model.

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `FileURL string`

                  The URL of the file to be sent to the model.

                - `Filename string`

                  The name of the file to be sent to the model.

                - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Role BetaEasyInputMessageRole`

            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.

            - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

            - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

            - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

            - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

          - `Phase BetaEasyInputMessagePhase`

            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.

            - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

            - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

          - `Type BetaEasyInputMessageType`

            The type of the message input. Always `message`.

            - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

        - `type BetaResponseInputItemMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role.

          - `Content BetaResponseInputMessageContentList`

            A list of one or many input items to the model, containing different content
            types.

          - `Role string`

            The role of the message input. One of `user`, `system`, or `developer`.

            - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

            - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

            - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

          - `Agent BetaResponseInputItemMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

            - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

            - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

          - `Type string`

            The type of the message input. Always set to `message`.

            - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

        - `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.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

              - `Annotations []BetaResponseOutputTextAnnotationUnion`

                The annotations of the text output.

                - `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`.

                    - `const FileCitationFileCitation FileCitation = "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`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the web resource.

                - `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`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                    - `const FilePathFilePath FilePath = "file_path"`

              - `Text string`

                The text output from the model.

              - `Type OutputText`

                The type of the output text. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Logprobs []BetaResponseOutputTextLogprob`

                - `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`.

                - `const RefusalRefusal Refusal = "refusal"`

          - `Role Assistant`

            The role of the output message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `Status BetaResponseOutputMessageStatus`

            The status of the message input. One of `in_progress`, `completed`, or
            `incomplete`. Populated when input items are returned via API.

            - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

            - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

            - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

          - `Type Message`

            The type of the output message. Always `message`.

            - `const MessageMessage Message = "message"`

          - `Agent BetaResponseOutputMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Phase BetaResponseOutputMessagePhase`

            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.

            - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

            - `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`.

            - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

          - `Agent BetaResponseFileSearchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Results []BetaResponseFileSearchToolCallResult`

            The results of the file search tool call.

            - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

              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.

              - `string`

              - `float64`

              - `bool`

            - `FileID string`

              The unique ID of the file.

            - `Filename string`

              The name of the file.

            - `Score float64`

              The relevance score of the file - a value between 0 and 1.

            - `Text string`

              The text that was retrieved from the file.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

              The type of the pending safety check.

            - `Message string`

              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.

            - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

            - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

            - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

          - `Type BetaResponseComputerToolCallType`

            The type of the computer call. Always `computer_call`.

            - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

          - `Action BetaComputerActionUnion`

            A click action.

            - `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`.

                - `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`.

                - `const ClickClick Click = "click"`

              - `X int64`

                The x-coordinate where the click occurred.

              - `Y int64`

                The y-coordinate where the click occurred.

              - `Keys []string`

                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`.

                - `const DoubleClickDoubleClick DoubleClick = "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`.

                - `const DragDrag Drag = "drag"`

              - `Keys []string`

                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`.

                - `const KeypressKeypress Keypress = "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`.

                - `const MoveMove Move = "move"`

              - `X int64`

                The x-coordinate to move to.

              - `Y int64`

                The y-coordinate to move to.

              - `Keys []string`

                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`.

                - `const ScreenshotScreenshot Screenshot = "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`.

                - `const ScrollScroll Scroll = "scroll"`

              - `X int64`

                The x-coordinate where the scroll occurred.

              - `Y int64`

                The y-coordinate where the scroll occurred.

              - `Keys []string`

                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`.

                - `const TypeType Type = "type"`

            - `type BetaComputerActionWait struct{…}`

              A wait action.

              - `Type Wait`

                Specifies the event type. For a wait action, this property is always set to `wait`.

                - `const WaitWait Wait = "wait"`

          - `Actions BetaComputerActionList`

            Flattened batched actions for `computer_use`. Each action includes an
            `type` discriminator and action-specific fields.

            - `type BetaComputerActionClick struct{…}`

              A click action.

            - `type BetaComputerActionDoubleClick struct{…}`

              A double click action.

            - `type BetaComputerActionDrag struct{…}`

              A drag action.

            - `type BetaComputerActionKeypress struct{…}`

              A collection of keypresses the model would like to perform.

            - `type BetaComputerActionMove struct{…}`

              A mouse move action.

            - `type BetaComputerActionScreenshot struct{…}`

              A screenshot action.

            - `type BetaComputerActionScroll struct{…}`

              A scroll action.

            - `type BetaComputerActionType struct{…}`

              An action to type in text.

            - `type BetaComputerActionWait struct{…}`

              A wait action.

          - `Agent BetaResponseComputerToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

            The ID of the computer tool call that produced the output.

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            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`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

              The identifier of an uploaded file that contains the screenshot.

            - `ImageURL string`

              The URL of the screenshot image.

          - `Type ComputerCallOutput`

            The type of the computer tool call output. Always `computer_call_output`.

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

            The ID of the computer tool call output.

          - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

            The safety checks reported by the API that have been acknowledged by the developer.

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseInputItemComputerCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

            - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

            - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

          - `ID string`

            The unique ID of the web search tool call.

          - `Action BetaResponseFunctionWebSearchActionUnion`

            An object describing the specific action taken in this web search call.
            Includes details on how the model used the web (search, open_page, find_in_page).

            - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

              Action type "search" - Performs a web search query.

              - `Type Search`

                The action type.

                - `const SearchSearch Search = "search"`

              - `Queries []string`

                The search queries.

              - `Query string`

                The search query.

              - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                The sources used in the search.

                - `Type URL`

                  The type of source. Always `url`.

                  - `const URLURL URL = "url"`

                - `URL string`

                  The URL of the source.

            - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

              Action type "open_page" - Opens a specific URL from search results.

              - `Type OpenPage`

                The action type.

                - `const OpenPageOpenPage OpenPage = "open_page"`

              - `URL string`

                The URL opened by the model.

            - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

              Action type "find_in_page": Searches for a pattern within a loaded page.

              - `Pattern string`

                The pattern or text to search for within the page.

              - `Type FindInPage`

                The action type.

                - `const FindInPageFindInPage FindInPage = "find_in_page"`

              - `URL string`

                The URL of the page searched for the pattern.

          - `Status BetaResponseFunctionWebSearchStatus`

            The status of the web search tool call.

            - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

            - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

            - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

            - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

          - `Type WebSearchCall`

            The type of the web search tool call. Always `web_search_call`.

            - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

          - `Agent BetaResponseFunctionWebSearchAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

            - `const FunctionCallFunctionCall FunctionCall = "function_call"`

          - `ID string`

            The unique ID of the function tool call.

          - `Agent BetaResponseFunctionToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the function to run.

          - `Status BetaResponseFunctionToolCallStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

            - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

        - `type BetaResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

            The unique ID of the function tool call generated by the model.

          - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

            Text, image, or file output of the function tool call.

            - `string`

            - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

              An array of content outputs (text, image, file) for the function tool call.

              - `type BetaResponseInputTextContent 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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  The type of the input item. Always `input_image`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail BetaResponseInputImageContentDetail`

                  The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                  - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                  - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                  - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                  - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `ImageURL string`

                  The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileContentDetail`

                  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`.

                  - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                  - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                  - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                - `FileData string`

                  The base64-encoded data of the file to be sent to the model.

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `FileURL string`

                  The URL of the file to be sent to the model.

                - `Filename string`

                  The name of the file to be sent to the model.

                - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Type FunctionCallOutput`

            The type of the function tool call output. Always `function_call_output`.

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

            The unique ID of the function tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemFunctionCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

            - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemAgentMessage struct{…}`

          A message routed between agents.

          - `Author string`

            The sending agent identity.

          - `Content []BetaResponseInputItemAgentMessageContentUnion`

            Plaintext, image, or encrypted content sent between agents.

            - `type BetaResponseInputTextContent struct{…}`

              A text input to the model.

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The item type. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `ID string`

            The unique ID of this agent message item.

          - `Agent BetaResponseInputItemAgentMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCall struct{…}`

          - `Action string`

            The multi-agent action that was executed.

            - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

          - `Arguments string`

            The action arguments as a JSON string.

          - `CallID string`

            The unique ID linking this call to its output.

          - `Type MultiAgentCall`

            The item type. Always `multi_agent_call`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `ID string`

            The unique ID of this multi-agent call.

          - `Agent BetaResponseInputItemMultiAgentCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

          - `Action string`

            The multi-agent action that produced this result.

            - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

          - `CallID string`

            The unique ID of the multi-agent call.

          - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

            Text output returned by the multi-agent action.

            - `Text string`

              The text content.

            - `Type OutputText`

              The content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

              Citations associated with the text content.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                - `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 citation type. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                - `EndIndex int64`

                  The index of the last character of the citation in the message.

                - `StartIndex int64`

                  The index of the first character of the citation in the message.

                - `Title string`

                  The title of the cited resource.

                - `Type URLCitation`

                  The citation type. Always `url_citation`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the cited resource.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                - `ContainerID string`

                  The ID of the container.

                - `EndIndex int64`

                  The index of the last character of the citation in the message.

                - `FileID string`

                  The ID of the container file.

                - `Filename string`

                  The filename of the container file cited.

                - `StartIndex int64`

                  The index of the first character of the citation in the message.

                - `Type ContainerFileCitation`

                  The citation type. Always `container_file_citation`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

          - `Type MultiAgentCallOutput`

            The item type. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `ID string`

            The unique ID of this multi-agent call output.

          - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemToolSearchCall struct{…}`

          - `Arguments any`

            The arguments supplied to the tool search call.

          - `Type ToolSearchCall`

            The item type. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `ID string`

            The unique ID of this tool search call.

          - `Agent BetaResponseInputItemToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution string`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

            - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

          - `Status string`

            The status of the tool search call.

            - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

            - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

            - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

        - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by the tool search output.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `Name string`

                The name of the function to call.

              - `Parameters map[string, any]`

                A JSON schema object describing the parameters of the function.

              - `Strict bool`

                Whether strict parameter validation is enforced for this function tool.

              - `Type Function`

                The type of the function tool. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function is deferred and loaded via tool search.

              - `Description string`

                A description of the function. Used by the model to determine whether or not to call the function.

              - `OutputSchema map[string, any]`

                A JSON schema object describing the JSON value encoded in string outputs for this function.

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `Type FileSearch`

                The type of the file search tool. Always `file_search`.

                - `const FileSearchFileSearch FileSearch = "file_search"`

              - `VectorStoreIDs []string`

                The IDs of the vector stores to search.

              - `Filters BetaFileSearchToolFiltersUnion`

                A filter to apply.

                - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

                - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                  Combine multiple filters using `and` or `or`.

                  - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                    Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                    - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                      - `Key string`

                        The key to compare against the value.

                      - `Type string`

                        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                        - `eq`: equals
                        - `ne`: not equal
                        - `gt`: greater than
                        - `gte`: greater than or equal
                        - `lt`: less than
                        - `lte`: less than or equal
                        - `in`: in
                        - `nin`: not in

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                      - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                        The value to compare against the attribute key; supports string, number, or boolean types.

                        - `string`

                        - `float64`

                        - `bool`

                        - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                          - `string`

                          - `float64`

                  - `Type string`

                    Type of operation: `and` or `or`.

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

              - `MaxNumResults int64`

                The maximum number of results to return. This number should be between 1 and 50 inclusive.

              - `RankingOptions BetaFileSearchToolRankingOptions`

                Ranking options for search.

                - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                  Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                  - `EmbeddingWeight float64`

                    The weight of the embedding in the reciprocal ranking fusion.

                  - `TextWeight float64`

                    The weight of the text in the reciprocal ranking fusion.

                - `Ranker string`

                  The ranker to use for the file search.

                  - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                  - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                - `ScoreThreshold float64`

                  The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `Type Computer`

                The type of the computer tool. Always `computer`.

                - `const ComputerComputer Computer = "computer"`

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `DisplayHeight int64`

                The height of the computer display.

              - `DisplayWidth int64`

                The width of the computer display.

              - `Environment BetaComputerUsePreviewToolEnvironment`

                The type of computer environment to control.

                - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

              - `Type ComputerUsePreview`

                The type of the computer use tool. Always `computer_use_preview`.

                - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchToolType`

                The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

              - `Filters BetaWebSearchToolFilters`

                Filters for the search.

                - `AllowedDomains []string`

                  Allowed domains for the search. If not provided, all domains are allowed.
                  Subdomains of the provided domains are allowed as well.

                  Example: `["pubmed.ncbi.nlm.nih.gov"]`

              - `SearchContextSize BetaWebSearchToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchToolUserLocation`

                The approximate location of the user.

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                - `Type string`

                  The type of location approximation. Always `approximate`.

                  - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `ServerLabel string`

                A label for this MCP server, used to identify it in tool calls.

              - `Type Mcp`

                The type of the MCP tool. Always `mcp`.

                - `const McpMcp Mcp = "mcp"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

              - `AllowedTools BetaToolMcpAllowedToolsUnion`

                List of allowed tool names or a filter object.

                - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                  A string array of allowed tool names

                - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `Authorization string`

                An OAuth access token that can be used with a remote MCP server, either
                with a custom MCP server URL or a service connector. Your application
                must handle the OAuth authorization flow and provide the token here.

              - `ConnectorID string`

                Identifier for service connectors, like those available in ChatGPT. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                Currently supported `connector_id` values are:

                - Dropbox: `connector_dropbox`
                - Gmail: `connector_gmail`
                - Google Calendar: `connector_googlecalendar`
                - Google Drive: `connector_googledrive`
                - Microsoft Teams: `connector_microsoftteams`
                - Outlook Calendar: `connector_outlookcalendar`
                - Outlook Email: `connector_outlookemail`
                - SharePoint: `connector_sharepoint`

                - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

              - `DeferLoading bool`

                Whether this MCP tool is deferred and discovered via tool search.

              - `Headers map[string, string]`

                Optional HTTP headers to send to the MCP server. Use for authentication
                or other purposes.

              - `RequireApproval BetaToolMcpRequireApprovalUnion`

                Specify which of the MCP server's tools require approval.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                  Specify which of the MCP server's tools require approval. Can be
                  `always`, `never`, or a filter object associated with tools
                  that require approval.

                  - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                  - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                  Specify a single approval policy for all tools. One of `always` or
                  `never`. When set to `always`, all tools will require approval. When
                  set to `never`, all tools will not require approval.

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

              - `ServerDescription string`

                Optional description of the MCP server, used to provide more context.

              - `ServerURL string`

                The URL for the MCP server. One of `server_url`, `connector_id`, or
                `tunnel_id` must be provided.

              - `TunnelID string`

                The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided.

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

              - `Container BetaToolCodeInterpreterContainerUnion`

                The code interpreter container. Can be a container ID or an object that
                specifies uploaded file IDs to make available to your code, along with an
                optional `memory_limit` setting.

                - `string`

                - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                  Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                  - `Type Auto`

                    Always `auto`.

                    - `const AutoAuto Auto = "auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit string`

                    The memory limit for the code interpreter container.

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `Type Disabled`

                        Disable outbound network access. Always `disabled`.

                        - `const DisabledDisabled Disabled = "disabled"`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                      - `AllowedDomains []string`

                        A list of allowed domains when type is `allowlist`.

                      - `Type Allowlist`

                        Allow outbound network access only to specified domains. Always `allowlist`.

                        - `const AllowlistAllowlist Allowlist = "allowlist"`

                      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                        Optional domain-scoped secrets for allowlisted domains.

                        - `Domain string`

                          The domain associated with the secret.

                        - `Name string`

                          The name of the secret to inject for the domain.

                        - `Value string`

                          The secret value to inject for the domain.

              - `Type CodeInterpreter`

                The type of the code interpreter tool. Always `code_interpreter`.

                - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

            - `type BetaToolProgrammaticToolCalling struct{…}`

              - `Type ProgrammaticToolCalling`

                The type of the tool. Always `programmatic_tool_calling`.

                - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

              - `Type ImageGeneration`

                The type of the image generation tool. Always `image_generation`.

                - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

              - `Action string`

                Whether to generate a new image or edit an existing image. Default: `auto`.

                - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

              - `Background string`

                Allows to set transparency for the background of the generated image(s).
                This parameter is only supported for GPT image models that support
                transparent backgrounds. Must be one of `transparent`, `opaque`, or
                `auto` (default value). When `auto` is used, the model will
                automatically determine the best background for the image.

                `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                transparent backgrounds. Requests with `background` set to
                `transparent` will return an error for these models; use `opaque` or
                `auto` instead.

                If `transparent`, the output format needs to support transparency,
                so it should be set to either `png` (default value) or `webp`.

                - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

              - `InputFidelity string`

                Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

              - `InputImageMask BetaToolImageGenerationInputImageMask`

                Optional mask for inpainting. Contains `image_url`
                (string, optional) and `file_id` (string, optional).

                - `FileID string`

                  File ID for the mask image.

                - `ImageURL string`

                  Base64-encoded mask image.

              - `Model string`

                The image generation model to use. Default: `gpt-image-1`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                  - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                  - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                  - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                  - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                  - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

              - `Moderation string`

                Moderation level for the generated image. Default: `auto`.

                - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

              - `OutputCompression int64`

                Compression level for the output image. Default: 100.

              - `OutputFormat string`

                The output format of the generated image. One of `png`, `webp`, or
                `jpeg`. Default: `png`.

                - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

              - `PartialImages int64`

                Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              - `Quality string`

                The quality of the generated image. One of `low`, `medium`, `high`,
                or `auto`. Default: `auto`.

                - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

              - `Size string`

                The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                  - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                  - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                  - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

              - `Type LocalShell`

                The type of the local shell tool. Always `local_shell`.

                - `const LocalShellLocalShell LocalShell = "local_shell"`

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

              - `Type Shell`

                The type of the shell tool. Always `shell`.

                - `const ShellShell Shell = "shell"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

              - `Environment BetaFunctionShellToolEnvironmentUnion`

                - `type BetaContainerAuto struct{…}`

                  - `Type ContainerAuto`

                    Automatically creates a container for this request

                    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit BetaContainerAutoMemoryLimit`

                    The memory limit for the container.

                    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `Skills []BetaContainerAutoSkillUnion`

                    An optional list of skills referenced by id or inline data.

                    - `type BetaSkillReference struct{…}`

                      - `SkillID string`

                        The ID of the referenced skill.

                      - `Type SkillReference`

                        References a skill created with the /v1/skills endpoint.

                        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                      - `Version string`

                        Optional skill version. Use a positive integer or 'latest'. Omit for default.

                    - `type BetaInlineSkill struct{…}`

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Source BetaInlineSkillSource`

                        Inline skill payload

                        - `Data string`

                          Base64-encoded skill zip bundle.

                        - `MediaType ApplicationZip`

                          The media type of the inline skill payload. Must be `application/zip`.

                          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                        - `Type Base64`

                          The type of the inline skill source. Must be `base64`.

                          - `const Base64Base64 Base64 = "base64"`

                      - `Type Inline`

                        Defines an inline skill for this request.

                        - `const InlineInline Inline = "inline"`

                - `type BetaLocalEnvironment struct{…}`

                  - `Type Local`

                    Use a local computer environment.

                    - `const LocalLocal Local = "local"`

                  - `Skills []BetaLocalSkill`

                    An optional list of skills.

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Path string`

                      The path to the directory containing the skill.

                - `type BetaContainerReference struct{…}`

                  - `ContainerID string`

                    The ID of the referenced container.

                  - `Type ContainerReference`

                    References a container created with the /v1/containers endpoint

                    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Name string`

                The name of the custom tool, used to identify it in tool calls.

              - `Type Custom`

                The type of the custom tool. Always `custom`.

                - `const CustomCustom Custom = "custom"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this tool should be deferred and discovered via tool search.

              - `Description string`

                Optional description of the custom tool, used to provide more context.

              - `Format BetaCustomToolFormatUnion`

                The input format for the custom tool. Default is unconstrained text.

                - `type BetaCustomToolFormatText struct{…}`

                  Unconstrained free-form text.

                  - `Type Text`

                    Unconstrained text format. Always `text`.

                    - `const TextText Text = "text"`

                - `type BetaCustomToolFormatGrammar struct{…}`

                  A grammar defined by the user.

                  - `Definition string`

                    The grammar definition.

                  - `Syntax string`

                    The syntax of the grammar definition. One of `lark` or `regex`.

                    - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                    - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                  - `Type Grammar`

                    Grammar format. Always `grammar`.

                    - `const GrammarGrammar Grammar = "grammar"`

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

              - `Description string`

                A description of the namespace shown to the model.

              - `Name string`

                The namespace name used in tool calls (for example, `crm`).

              - `Tools []BetaNamespaceToolToolUnion`

                The function/custom tools available inside this namespace.

                - `type BetaNamespaceToolToolFunction struct{…}`

                  - `Name string`

                  - `Type Function`

                    - `const FunctionFunction Function = "function"`

                  - `AllowedCallers []string`

                    The tool invocation context(s).

                    - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                    - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                  - `DeferLoading bool`

                    Whether this function should be deferred and discovered via tool search.

                  - `Description string`

                  - `OutputSchema map[string, any]`

                    A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                  - `Parameters any`

                  - `Strict bool`

                    Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                - `type BetaCustomTool struct{…}`

                  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Type Namespace`

                The type of the tool. Always `namespace`.

                - `const NamespaceNamespace Namespace = "namespace"`

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

              - `Type ToolSearch`

                The type of the tool. Always `tool_search`.

                - `const ToolSearchToolSearch ToolSearch = "tool_search"`

              - `Description string`

                Description shown to the model for a client-executed tool search tool.

              - `Execution BetaToolSearchToolExecution`

                Whether tool search is executed by the server or by the client.

                - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

              - `Parameters any`

                Parameter schema for a client-executed tool search tool.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchPreviewToolType`

                The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

              - `SearchContentTypes []string`

                - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

              - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchPreviewToolUserLocation`

                The user's location.

                - `Type Approximate`

                  The type of location approximation. Always `approximate`.

                  - `const ApproximateApproximate Approximate = "approximate"`

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

              - `Type ApplyPatch`

                The type of the tool. Always `apply_patch`.

                - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

          - `Type ToolSearchOutput`

            The item type. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `ID string`

            The unique ID of this tool search output.

          - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution BetaResponseToolSearchOutputItemParamExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

            - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemParamStatus`

            The status of the tool search output.

            - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

        - `type BetaResponseInputItemAdditionalTools struct{…}`

          - `Role Developer`

            The role that provided the additional tools. Only `developer` is supported.

            - `const DeveloperDeveloper Developer = "developer"`

          - `Tools []BetaToolUnion`

            A list of additional tools made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The item type. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `ID string`

            The unique ID of this additional tools item.

          - `Agent BetaResponseInputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

          - `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`.

              - `const SummaryTextSummaryText SummaryText = "summary_text"`

          - `Type Reasoning`

            The type of the object. Always `reasoning`.

            - `const ReasoningReasoning Reasoning = "reasoning"`

          - `Agent BetaResponseReasoningItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Content []BetaResponseReasoningItemContent`

            Reasoning text content.

            - `Text string`

              The reasoning text from the model.

            - `Type ReasoningText`

              The type of the reasoning text. Always `reasoning_text`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `EncryptedContent string`

            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.

          - `Status BetaResponseReasoningItemStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

            - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

            - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

        - `type BetaResponseCompactionItemParamResp struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `EncryptedContent string`

            The encrypted content of the compaction summary.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

            The ID of the compaction item.

          - `Agent BetaResponseCompactionItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseInputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

          - `ID string`

            The unique ID of the code interpreter tool call.

          - `Code string`

            The code to run, or null if not available.

          - `ContainerID string`

            The ID of the container used to run the code.

          - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

            The outputs generated by the code interpreter, such as logs or images.
            Can be null if no outputs are available.

            - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

              The logs output from the code interpreter.

              - `Logs string`

                The logs output from the code interpreter.

              - `Type Logs`

                The type of the output. Always `logs`.

                - `const LogsLogs Logs = "logs"`

            - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

              The image output from the code interpreter.

              - `Type Image`

                The type of the output. Always `image`.

                - `const ImageImage Image = "image"`

              - `URL string`

                The URL of the image output from the code interpreter.

          - `Status BetaResponseCodeInterpreterToolCallStatus`

            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

            - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

            - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

            - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

            - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

            - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

          - `Type CodeInterpreterCall`

            The type of the code interpreter tool call. Always `code_interpreter_call`.

            - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

          - `Agent BetaResponseCodeInterpreterToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCall struct{…}`

          A tool call to run a command on the local shell.

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseInputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemShellCall struct{…}`

          A tool representing a request to execute one or more shell commands.

          - `Action BetaResponseInputItemShellCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

              Ordered shell commands for the execution environment to run.

            - `MaxOutputLength int64`

              Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

            - `TimeoutMs int64`

              Maximum wall-clock time in milliseconds to allow the shell commands to run.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

            The environment to execute the shell commands in.

            - `type BetaLocalEnvironment struct{…}`

            - `type BetaContainerReference struct{…}`

          - `Status string`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

            - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

        - `type BetaResponseInputItemShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Output []BetaResponseFunctionShellCallOutputContent`

            Captured chunks of stdout and stderr output, along with their associated outcomes.

            - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

              The exit or timeout outcome associated with this shell call.

              - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  The exit code returned by the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              Captured stderr output for the shell call.

            - `Stdout string`

              Captured stdout output for the shell call.

          - `Type ShellCallOutput`

            The type of the item. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

            The unique ID of the shell tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `MaxOutputLength int64`

            The maximum number of UTF-8 characters captured for this shell call's combined output.

          - `Status string`

            The status of the shell call output.

            - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemApplyPatchCall struct{…}`

          A tool call representing a request to create, delete, or update files using diff patches.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

            The specific create, delete, or update instruction for the apply_patch tool call.

            - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply when creating the file.

              - `Path string`

                Path of the file to create relative to the workspace root.

              - `Type CreateFile`

                The operation type. Always `create_file`.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

                Path of the file to delete relative to the workspace root.

              - `Type DeleteFile`

                The operation type. Always `delete_file`.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply to the existing file.

              - `Path string`

                Path of the file to update relative to the workspace root.

              - `Type UpdateFile`

                The operation type. Always `update_file`.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status string`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

            - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status string`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

            - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Output string`

            Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

        - `type BetaResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseInputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseInputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

            The unique ID of the approval response

          - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `type BetaResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseInputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

            - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

            - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

        - `type BetaResponseCustomToolCallOutput struct{…}`

          The output of a custom tool call from your code, being sent back to the model.

          - `CallID string`

            The call ID, used to map this custom tool call output to a custom tool call.

          - `Output BetaResponseCustomToolCallOutputOutputUnion`

            The output from the custom tool call generated by your code.
            Can be a string or an list of output content.

            - `string`

            - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              Text, image, or file output of the custom tool call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            The type of the custom tool call output. Always `custom_tool_call_output`.

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

            The unique ID of the custom tool call output in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

          - `CallID string`

            An identifier used to map this custom tool call to a tool call output.

          - `Input string`

            The input for the custom tool call generated by the model.

          - `Name string`

            The name of the custom tool being called.

          - `Type CustomToolCall`

            The type of the custom tool call. Always `custom_tool_call`.

            - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

          - `ID string`

            The unique ID of the custom tool call in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the custom tool being called.

        - `type BetaResponseInputItemCompactionTrigger struct{…}`

          Compacts the current context. Must be the final input item.

          - `Type CompactionTrigger`

            The type of the item. Always `compaction_trigger`.

            - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

          - `Agent BetaResponseInputItemCompactionTriggerAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

            The ID of the item to reference.

          - `Agent BetaResponseInputItemItemReferenceAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Type string`

            The type of item to reference. Always `item_reference`.

            - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

        - `type BetaResponseInputItemProgram struct{…}`

          - `ID string`

            The unique ID of this program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The item type. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseInputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of this program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output.

            - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

            - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The item type. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseInputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

    - `Metadata map[string, string]`

      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.

    - `Model BetaResponseModel`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `type BetaResponseModel string`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

        - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

        - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

        - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

        - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

        - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

        - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

        - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

        - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

        - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

        - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

        - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

        - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

        - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

        - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

        - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

        - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

        - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

        - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

        - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

        - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

        - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

        - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

        - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

        - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

        - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

        - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

        - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

        - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

        - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

        - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

        - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

        - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

        - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

        - `const BetaResponseModelO3 BetaResponseModel = "o3"`

        - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

        - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

        - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

        - `const BetaResponseModelO1 BetaResponseModel = "o1"`

        - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

        - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

        - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

        - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

        - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

        - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

        - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

        - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

        - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

        - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

        - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

        - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

        - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

        - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

        - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

        - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

        - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

        - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

        - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

        - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

        - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

        - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

        - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

        - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

        - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

        - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

        - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

        - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

        - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

        - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

        - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

        - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

        - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

        - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

        - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

        - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

        - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

        - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

        - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

        - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

        - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

        - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

        - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

        - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

        - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

        - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

        - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

        - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

        - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

        - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

        - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

      - `string`

    - `Object Response`

      The object type of this resource - always set to `response`.

      - `const ResponseResponse Response = "response"`

    - `Output []BetaResponseOutputItemUnion`

      An array of content items generated by the model.

      - The length and order of items in the `output` array is dependent
        on the model's response.
      - Rather than accessing the first item in the `output` array and
        assuming it's an `assistant` message with the content generated by
        the model, you might consider using the `output_text` property where
        supported in SDKs.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

        - `ID string`

          The unique ID of the function call tool output.

        - `CallID string`

          The unique ID of the function tool call generated by the model.

        - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

          The output from the function call generated by your code.
          Can be a string or an list of output content.

          - `string`

          - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

            Text, image, or file output of the function call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Status BetaResponseFunctionToolCallOutputItemStatus`

          The status of the item. One of `in_progress`, `completed`, or
          `incomplete`. Populated when items are returned via API.

          - `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`.

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `Agent BetaResponseFunctionToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `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.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

          - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

            A text content.

            - `Text string`

            - `Type Text`

              - `const TextText Text = "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`.

              - `const SummaryTextSummaryText SummaryText = "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`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `type BetaResponseOutputRefusal struct{…}`

            A refusal from the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `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`.

              - `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.

            - `Type ComputerScreenshot`

              Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

              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`.

                - `const ExplicitExplicit Explicit = "explicit"`

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

          - `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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The type of the item. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `Agent BetaResponseOutputItemAgentMessageAgent`

          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.

          - `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`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `Agent BetaResponseOutputItemMultiAgentCallAgent`

          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.

          - `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.

        - `Output []BetaResponseOutputText`

          Text output returned by the multi-agent action.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

          - `Logprobs []BetaResponseOutputTextLogprob`

        - `Type MultiAgentCallOutput`

          The type of the multi-agent result. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `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.

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          A computer screenshot image used with the computer use tool.

        - `Status BetaResponseComputerToolCallOutputItemStatus`

          The status of the message input. One of `in_progress`, `completed`, or
          `incomplete`. Populated when input items are returned via API.

          - `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`.

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

          The safety checks reported by the API that have been acknowledged by the
          developer.

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseComputerToolCallOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseOutputItemProgram struct{…}`

        - `ID string`

          The unique ID of the program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The type of the item. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseOutputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of the program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output item.

          - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

          - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The type of the item. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseOutputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseToolSearchCall struct{…}`

        - `ID string`

          The unique ID of the tool search call item.

        - `Arguments any`

          Arguments used for the tool search call.

        - `CallID string`

          The unique ID of the tool search call generated by the model.

        - `Execution BetaResponseToolSearchCallExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

          - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

        - `Status BetaResponseToolSearchCallStatus`

          The status of the tool search call item that was recorded.

          - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

          - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

          - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

        - `Type ToolSearchCall`

          The type of the item. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `Agent BetaResponseToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseToolSearchOutputItem struct{…}`

        - `ID string`

          The unique ID of the tool search output item.

        - `CallID string`

          The unique ID of the tool search call generated by the model.

        - `Execution BetaResponseToolSearchOutputItemExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

          - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemStatus`

          The status of the tool search output item that was recorded.

          - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by tool search.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ToolSearchOutput`

          The type of the item. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `Agent BetaResponseToolSearchOutputItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemAdditionalTools struct{…}`

        - `ID string`

          The unique ID of the additional tools item.

        - `Role string`

          The role that provided the additional tools.

          - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

          - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

          - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

          - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

          - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

          - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

          - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

        - `Tools []BetaToolUnion`

          The additional tool definitions made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The type of the item. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `Agent BetaResponseOutputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCompactionItem struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `ID string`

          The unique ID of the compaction item.

        - `EncryptedContent string`

          The encrypted content that was produced by compaction.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `Agent BetaResponseCompactionItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseOutputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseOutputItemLocalShellCall struct{…}`

        A tool call to run a command on the local shell.

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseOutputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseOutputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionShellToolCall struct{…}`

        A tool call that executes one or more shell commands in a managed environment.

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Action BetaResponseFunctionShellToolCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

          - `MaxOutputLength int64`

            Optional maximum number of characters to return from each command.

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the commands.

        - `CallID string`

          The unique ID of the shell tool call generated by the model.

        - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

          Represents the use of a local environment to perform shell actions.

          - `type BetaResponseLocalEnvironment struct{…}`

            Represents the use of a local environment to perform shell actions.

            - `Type Local`

              The environment type. Always `local`.

              - `const LocalLocal Local = "local"`

          - `type BetaResponseContainerReference struct{…}`

            Represents a container created with /v1/containers.

            - `ContainerID string`

            - `Type ContainerReference`

              The environment type. Always `container_reference`.

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `Status BetaResponseFunctionShellToolCallStatus`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `Agent BetaResponseFunctionShellToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

        - `ID string`

          The unique ID of the shell call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the shell tool call generated by the model.

        - `MaxOutputLength int64`

          The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

        - `Output []BetaResponseFunctionShellToolCallOutputOutput`

          An array of shell call output contents

          - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

            Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                Exit code from the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            The standard error output that was captured.

          - `Stdout string`

            The standard output that was captured.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `Status BetaResponseFunctionShellToolCallOutputStatus`

          The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

          - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

          - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

        - `Type ShellCallOutput`

          The type of the shell call output. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `Agent BetaResponseFunctionShellToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `type BetaResponseApplyPatchToolCall struct{…}`

        A tool call that applies file diffs by creating, deleting, or updating files.

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseApplyPatchToolCallOperationUnion`

          One of the create_file, delete_file, or update_file operations applied via apply_patch.

          - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

            Instruction describing how to create a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to create.

            - `Type CreateFile`

              Create a new file with the provided diff.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

            Instruction describing how to delete a file via the apply_patch tool.

            - `Path string`

              Path of the file to delete.

            - `Type DeleteFile`

              Delete the specified file.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

            Instruction describing how to update a file via the apply_patch tool.

            - `Diff string`

              Diff to apply.

            - `Path string`

              Path of the file to update.

            - `Type UpdateFile`

              Update an existing file with the provided diff.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status BetaResponseApplyPatchToolCallStatus`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

          - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `Agent BetaResponseApplyPatchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call.

      - `type BetaResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status BetaResponseApplyPatchToolCallOutputStatus`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

          - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `Agent BetaResponseApplyPatchToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `CreatedBy string`

          The ID of the entity that created this tool call output.

        - `Output string`

          Optional textual output returned by the apply patch tool.

      - `type BetaResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseOutputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

          - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

          - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

      - `type BetaResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseOutputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseOutputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ID string`

          The unique ID of the approval response

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `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.

        - `ID string`

          The unique ID of the custom tool call output item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or
          `incomplete`. Populated when items are returned via API.

          - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

          - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

          - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

        - `CreatedBy string`

          The identifier of the actor that created the item.

    - `ParallelToolCalls bool`

      Whether to allow the model to run tool calls in parallel.

    - `Temperature float64`

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
      We generally recommend altering this or `top_p` but not both.

    - `ToolChoice BetaResponseToolChoiceUnion`

      How the model should select which tool (or tools) to use when generating
      a response. See the `tools` parameter to see how to specify which tools
      the model can call.

      - `type BetaToolChoiceOptions string`

        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a message.

        `auto` means the model can pick between generating a message or calling one or
        more tools.

        `required` means the model must call one or more tools.

        - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

        - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

        - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

      - `type BetaToolChoiceAllowed struct{…}`

        Constrains the tools available to the model to a pre-defined set.

        - `Mode BetaToolChoiceAllowedMode`

          Constrains the tools available to the model to a pre-defined set.

          `auto` allows the model to pick from among the allowed tools and generate a
          message.

          `required` requires the model to call one or more of the allowed tools.

          - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

          - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

        - `Tools []map[string, any]`

          A list of tool definitions that the model should be allowed to call.

          For the Responses API, the list of tool definitions might look like:

          ```json
          [
            { "type": "function", "name": "get_weather" },
            { "type": "mcp", "server_label": "deepwiki" },
            { "type": "image_generation" }
          ]
          ```

        - `Type AllowedTools`

          Allowed tool configuration type. Always `allowed_tools`.

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type BetaToolChoiceTypes struct{…}`

        Indicates that the model should use a built-in tool to generate a response.
        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

        - `Type BetaToolChoiceTypesType`

          The type of hosted tool the model should to use. Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).

          Allowed values are:

          - `file_search`
          - `web_search_preview`
          - `computer`
          - `computer_use_preview`
          - `computer_use`
          - `code_interpreter`
          - `image_generation`

          - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

          - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

          - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

          - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

          - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

      - `type BetaToolChoiceFunction struct{…}`

        Use this option to force the model to call a specific function.

        - `Name string`

          The name of the function to call.

        - `Type Function`

          For function calling, the type is always `function`.

          - `const FunctionFunction Function = "function"`

      - `type BetaToolChoiceMcp struct{…}`

        Use this option to force the model to call a specific tool on a remote MCP server.

        - `ServerLabel string`

          The label of the MCP server to use.

        - `Type Mcp`

          For MCP tools, the type is always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

          The name of the tool to call on the server.

      - `type BetaToolChoiceCustom struct{…}`

        Use this option to force the model to call a specific custom tool.

        - `Name string`

          The name of the custom tool to call.

        - `Type Custom`

          For custom tool calling, the type is always `custom`.

          - `const CustomCustom Custom = "custom"`

      - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

        - `Type ProgrammaticToolCalling`

          The tool to call. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolChoiceApplyPatch struct{…}`

        Forces the model to call the apply_patch tool when executing a tool call.

        - `Type ApplyPatch`

          The tool to call. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type BetaToolChoiceShell struct{…}`

        Forces the model to call the shell tool when a tool call is required.

        - `Type Shell`

          The tool to call. Always `shell`.

          - `const ShellShell Shell = "shell"`

    - `Tools []BetaToolUnion`

      An array of tools the model may call while generating a response. You
      can specify which tool to use by setting the `tool_choice` parameter.

      We support the following categories of tools:

      - **Built-in tools**: Tools that are provided by OpenAI that extend the
        model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
        or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).
      - **MCP Tools**: Integrations with third-party systems via custom MCP servers
        or predefined connectors such as Google Drive and SharePoint. Learn more about
        [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
      - **Function calls (custom tools)**: Functions that are defined by you,
        enabling the model to call your own code with strongly typed arguments
        and outputs. Learn more about
        [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
        custom tools to call your own code.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `TopP float64`

      An alternative to sampling with temperature, called nucleus sampling,
      where the model considers the results of the tokens with top_p probability
      mass. So 0.1 means only the tokens comprising the top 10% probability mass
      are considered.

      We generally recommend altering this or `temperature` but not both.

    - `Background bool`

      Whether to run the model response in the background.
      [Learn more](https://platform.openai.com/docs/guides/background).

    - `CompletedAt float64`

      Unix timestamp (in seconds) of when this Response was completed.
      Only present when the status is `completed`.

    - `Conversation BetaResponseConversation`

      The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

      - `ID string`

        The unique ID of the conversation that this response was associated with.

    - `MaxOutputTokens int64`

      An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

    - `MaxToolCalls int64`

      The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

    - `Moderation BetaResponseModeration`

      Moderation results for the response input and output, if moderated completions were requested.

      - `Input BetaResponseModerationInputUnion`

        Moderation for the response input.

        - `type BetaResponseModerationInputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationInputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

      - `Output BetaResponseModerationOutputUnion`

        Moderation for the response output.

        - `type BetaResponseModerationOutputModerationResult struct{…}`

          A moderation result produced for the response input or output.

          - `Categories map[string, bool]`

            A dictionary of moderation categories to booleans, True if the input is flagged under this category.

          - `CategoryAppliedInputTypes map[string, []string]`

            Which modalities of input are reflected by the score for each category.

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

            - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

          - `CategoryScores map[string, float64]`

            A dictionary of moderation categories to scores.

          - `Flagged bool`

            A boolean indicating whether the content was flagged by any category.

          - `Model string`

            The moderation model that produced this result.

          - `Type ModerationResult`

            The object type, which was always `moderation_result` for successful moderation results.

            - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

        - `type BetaResponseModerationOutputError struct{…}`

          An error produced while attempting moderation for the response input or output.

          - `Code string`

            The error code.

          - `Message string`

            The error message.

          - `Type Error`

            The object type, which was always `error` for moderation failures.

            - `const ErrorError Error = "error"`

    - `PreviousResponseID string`

      The unique ID of the previous response to the model. Use this to
      create multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

    - `Prompt BetaResponsePrompt`

      Reference to a prompt template and its variables.
      [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

      - `ID string`

        The unique identifier of the prompt template to use.

      - `Variables map[string, BetaResponsePromptVariableUnion]`

        Optional map of values to substitute in for variables in your
        prompt. The substitution values can either be strings, or other
        Response input types like images or files.

        - `string`

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

        Optional version of the prompt template.

    - `PromptCacheKey string`

      Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

    - `PromptCacheOptions BetaResponsePromptCacheOptions`

      The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

      - `Mode string`

        Whether implicit prompt-cache breakpoints were enabled.

        - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

        - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

      - `Ttl string`

        The minimum lifetime applied to each cache breakpoint.

        - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

    - `PromptCacheRetention BetaResponsePromptCacheRetention`

      Deprecated. Use `prompt_cache_options.ttl` instead.

      The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
      This field expresses a maximum retention policy, while
      `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
      fields are independent and do not interact.
      For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

      For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

      - Organizations without ZDR enabled default to `24h`.
      - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

      - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

      - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

    - `Reasoning BetaResponseReasoning`

      **gpt-5 and o-series models only**

      Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

      - `Context string`

        Controls which reasoning items are rendered back to the model on later turns.
        If omitted or set to `auto`, the model determines the context mode. The
        `gpt-5.6` model family defaults to `all_turns`; earlier models default to
        `current_turn`.

        When returned on a response, this is the effective reasoning context mode
        used for the response.

        - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

        - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

        - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

      - `Effort string`

        Constrains effort on reasoning for reasoning models. Currently supported
        values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
        Reducing reasoning effort can result in faster responses and fewer tokens
        used on reasoning in a response. Not all reasoning models support every
        value. See the
        [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
        for model-specific support.

        - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

        - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

        - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

        - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

        - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

        - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

        - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

      - `GenerateSummary string`

        **Deprecated:** use `summary` instead.

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

        - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

        - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

      - `Mode string`

        Controls the reasoning execution mode for the request.

        When returned on a response, this is the effective execution mode.

        - `string`

        - `string`

          - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

          - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

      - `Summary string`

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

        - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

        - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

        - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

      A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
      The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `ServiceTier BetaResponseServiceTier`

      Specifies the processing type used for serving the request.

      - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
      - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
      - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
      - When not set, the default behavior is 'auto'.

      When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

      - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

      - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

      - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

      - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

      - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

    - `Status BetaResponseStatus`

      The status of the response generation. One of `completed`, `failed`,
      `in_progress`, `cancelled`, `queued`, or `incomplete`.

      - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

      - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

      - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

      - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

      - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

      - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

    - `Text BetaResponseTextConfig`

      Configuration options for a text response from the model. Can be plain
      text or structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

      - `Format BetaResponseFormatTextConfigUnion`

        An object specifying the format that the model must output.

        Configuring `{ "type": "json_schema" }` enables Structured Outputs,
        which ensures the model will match your supplied JSON schema. Learn more in the
        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

        The default format is `{ "type": "text" }` with no additional options.

        **Not recommended for gpt-4o and newer models:**

        Setting to `{ "type": "json_object" }` enables the older JSON mode, which
        ensures the message the model generates is valid JSON. Using `json_schema`
        is preferred for models that support it.

        - `type BetaResponseFormatTextConfigText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            The type of response format being defined. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

          JSON Schema response format. Used to generate structured JSON responses.
          Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

          - `Name string`

            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.

          - `Schema map[string, any]`

            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).

          - `Type JSONSchema`

            The type of response format being defined. Always `json_schema`.

            - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

          - `Description string`

            A description of what the response format is for, used by the model to
            determine how to respond in the format.

          - `Strict bool`

            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).

        - `type BetaResponseFormatTextConfigJSONObject struct{…}`

          JSON object response format. An older method of generating JSON responses.
          Using `json_schema` is recommended for models that support it. Note that the
          model will not generate JSON without a system or user message instructing it
          to do so.

          - `Type JSONObject`

            The type of response format being defined. Always `json_object`.

            - `const JSONObjectJSONObject JSONObject = "json_object"`

      - `Verbosity BetaResponseTextConfigVerbosity`

        Constrains the verbosity of the model's response. Lower values will result in
        more concise responses, while higher values will result in more verbose responses.
        Currently supported values are `low`, `medium`, and `high`. The default is
        `medium`.

        - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

        - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

        - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

    - `TopLogprobs int64`

      An integer between 0 and 20 specifying the maximum number of most likely
      tokens to return at each token position, each with an associated log
      probability. In some cases, the number of returned tokens may be fewer than
      requested.

    - `Truncation BetaResponseTruncation`

      The truncation strategy to use for the model response.

      - `auto`: If the input to this Response exceeds
        the model's context window size, the model will truncate the
        response to fit the context window by dropping items from the beginning of the conversation.
      - `disabled` (default): If the input size will exceed the context window
        size for a model, the request will fail with a 400 error.

      - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

      - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

    - `Usage BetaResponseUsage`

      Represents token usage details including input tokens, output tokens,
      a breakdown of output tokens, and the total tokens used.

      - `InputTokens int64`

        The number of input tokens.

      - `InputTokensDetails BetaResponseUsageInputTokensDetails`

        A detailed breakdown of the input tokens.

        - `CacheWriteTokens int64`

          The number of input tokens that were written to the cache.

        - `CachedTokens int64`

          The number of tokens that were retrieved from the cache.
          [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

      - `OutputTokens int64`

        The number of output tokens.

      - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

        A detailed breakdown of the output tokens.

        - `ReasoningTokens int64`

          The number of reasoning tokens.

      - `TotalTokens int64`

        The total number of tokens used.

    - `User string`

      This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
      A stable identifier for your end-users.
      Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `SequenceNumber int64`

    The sequence number for this event.

  - `Type ResponseQueued`

    The type of the event. Always 'response.queued'.

    - `const ResponseQueuedResponseQueued ResponseQueued = "response.queued"`

  - `Agent BetaResponseQueuedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Reasoning 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](https://platform.openai.com/docs/guides/conversation-state).

  - `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`.

      - `const SummaryTextSummaryText SummaryText = "summary_text"`

  - `Type Reasoning`

    The type of the object. Always `reasoning`.

    - `const ReasoningReasoning Reasoning = "reasoning"`

  - `Agent BetaResponseReasoningItemAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Content []BetaResponseReasoningItemContent`

    Reasoning text content.

    - `Text string`

      The reasoning text from the model.

    - `Type ReasoningText`

      The type of the reasoning text. Always `reasoning_text`.

      - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

  - `EncryptedContent string`

    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.

  - `Status BetaResponseReasoningItemStatus`

    The status of the item. One of `in_progress`, `completed`, or
    `incomplete`. Populated when items are returned via API.

    - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

    - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

    - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

### Beta Response Reasoning Summary Part Added Event

- `type BetaResponseReasoningSummaryPartAddedEvent struct{…}`

  Emitted when a new reasoning summary part is added.

  - `ItemID string`

    The ID of the item this summary part is associated with.

  - `OutputIndex int64`

    The index of the output item this summary part is associated with.

  - `Part BetaResponseReasoningSummaryPartAddedEventPart`

    The summary part that was added.

    - `Text string`

      The text of the summary part.

    - `Type SummaryText`

      The type of the summary part. Always `summary_text`.

      - `const SummaryTextSummaryText SummaryText = "summary_text"`

  - `SequenceNumber int64`

    The sequence number of this event.

  - `SummaryIndex int64`

    The index of the summary part within the reasoning summary.

  - `Type ResponseReasoningSummaryPartAdded`

    The type of the event. Always `response.reasoning_summary_part.added`.

    - `const ResponseReasoningSummaryPartAddedResponseReasoningSummaryPartAdded ResponseReasoningSummaryPartAdded = "response.reasoning_summary_part.added"`

  - `Agent BetaResponseReasoningSummaryPartAddedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Reasoning Summary Part Done Event

- `type BetaResponseReasoningSummaryPartDoneEvent struct{…}`

  Emitted when a reasoning summary part is completed.

  - `ItemID string`

    The ID of the item this summary part is associated with.

  - `OutputIndex int64`

    The index of the output item this summary part is associated with.

  - `Part BetaResponseReasoningSummaryPartDoneEventPart`

    The completed summary part.

    - `Text string`

      The text of the summary part.

    - `Type SummaryText`

      The type of the summary part. Always `summary_text`.

      - `const SummaryTextSummaryText SummaryText = "summary_text"`

  - `SequenceNumber int64`

    The sequence number of this event.

  - `SummaryIndex int64`

    The index of the summary part within the reasoning summary.

  - `Type ResponseReasoningSummaryPartDone`

    The type of the event. Always `response.reasoning_summary_part.done`.

    - `const ResponseReasoningSummaryPartDoneResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDone = "response.reasoning_summary_part.done"`

  - `Agent BetaResponseReasoningSummaryPartDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `Status BetaResponseReasoningSummaryPartDoneEventStatus`

    The completion status of the summary part. Omitted when the part completed
    normally and set to `incomplete` when generation was interrupted.

    - `const BetaResponseReasoningSummaryPartDoneEventStatusIncomplete BetaResponseReasoningSummaryPartDoneEventStatus = "incomplete"`

### Beta Response Reasoning Summary Text Delta Event

- `type BetaResponseReasoningSummaryTextDeltaEvent struct{…}`

  Emitted when a delta is added to a reasoning summary text.

  - `Delta string`

    The text delta that was added to the summary.

  - `ItemID string`

    The ID of the item this summary text delta is associated with.

  - `OutputIndex int64`

    The index of the output item this summary text delta is associated with.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `SummaryIndex int64`

    The index of the summary part within the reasoning summary.

  - `Type ResponseReasoningSummaryTextDelta`

    The type of the event. Always `response.reasoning_summary_text.delta`.

    - `const ResponseReasoningSummaryTextDeltaResponseReasoningSummaryTextDelta ResponseReasoningSummaryTextDelta = "response.reasoning_summary_text.delta"`

  - `Agent BetaResponseReasoningSummaryTextDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Reasoning Summary Text Done Event

- `type BetaResponseReasoningSummaryTextDoneEvent struct{…}`

  Emitted when a reasoning summary text is completed.

  - `ItemID string`

    The ID of the item this summary text is associated with.

  - `OutputIndex int64`

    The index of the output item this summary text is associated with.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `SummaryIndex int64`

    The index of the summary part within the reasoning summary.

  - `Text string`

    The full text of the completed reasoning summary.

  - `Type ResponseReasoningSummaryTextDone`

    The type of the event. Always `response.reasoning_summary_text.done`.

    - `const ResponseReasoningSummaryTextDoneResponseReasoningSummaryTextDone ResponseReasoningSummaryTextDone = "response.reasoning_summary_text.done"`

  - `Agent BetaResponseReasoningSummaryTextDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Reasoning Text Delta Event

- `type BetaResponseReasoningTextDeltaEvent struct{…}`

  Emitted when a delta is added to a reasoning text.

  - `ContentIndex int64`

    The index of the reasoning content part this delta is associated with.

  - `Delta string`

    The text delta that was added to the reasoning content.

  - `ItemID string`

    The ID of the item this reasoning text delta is associated with.

  - `OutputIndex int64`

    The index of the output item this reasoning text delta is associated with.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseReasoningTextDelta`

    The type of the event. Always `response.reasoning_text.delta`.

    - `const ResponseReasoningTextDeltaResponseReasoningTextDelta ResponseReasoningTextDelta = "response.reasoning_text.delta"`

  - `Agent BetaResponseReasoningTextDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Reasoning Text Done Event

- `type BetaResponseReasoningTextDoneEvent struct{…}`

  Emitted when a reasoning text is completed.

  - `ContentIndex int64`

    The index of the reasoning content part.

  - `ItemID string`

    The ID of the item this reasoning text is associated with.

  - `OutputIndex int64`

    The index of the output item this reasoning text is associated with.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Text string`

    The full text of the completed reasoning content.

  - `Type ResponseReasoningTextDone`

    The type of the event. Always `response.reasoning_text.done`.

    - `const ResponseReasoningTextDoneResponseReasoningTextDone ResponseReasoningTextDone = "response.reasoning_text.done"`

  - `Agent BetaResponseReasoningTextDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Refusal Delta Event

- `type BetaResponseRefusalDeltaEvent struct{…}`

  Emitted when there is a partial refusal text.

  - `ContentIndex int64`

    The index of the content part that the refusal text is added to.

  - `Delta string`

    The refusal text that is added.

  - `ItemID string`

    The ID of the output item that the refusal text is added to.

  - `OutputIndex int64`

    The index of the output item that the refusal text is added to.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseRefusalDelta`

    The type of the event. Always `response.refusal.delta`.

    - `const ResponseRefusalDeltaResponseRefusalDelta ResponseRefusalDelta = "response.refusal.delta"`

  - `Agent BetaResponseRefusalDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Refusal Done Event

- `type BetaResponseRefusalDoneEvent struct{…}`

  Emitted when refusal text is finalized.

  - `ContentIndex int64`

    The index of the content part that the refusal text is finalized.

  - `ItemID string`

    The ID of the output item that the refusal text is finalized.

  - `OutputIndex int64`

    The index of the output item that the refusal text is finalized.

  - `Refusal string`

    The refusal text that is finalized.

  - `SequenceNumber int64`

    The sequence number of this event.

  - `Type ResponseRefusalDone`

    The type of the event. Always `response.refusal.done`.

    - `const ResponseRefusalDoneResponseRefusalDone ResponseRefusalDone = "response.refusal.done"`

  - `Agent BetaResponseRefusalDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Status

- `type BetaResponseStatus string`

  The status of the response generation. One of `completed`, `failed`,
  `in_progress`, `cancelled`, `queued`, or `incomplete`.

  - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

  - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

  - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

  - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

  - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

  - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

### Beta Response Stream Event

- `type BetaResponseStreamEventUnion interface{…}`

  Emitted when there is a partial audio response.

  - `type BetaResponseAudioDeltaEvent struct{…}`

    Emitted when there is a partial audio response.

    - `Delta string`

      A chunk of Base64 encoded response audio bytes.

    - `SequenceNumber int64`

      A sequence number for this chunk of the stream response.

    - `Type ResponseAudioDelta`

      The type of the event. Always `response.audio.delta`.

      - `const ResponseAudioDeltaResponseAudioDelta ResponseAudioDelta = "response.audio.delta"`

    - `Agent BetaResponseAudioDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseAudioDoneEvent struct{…}`

    Emitted when the audio response is complete.

    - `SequenceNumber int64`

      The sequence number of the delta.

    - `Type ResponseAudioDone`

      The type of the event. Always `response.audio.done`.

      - `const ResponseAudioDoneResponseAudioDone ResponseAudioDone = "response.audio.done"`

    - `Agent BetaResponseAudioDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseAudioTranscriptDeltaEvent struct{…}`

    Emitted when there is a partial transcript of audio.

    - `Delta string`

      The partial transcript of the audio response.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseAudioTranscriptDelta`

      The type of the event. Always `response.audio.transcript.delta`.

      - `const ResponseAudioTranscriptDeltaResponseAudioTranscriptDelta ResponseAudioTranscriptDelta = "response.audio.transcript.delta"`

    - `Agent BetaResponseAudioTranscriptDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseAudioTranscriptDoneEvent struct{…}`

    Emitted when the full audio transcript is completed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseAudioTranscriptDone`

      The type of the event. Always `response.audio.transcript.done`.

      - `const ResponseAudioTranscriptDoneResponseAudioTranscriptDone ResponseAudioTranscriptDone = "response.audio.transcript.done"`

    - `Agent BetaResponseAudioTranscriptDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallCodeDeltaEvent struct{…}`

    Emitted when a partial code snippet is streamed by the code interpreter.

    - `Delta string`

      The partial code snippet being streamed by the code interpreter.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code is being streamed.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallCodeDelta`

      The type of the event. Always `response.code_interpreter_call_code.delta`.

      - `const ResponseCodeInterpreterCallCodeDeltaResponseCodeInterpreterCallCodeDelta ResponseCodeInterpreterCallCodeDelta = "response.code_interpreter_call_code.delta"`

    - `Agent BetaResponseCodeInterpreterCallCodeDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallCodeDoneEvent struct{…}`

    Emitted when the code snippet is finalized by the code interpreter.

    - `Code string`

      The final code snippet output by the code interpreter.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code is finalized.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallCodeDone`

      The type of the event. Always `response.code_interpreter_call_code.done`.

      - `const ResponseCodeInterpreterCallCodeDoneResponseCodeInterpreterCallCodeDone ResponseCodeInterpreterCallCodeDone = "response.code_interpreter_call_code.done"`

    - `Agent BetaResponseCodeInterpreterCallCodeDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallCompletedEvent struct{…}`

    Emitted when the code interpreter call is completed.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code interpreter call is completed.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallCompleted`

      The type of the event. Always `response.code_interpreter_call.completed`.

      - `const ResponseCodeInterpreterCallCompletedResponseCodeInterpreterCallCompleted ResponseCodeInterpreterCallCompleted = "response.code_interpreter_call.completed"`

    - `Agent BetaResponseCodeInterpreterCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallInProgressEvent struct{…}`

    Emitted when a code interpreter call is in progress.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code interpreter call is in progress.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallInProgress`

      The type of the event. Always `response.code_interpreter_call.in_progress`.

      - `const ResponseCodeInterpreterCallInProgressResponseCodeInterpreterCallInProgress ResponseCodeInterpreterCallInProgress = "response.code_interpreter_call.in_progress"`

    - `Agent BetaResponseCodeInterpreterCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallInterpretingEvent struct{…}`

    Emitted when the code interpreter is actively interpreting the code snippet.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code interpreter is interpreting code.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallInterpreting`

      The type of the event. Always `response.code_interpreter_call.interpreting`.

      - `const ResponseCodeInterpreterCallInterpretingResponseCodeInterpreterCallInterpreting ResponseCodeInterpreterCallInterpreting = "response.code_interpreter_call.interpreting"`

    - `Agent BetaResponseCodeInterpreterCallInterpretingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCompletedEvent struct{…}`

    Emitted when the model response is complete.

    - `Response BetaResponse`

      Properties of the completed response.

      - `ID string`

        Unique identifier for this Response.

      - `CreatedAt float64`

        Unix timestamp (in seconds) of when this Response was created.

      - `Error BetaResponseError`

        An error object returned when the model fails to generate a Response.

        - `Code BetaResponseErrorCode`

          The error code for the response.

          - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

          - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

          - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

          - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

          - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

          - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

          - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

          - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

          - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

          - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

          - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

          - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

          - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

          - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

          - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

          - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

          - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

          - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

          - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

          - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

        - `Message string`

          A human-readable description of the error.

      - `IncompleteDetails BetaResponseIncompleteDetails`

        Details about why the response is incomplete.

        - `Reason string`

          The reason why the response is incomplete.

          - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

          - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

      - `Instructions BetaResponseInstructionsUnion`

        A system (or developer) message inserted into the model's context.

        When using along with `previous_response_id`, the instructions from a previous
        response will not be carried over to the next response. This makes it simple
        to swap out system (or developer) messages in new responses.

        - `string`

        - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

          A list of one or many input items to the model, containing
          different content types.

          - `type BetaEasyInputMessage struct{…}`

            A message input to the model with a role indicating instruction following
            hierarchy. Instructions given with the `developer` or `system` role take
            precedence over instructions given with the `user` role. Messages with the
            `assistant` role are presumed to have been generated by the model in previous
            interactions.

            - `Content BetaEasyInputMessageContentUnion`

              Text, image, or audio input to the model, used to generate a response.
              Can also contain previous assistant responses.

              - `string`

              - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

                A list of one or many input items to the model, containing different content
                types.

                - `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`.

                    - `const InputTextInputText InputText = "input_text"`

                  - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputImage struct{…}`

                  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                  - `Detail BetaResponseInputImageDetail`

                    The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                    - `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`.

                    - `const InputImageInputImage InputImage = "input_image"`

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `ImageURL string`

                    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                  - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputFile struct{…}`

                  A file input to the model.

                  - `Type InputFile`

                    The type of the input item. Always `input_file`.

                    - `const InputFileInputFile InputFile = "input_file"`

                  - `Detail BetaResponseInputFileDetail`

                    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`.

                    - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                    - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                    - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                  - `FileData string`

                    The content of the file to be sent to the model.

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `FileURL string`

                    The URL of the file to be sent to the model.

                  - `Filename string`

                    The name of the file to be sent to the model.

                  - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

            - `Role BetaEasyInputMessageRole`

              The role of the message input. One of `user`, `assistant`, `system`, or
              `developer`.

              - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

              - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

              - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

              - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

            - `Phase BetaEasyInputMessagePhase`

              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.

              - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

              - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

            - `Type BetaEasyInputMessageType`

              The type of the message input. Always `message`.

              - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

          - `type BetaResponseInputItemMessage struct{…}`

            A message input to the model with a role indicating instruction following
            hierarchy. Instructions given with the `developer` or `system` role take
            precedence over instructions given with the `user` role.

            - `Content BetaResponseInputMessageContentList`

              A list of one or many input items to the model, containing different content
              types.

            - `Role string`

              The role of the message input. One of `user`, `system`, or `developer`.

              - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

              - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

              - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

            - `Agent BetaResponseInputItemMessageAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Status string`

              The status of item. One of `in_progress`, `completed`, or
              `incomplete`. Populated when items are returned via API.

              - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

              - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

              - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

            - `Type string`

              The type of the message input. Always set to `message`.

              - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

          - `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.

              - `type BetaResponseOutputText struct{…}`

                A text output from the model.

                - `Annotations []BetaResponseOutputTextAnnotationUnion`

                  The annotations of the text output.

                  - `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`.

                      - `const FileCitationFileCitation FileCitation = "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`.

                      - `const URLCitationURLCitation URLCitation = "url_citation"`

                    - `URL string`

                      The URL of the web resource.

                  - `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`.

                      - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                      - `const FilePathFilePath FilePath = "file_path"`

                - `Text string`

                  The text output from the model.

                - `Type OutputText`

                  The type of the output text. Always `output_text`.

                  - `const OutputTextOutputText OutputText = "output_text"`

                - `Logprobs []BetaResponseOutputTextLogprob`

                  - `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`.

                  - `const RefusalRefusal Refusal = "refusal"`

            - `Role Assistant`

              The role of the output message. Always `assistant`.

              - `const AssistantAssistant Assistant = "assistant"`

            - `Status BetaResponseOutputMessageStatus`

              The status of the message input. One of `in_progress`, `completed`, or
              `incomplete`. Populated when input items are returned via API.

              - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

              - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

              - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

            - `Type Message`

              The type of the output message. Always `message`.

              - `const MessageMessage Message = "message"`

            - `Agent BetaResponseOutputMessageAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Phase BetaResponseOutputMessagePhase`

              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.

              - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

              - `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`.

              - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

            - `Agent BetaResponseFileSearchToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Results []BetaResponseFileSearchToolCallResult`

              The results of the file search tool call.

              - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

                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.

                - `string`

                - `float64`

                - `bool`

              - `FileID string`

                The unique ID of the file.

              - `Filename string`

                The name of the file.

              - `Score float64`

                The relevance score of the file - a value between 0 and 1.

              - `Text string`

                The text that was retrieved from the file.

          - `type BetaResponseComputerToolCall struct{…}`

            A tool call to a computer use tool. See the
            [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

                The type of the pending safety check.

              - `Message string`

                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.

              - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

              - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

              - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

            - `Type BetaResponseComputerToolCallType`

              The type of the computer call. Always `computer_call`.

              - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

            - `Action BetaComputerActionUnion`

              A click action.

              - `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`.

                  - `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`.

                  - `const ClickClick Click = "click"`

                - `X int64`

                  The x-coordinate where the click occurred.

                - `Y int64`

                  The y-coordinate where the click occurred.

                - `Keys []string`

                  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`.

                  - `const DoubleClickDoubleClick DoubleClick = "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`.

                  - `const DragDrag Drag = "drag"`

                - `Keys []string`

                  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`.

                  - `const KeypressKeypress Keypress = "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`.

                  - `const MoveMove Move = "move"`

                - `X int64`

                  The x-coordinate to move to.

                - `Y int64`

                  The y-coordinate to move to.

                - `Keys []string`

                  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`.

                  - `const ScreenshotScreenshot Screenshot = "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`.

                  - `const ScrollScroll Scroll = "scroll"`

                - `X int64`

                  The x-coordinate where the scroll occurred.

                - `Y int64`

                  The y-coordinate where the scroll occurred.

                - `Keys []string`

                  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`.

                  - `const TypeType Type = "type"`

              - `type BetaComputerActionWait struct{…}`

                A wait action.

                - `Type Wait`

                  Specifies the event type. For a wait action, this property is always set to `wait`.

                  - `const WaitWait Wait = "wait"`

            - `Actions BetaComputerActionList`

              Flattened batched actions for `computer_use`. Each action includes an
              `type` discriminator and action-specific fields.

              - `type BetaComputerActionClick struct{…}`

                A click action.

              - `type BetaComputerActionDoubleClick struct{…}`

                A double click action.

              - `type BetaComputerActionDrag struct{…}`

                A drag action.

              - `type BetaComputerActionKeypress struct{…}`

                A collection of keypresses the model would like to perform.

              - `type BetaComputerActionMove struct{…}`

                A mouse move action.

              - `type BetaComputerActionScreenshot struct{…}`

                A screenshot action.

              - `type BetaComputerActionScroll struct{…}`

                A scroll action.

              - `type BetaComputerActionType struct{…}`

                An action to type in text.

              - `type BetaComputerActionWait struct{…}`

                A wait action.

            - `Agent BetaResponseComputerToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemComputerCallOutput struct{…}`

            The output of a computer tool call.

            - `CallID string`

              The ID of the computer tool call that produced the output.

            - `Output BetaResponseComputerToolCallOutputScreenshot`

              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`.

                - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

              - `FileID string`

                The identifier of an uploaded file that contains the screenshot.

              - `ImageURL string`

                The URL of the screenshot image.

            - `Type ComputerCallOutput`

              The type of the computer tool call output. Always `computer_call_output`.

              - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

            - `ID string`

              The ID of the computer tool call output.

            - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

              The safety checks reported by the API that have been acknowledged by the developer.

              - `ID string`

                The ID of the pending safety check.

              - `Code string`

                The type of the pending safety check.

              - `Message string`

                Details about the pending safety check.

            - `Agent BetaResponseInputItemComputerCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Status string`

              The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

              - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

              - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

          - `type BetaResponseFunctionWebSearch struct{…}`

            The results of a web search tool call. See the
            [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

            - `ID string`

              The unique ID of the web search tool call.

            - `Action BetaResponseFunctionWebSearchActionUnion`

              An object describing the specific action taken in this web search call.
              Includes details on how the model used the web (search, open_page, find_in_page).

              - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

                Action type "search" - Performs a web search query.

                - `Type Search`

                  The action type.

                  - `const SearchSearch Search = "search"`

                - `Queries []string`

                  The search queries.

                - `Query string`

                  The search query.

                - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                  The sources used in the search.

                  - `Type URL`

                    The type of source. Always `url`.

                    - `const URLURL URL = "url"`

                  - `URL string`

                    The URL of the source.

              - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

                Action type "open_page" - Opens a specific URL from search results.

                - `Type OpenPage`

                  The action type.

                  - `const OpenPageOpenPage OpenPage = "open_page"`

                - `URL string`

                  The URL opened by the model.

              - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

                Action type "find_in_page": Searches for a pattern within a loaded page.

                - `Pattern string`

                  The pattern or text to search for within the page.

                - `Type FindInPage`

                  The action type.

                  - `const FindInPageFindInPage FindInPage = "find_in_page"`

                - `URL string`

                  The URL of the page searched for the pattern.

            - `Status BetaResponseFunctionWebSearchStatus`

              The status of the web search tool call.

              - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

              - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

              - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

              - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

            - `Type WebSearchCall`

              The type of the web search tool call. Always `web_search_call`.

              - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

            - `Agent BetaResponseFunctionWebSearchAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseFunctionToolCall struct{…}`

            A tool call to run a function. See the
            [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

              - `const FunctionCallFunctionCall FunctionCall = "function_call"`

            - `ID string`

              The unique ID of the function tool call.

            - `Agent BetaResponseFunctionToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseFunctionToolCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

                - `Type Direct`

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  - `const ProgramProgram Program = "program"`

            - `Namespace string`

              The namespace of the function to run.

            - `Status BetaResponseFunctionToolCallStatus`

              The status of the item. One of `in_progress`, `completed`, or
              `incomplete`. Populated when items are returned via API.

              - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

              - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

              - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

          - `type BetaResponseInputItemFunctionCallOutput struct{…}`

            The output of a function tool call.

            - `CallID string`

              The unique ID of the function tool call generated by the model.

            - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

              Text, image, or file output of the function tool call.

              - `string`

              - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

                An array of content outputs (text, image, file) for the function tool call.

                - `type BetaResponseInputTextContent 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`.

                    - `const InputTextInputText InputText = "input_text"`

                  - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputImageContent struct{…}`

                  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                  - `Type InputImage`

                    The type of the input item. Always `input_image`.

                    - `const InputImageInputImage InputImage = "input_image"`

                  - `Detail BetaResponseInputImageContentDetail`

                    The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                    - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                    - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                    - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                    - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `ImageURL string`

                    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                  - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputFileContent struct{…}`

                  A file input to the model.

                  - `Type InputFile`

                    The type of the input item. Always `input_file`.

                    - `const InputFileInputFile InputFile = "input_file"`

                  - `Detail BetaResponseInputFileContentDetail`

                    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`.

                    - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                    - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                    - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                  - `FileData string`

                    The base64-encoded data of the file to be sent to the model.

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `FileURL string`

                    The URL of the file to be sent to the model.

                  - `Filename string`

                    The name of the file to be sent to the model.

                  - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

            - `Type FunctionCallOutput`

              The type of the function tool call output. Always `function_call_output`.

              - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

            - `ID string`

              The unique ID of the function tool call output. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemFunctionCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `Status string`

              The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

              - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

              - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

          - `type BetaResponseInputItemAgentMessage struct{…}`

            A message routed between agents.

            - `Author string`

              The sending agent identity.

            - `Content []BetaResponseInputItemAgentMessageContentUnion`

              Plaintext, image, or encrypted content sent between agents.

              - `type BetaResponseInputTextContent struct{…}`

                A text input to the model.

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                  - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

            - `Recipient string`

              The destination agent identity.

            - `Type AgentMessage`

              The item type. Always `agent_message`.

              - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

            - `ID string`

              The unique ID of this agent message item.

            - `Agent BetaResponseInputItemAgentMessageAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemMultiAgentCall struct{…}`

            - `Action string`

              The multi-agent action that was executed.

              - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

              - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

              - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

              - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

              - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

              - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

            - `Arguments string`

              The action arguments as a JSON string.

            - `CallID string`

              The unique ID linking this call to its output.

            - `Type MultiAgentCall`

              The item type. Always `multi_agent_call`.

              - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

            - `ID string`

              The unique ID of this multi-agent call.

            - `Agent BetaResponseInputItemMultiAgentCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

            - `Action string`

              The multi-agent action that produced this result.

              - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

            - `CallID string`

              The unique ID of the multi-agent call.

            - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

              Text output returned by the multi-agent action.

              - `Text string`

                The text content.

              - `Type OutputText`

                The content type. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

                Citations associated with the text content.

                - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                  - `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 citation type. Always `file_citation`.

                    - `const FileCitationFileCitation FileCitation = "file_citation"`

                - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                  - `EndIndex int64`

                    The index of the last character of the citation in the message.

                  - `StartIndex int64`

                    The index of the first character of the citation in the message.

                  - `Title string`

                    The title of the cited resource.

                  - `Type URLCitation`

                    The citation type. Always `url_citation`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the cited resource.

                - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                  - `ContainerID string`

                    The ID of the container.

                  - `EndIndex int64`

                    The index of the last character of the citation in the message.

                  - `FileID string`

                    The ID of the container file.

                  - `Filename string`

                    The filename of the container file cited.

                  - `StartIndex int64`

                    The index of the first character of the citation in the message.

                  - `Type ContainerFileCitation`

                    The citation type. Always `container_file_citation`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

            - `Type MultiAgentCallOutput`

              The item type. Always `multi_agent_call_output`.

              - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

            - `ID string`

              The unique ID of this multi-agent call output.

            - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemToolSearchCall struct{…}`

            - `Arguments any`

              The arguments supplied to the tool search call.

            - `Type ToolSearchCall`

              The item type. Always `tool_search_call`.

              - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

            - `ID string`

              The unique ID of this tool search call.

            - `Agent BetaResponseInputItemToolSearchCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `CallID string`

              The unique ID of the tool search call generated by the model.

            - `Execution string`

              Whether tool search was executed by the server or by the client.

              - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

              - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

            - `Status string`

              The status of the tool search call.

              - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

              - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

              - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

          - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

            - `Tools []BetaToolUnion`

              The loaded tool definitions returned by the tool search output.

              - `type BetaFunctionTool struct{…}`

                Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

                - `Name string`

                  The name of the function to call.

                - `Parameters map[string, any]`

                  A JSON schema object describing the parameters of the function.

                - `Strict bool`

                  Whether strict parameter validation is enforced for this function tool.

                - `Type Function`

                  The type of the function tool. Always `function`.

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                  - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function is deferred and loaded via tool search.

                - `Description string`

                  A description of the function. Used by the model to determine whether or not to call the function.

                - `OutputSchema map[string, any]`

                  A JSON schema object describing the JSON value encoded in string outputs for this function.

              - `type BetaFileSearchTool struct{…}`

                A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

                - `Type FileSearch`

                  The type of the file search tool. Always `file_search`.

                  - `const FileSearchFileSearch FileSearch = "file_search"`

                - `VectorStoreIDs []string`

                  The IDs of the vector stores to search.

                - `Filters BetaFileSearchToolFiltersUnion`

                  A filter to apply.

                  - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                  - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                    Combine multiple filters using `and` or `or`.

                    - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                      Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                      - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                        A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                        - `Key string`

                          The key to compare against the value.

                        - `Type string`

                          Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                          - `eq`: equals
                          - `ne`: not equal
                          - `gt`: greater than
                          - `gte`: greater than or equal
                          - `lt`: less than
                          - `lte`: less than or equal
                          - `in`: in
                          - `nin`: not in

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                        - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                          The value to compare against the attribute key; supports string, number, or boolean types.

                          - `string`

                          - `float64`

                          - `bool`

                          - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                            - `string`

                            - `float64`

                    - `Type string`

                      Type of operation: `and` or `or`.

                      - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                      - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

                - `MaxNumResults int64`

                  The maximum number of results to return. This number should be between 1 and 50 inclusive.

                - `RankingOptions BetaFileSearchToolRankingOptions`

                  Ranking options for search.

                  - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                    Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                    - `EmbeddingWeight float64`

                      The weight of the embedding in the reciprocal ranking fusion.

                    - `TextWeight float64`

                      The weight of the text in the reciprocal ranking fusion.

                  - `Ranker string`

                    The ranker to use for the file search.

                    - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                    - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                  - `ScoreThreshold float64`

                    The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

              - `type BetaComputerTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

                - `Type Computer`

                  The type of the computer tool. Always `computer`.

                  - `const ComputerComputer Computer = "computer"`

              - `type BetaComputerUsePreviewTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

                - `DisplayHeight int64`

                  The height of the computer display.

                - `DisplayWidth int64`

                  The width of the computer display.

                - `Environment BetaComputerUsePreviewToolEnvironment`

                  The type of computer environment to control.

                  - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                  - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                  - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                  - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                  - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

                - `Type ComputerUsePreview`

                  The type of the computer use tool. Always `computer_use_preview`.

                  - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

              - `type BetaWebSearchTool struct{…}`

                Search the Internet for sources related to the prompt. Learn more about the
                [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

                - `Type BetaWebSearchToolType`

                  The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                  - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                  - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

                - `Filters BetaWebSearchToolFilters`

                  Filters for the search.

                  - `AllowedDomains []string`

                    Allowed domains for the search. If not provided, all domains are allowed.
                    Subdomains of the provided domains are allowed as well.

                    Example: `["pubmed.ncbi.nlm.nih.gov"]`

                - `SearchContextSize BetaWebSearchToolSearchContextSize`

                  High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                  - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                  - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                  - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

                - `UserLocation BetaWebSearchToolUserLocation`

                  The approximate location of the user.

                  - `City string`

                    Free text input for the city of the user, e.g. `San Francisco`.

                  - `Country string`

                    The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                  - `Region string`

                    Free text input for the region of the user, e.g. `California`.

                  - `Timezone string`

                    The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                  - `Type string`

                    The type of location approximation. Always `approximate`.

                    - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

              - `type BetaToolMcp struct{…}`

                Give the model access to additional tools via remote Model Context Protocol
                (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

                - `ServerLabel string`

                  A label for this MCP server, used to identify it in tool calls.

                - `Type Mcp`

                  The type of the MCP tool. Always `mcp`.

                  - `const McpMcp Mcp = "mcp"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                  - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

                - `AllowedTools BetaToolMcpAllowedToolsUnion`

                  List of allowed tool names or a filter object.

                  - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                    A string array of allowed tool names

                  - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `Authorization string`

                  An OAuth access token that can be used with a remote MCP server, either
                  with a custom MCP server URL or a service connector. Your application
                  must handle the OAuth authorization flow and provide the token here.

                - `ConnectorID string`

                  Identifier for service connectors, like those available in ChatGPT. One of
                  `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                  about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                  Currently supported `connector_id` values are:

                  - Dropbox: `connector_dropbox`
                  - Gmail: `connector_gmail`
                  - Google Calendar: `connector_googlecalendar`
                  - Google Drive: `connector_googledrive`
                  - Microsoft Teams: `connector_microsoftteams`
                  - Outlook Calendar: `connector_outlookcalendar`
                  - Outlook Email: `connector_outlookemail`
                  - SharePoint: `connector_sharepoint`

                  - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                  - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                  - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                  - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                  - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                  - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                  - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                  - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

                - `DeferLoading bool`

                  Whether this MCP tool is deferred and discovered via tool search.

                - `Headers map[string, string]`

                  Optional HTTP headers to send to the MCP server. Use for authentication
                  or other purposes.

                - `RequireApproval BetaToolMcpRequireApprovalUnion`

                  Specify which of the MCP server's tools require approval.

                  - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                    Specify which of the MCP server's tools require approval. Can be
                    `always`, `never`, or a filter object associated with tools
                    that require approval.

                    - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                      A filter object to specify which tools are allowed.

                      - `ReadOnly bool`

                        Indicates whether or not a tool modifies data or is read-only. If an
                        MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                        it will match this filter.

                      - `ToolNames []string`

                        List of allowed tool names.

                    - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                      A filter object to specify which tools are allowed.

                      - `ReadOnly bool`

                        Indicates whether or not a tool modifies data or is read-only. If an
                        MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                        it will match this filter.

                      - `ToolNames []string`

                        List of allowed tool names.

                  - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                    Specify a single approval policy for all tools. One of `always` or
                    `never`. When set to `always`, all tools will require approval. When
                    set to `never`, all tools will not require approval.

                    - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                    - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

                - `ServerDescription string`

                  Optional description of the MCP server, used to provide more context.

                - `ServerURL string`

                  The URL for the MCP server. One of `server_url`, `connector_id`, or
                  `tunnel_id` must be provided.

                - `TunnelID string`

                  The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                  `server_url`, `connector_id`, or `tunnel_id` must be provided.

              - `type BetaToolCodeInterpreter struct{…}`

                A tool that runs Python code to help generate a response to a prompt.

                - `Container BetaToolCodeInterpreterContainerUnion`

                  The code interpreter container. Can be a container ID or an object that
                  specifies uploaded file IDs to make available to your code, along with an
                  optional `memory_limit` setting.

                  - `string`

                  - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                    Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                    - `Type Auto`

                      Always `auto`.

                      - `const AutoAuto Auto = "auto"`

                    - `FileIDs []string`

                      An optional list of uploaded files to make available to your code.

                    - `MemoryLimit string`

                      The memory limit for the code interpreter container.

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                    - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                      Network access policy for the container.

                      - `type BetaContainerNetworkPolicyDisabled struct{…}`

                        - `Type Disabled`

                          Disable outbound network access. Always `disabled`.

                          - `const DisabledDisabled Disabled = "disabled"`

                      - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                        - `AllowedDomains []string`

                          A list of allowed domains when type is `allowlist`.

                        - `Type Allowlist`

                          Allow outbound network access only to specified domains. Always `allowlist`.

                          - `const AllowlistAllowlist Allowlist = "allowlist"`

                        - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                          Optional domain-scoped secrets for allowlisted domains.

                          - `Domain string`

                            The domain associated with the secret.

                          - `Name string`

                            The name of the secret to inject for the domain.

                          - `Value string`

                            The secret value to inject for the domain.

                - `Type CodeInterpreter`

                  The type of the code interpreter tool. Always `code_interpreter`.

                  - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                  - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

              - `type BetaToolProgrammaticToolCalling struct{…}`

                - `Type ProgrammaticToolCalling`

                  The type of the tool. Always `programmatic_tool_calling`.

                  - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

              - `type BetaToolImageGeneration struct{…}`

                A tool that generates images using the GPT image models.

                - `Type ImageGeneration`

                  The type of the image generation tool. Always `image_generation`.

                  - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

                - `Action string`

                  Whether to generate a new image or edit an existing image. Default: `auto`.

                  - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                  - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                  - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

                - `Background string`

                  Allows to set transparency for the background of the generated image(s).
                  This parameter is only supported for GPT image models that support
                  transparent backgrounds. Must be one of `transparent`, `opaque`, or
                  `auto` (default value). When `auto` is used, the model will
                  automatically determine the best background for the image.

                  `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                  transparent backgrounds. Requests with `background` set to
                  `transparent` will return an error for these models; use `opaque` or
                  `auto` instead.

                  If `transparent`, the output format needs to support transparency,
                  so it should be set to either `png` (default value) or `webp`.

                  - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                  - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                  - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

                - `InputFidelity string`

                  Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                  - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                  - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

                - `InputImageMask BetaToolImageGenerationInputImageMask`

                  Optional mask for inpainting. Contains `image_url`
                  (string, optional) and `file_id` (string, optional).

                  - `FileID string`

                    File ID for the mask image.

                  - `ImageURL string`

                    Base64-encoded mask image.

                - `Model string`

                  The image generation model to use. Default: `gpt-image-1`.

                  - `string`

                  - `string`

                    - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                    - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                    - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                    - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                    - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                    - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

                - `Moderation string`

                  Moderation level for the generated image. Default: `auto`.

                  - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                  - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

                - `OutputCompression int64`

                  Compression level for the output image. Default: 100.

                - `OutputFormat string`

                  The output format of the generated image. One of `png`, `webp`, or
                  `jpeg`. Default: `png`.

                  - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                  - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                  - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

                - `PartialImages int64`

                  Number of partial images to generate in streaming mode, from 0 (default value) to 3.

                - `Quality string`

                  The quality of the generated image. One of `low`, `medium`, `high`,
                  or `auto`. Default: `auto`.

                  - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                  - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                  - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                  - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

                - `Size string`

                  The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                  - `string`

                  - `string`

                    - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                    - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                    - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                    - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

              - `type BetaToolLocalShell struct{…}`

                A tool that allows the model to execute shell commands in a local environment.

                - `Type LocalShell`

                  The type of the local shell tool. Always `local_shell`.

                  - `const LocalShellLocalShell LocalShell = "local_shell"`

              - `type BetaFunctionShellTool struct{…}`

                A tool that allows the model to execute shell commands.

                - `Type Shell`

                  The type of the shell tool. Always `shell`.

                  - `const ShellShell Shell = "shell"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                  - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

                - `Environment BetaFunctionShellToolEnvironmentUnion`

                  - `type BetaContainerAuto struct{…}`

                    - `Type ContainerAuto`

                      Automatically creates a container for this request

                      - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                    - `FileIDs []string`

                      An optional list of uploaded files to make available to your code.

                    - `MemoryLimit BetaContainerAutoMemoryLimit`

                      The memory limit for the container.

                      - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                      - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                      - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                      - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                    - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                      Network access policy for the container.

                      - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `Skills []BetaContainerAutoSkillUnion`

                      An optional list of skills referenced by id or inline data.

                      - `type BetaSkillReference struct{…}`

                        - `SkillID string`

                          The ID of the referenced skill.

                        - `Type SkillReference`

                          References a skill created with the /v1/skills endpoint.

                          - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                        - `Version string`

                          Optional skill version. Use a positive integer or 'latest'. Omit for default.

                      - `type BetaInlineSkill struct{…}`

                        - `Description string`

                          The description of the skill.

                        - `Name string`

                          The name of the skill.

                        - `Source BetaInlineSkillSource`

                          Inline skill payload

                          - `Data string`

                            Base64-encoded skill zip bundle.

                          - `MediaType ApplicationZip`

                            The media type of the inline skill payload. Must be `application/zip`.

                            - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                          - `Type Base64`

                            The type of the inline skill source. Must be `base64`.

                            - `const Base64Base64 Base64 = "base64"`

                        - `Type Inline`

                          Defines an inline skill for this request.

                          - `const InlineInline Inline = "inline"`

                  - `type BetaLocalEnvironment struct{…}`

                    - `Type Local`

                      Use a local computer environment.

                      - `const LocalLocal Local = "local"`

                    - `Skills []BetaLocalSkill`

                      An optional list of skills.

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Path string`

                        The path to the directory containing the skill.

                  - `type BetaContainerReference struct{…}`

                    - `ContainerID string`

                      The ID of the referenced container.

                    - `Type ContainerReference`

                      References a container created with the /v1/containers endpoint

                      - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

                - `Name string`

                  The name of the custom tool, used to identify it in tool calls.

                - `Type Custom`

                  The type of the custom tool. Always `custom`.

                  - `const CustomCustom Custom = "custom"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                  - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this tool should be deferred and discovered via tool search.

                - `Description string`

                  Optional description of the custom tool, used to provide more context.

                - `Format BetaCustomToolFormatUnion`

                  The input format for the custom tool. Default is unconstrained text.

                  - `type BetaCustomToolFormatText struct{…}`

                    Unconstrained free-form text.

                    - `Type Text`

                      Unconstrained text format. Always `text`.

                      - `const TextText Text = "text"`

                  - `type BetaCustomToolFormatGrammar struct{…}`

                    A grammar defined by the user.

                    - `Definition string`

                      The grammar definition.

                    - `Syntax string`

                      The syntax of the grammar definition. One of `lark` or `regex`.

                      - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                      - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                    - `Type Grammar`

                      Grammar format. Always `grammar`.

                      - `const GrammarGrammar Grammar = "grammar"`

              - `type BetaNamespaceTool struct{…}`

                Groups function/custom tools under a shared namespace.

                - `Description string`

                  A description of the namespace shown to the model.

                - `Name string`

                  The namespace name used in tool calls (for example, `crm`).

                - `Tools []BetaNamespaceToolToolUnion`

                  The function/custom tools available inside this namespace.

                  - `type BetaNamespaceToolToolFunction struct{…}`

                    - `Name string`

                    - `Type Function`

                      - `const FunctionFunction Function = "function"`

                    - `AllowedCallers []string`

                      The tool invocation context(s).

                      - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                      - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                    - `DeferLoading bool`

                      Whether this function should be deferred and discovered via tool search.

                    - `Description string`

                    - `OutputSchema map[string, any]`

                      A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                    - `Parameters any`

                    - `Strict bool`

                      Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                  - `type BetaCustomTool struct{…}`

                    A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

                - `Type Namespace`

                  The type of the tool. Always `namespace`.

                  - `const NamespaceNamespace Namespace = "namespace"`

              - `type BetaToolSearchTool struct{…}`

                Hosted or BYOT tool search configuration for deferred tools.

                - `Type ToolSearch`

                  The type of the tool. Always `tool_search`.

                  - `const ToolSearchToolSearch ToolSearch = "tool_search"`

                - `Description string`

                  Description shown to the model for a client-executed tool search tool.

                - `Execution BetaToolSearchToolExecution`

                  Whether tool search is executed by the server or by the client.

                  - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                  - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

                - `Parameters any`

                  Parameter schema for a client-executed tool search tool.

              - `type BetaWebSearchPreviewTool struct{…}`

                This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

                - `Type BetaWebSearchPreviewToolType`

                  The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                  - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                  - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

                - `SearchContentTypes []string`

                  - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                  - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

                - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                  High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                  - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                  - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                  - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

                - `UserLocation BetaWebSearchPreviewToolUserLocation`

                  The user's location.

                  - `Type Approximate`

                    The type of location approximation. Always `approximate`.

                    - `const ApproximateApproximate Approximate = "approximate"`

                  - `City string`

                    Free text input for the city of the user, e.g. `San Francisco`.

                  - `Country string`

                    The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                  - `Region string`

                    Free text input for the region of the user, e.g. `California`.

                  - `Timezone string`

                    The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `type BetaApplyPatchTool struct{…}`

                Allows the assistant to create, delete, or update files using unified diffs.

                - `Type ApplyPatch`

                  The type of the tool. Always `apply_patch`.

                  - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                  - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

            - `Type ToolSearchOutput`

              The item type. Always `tool_search_output`.

              - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

            - `ID string`

              The unique ID of this tool search output.

            - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `CallID string`

              The unique ID of the tool search call generated by the model.

            - `Execution BetaResponseToolSearchOutputItemParamExecution`

              Whether tool search was executed by the server or by the client.

              - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

              - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

            - `Status BetaResponseToolSearchOutputItemParamStatus`

              The status of the tool search output.

              - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

              - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

              - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

          - `type BetaResponseInputItemAdditionalTools struct{…}`

            - `Role Developer`

              The role that provided the additional tools. Only `developer` is supported.

              - `const DeveloperDeveloper Developer = "developer"`

            - `Tools []BetaToolUnion`

              A list of additional tools made available at this item.

              - `type BetaFunctionTool struct{…}`

                Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `type BetaFileSearchTool struct{…}`

                A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `type BetaComputerTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `type BetaComputerUsePreviewTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `type BetaWebSearchTool struct{…}`

                Search the Internet for sources related to the prompt. Learn more about the
                [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `type BetaToolMcp struct{…}`

                Give the model access to additional tools via remote Model Context Protocol
                (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `type BetaToolCodeInterpreter struct{…}`

                A tool that runs Python code to help generate a response to a prompt.

              - `type BetaToolProgrammaticToolCalling struct{…}`

              - `type BetaToolImageGeneration struct{…}`

                A tool that generates images using the GPT image models.

              - `type BetaToolLocalShell struct{…}`

                A tool that allows the model to execute shell commands in a local environment.

              - `type BetaFunctionShellTool struct{…}`

                A tool that allows the model to execute shell commands.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `type BetaNamespaceTool struct{…}`

                Groups function/custom tools under a shared namespace.

              - `type BetaToolSearchTool struct{…}`

                Hosted or BYOT tool search configuration for deferred tools.

              - `type BetaWebSearchPreviewTool struct{…}`

                This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `type BetaApplyPatchTool struct{…}`

                Allows the assistant to create, delete, or update files using unified diffs.

            - `Type AdditionalTools`

              The item type. Always `additional_tools`.

              - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

            - `ID string`

              The unique ID of this additional tools item.

            - `Agent BetaResponseInputItemAdditionalToolsAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

            - `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`.

                - `const SummaryTextSummaryText SummaryText = "summary_text"`

            - `Type Reasoning`

              The type of the object. Always `reasoning`.

              - `const ReasoningReasoning Reasoning = "reasoning"`

            - `Agent BetaResponseReasoningItemAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Content []BetaResponseReasoningItemContent`

              Reasoning text content.

              - `Text string`

                The reasoning text from the model.

              - `Type ReasoningText`

                The type of the reasoning text. Always `reasoning_text`.

                - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

            - `EncryptedContent string`

              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.

            - `Status BetaResponseReasoningItemStatus`

              The status of the item. One of `in_progress`, `completed`, or
              `incomplete`. Populated when items are returned via API.

              - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

              - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

              - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

          - `type BetaResponseCompactionItemParamResp struct{…}`

            A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

            - `EncryptedContent string`

              The encrypted content of the compaction summary.

            - `Type Compaction`

              The type of the item. Always `compaction`.

              - `const CompactionCompaction Compaction = "compaction"`

            - `ID string`

              The ID of the compaction item.

            - `Agent BetaResponseCompactionItemParamAgentResp`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemImageGenerationCall struct{…}`

            An image generation request made by the model.

            - `ID string`

              The unique ID of the image generation call.

            - `Result string`

              The generated image encoded in base64.

            - `Status string`

              The status of the image generation call.

              - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

              - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

              - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

              - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

            - `Type ImageGenerationCall`

              The type of the image generation call. Always `image_generation_call`.

              - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

            - `Agent BetaResponseInputItemImageGenerationCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseCodeInterpreterToolCall struct{…}`

            A tool call to run code.

            - `ID string`

              The unique ID of the code interpreter tool call.

            - `Code string`

              The code to run, or null if not available.

            - `ContainerID string`

              The ID of the container used to run the code.

            - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

              The outputs generated by the code interpreter, such as logs or images.
              Can be null if no outputs are available.

              - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

                The logs output from the code interpreter.

                - `Logs string`

                  The logs output from the code interpreter.

                - `Type Logs`

                  The type of the output. Always `logs`.

                  - `const LogsLogs Logs = "logs"`

              - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

                The image output from the code interpreter.

                - `Type Image`

                  The type of the output. Always `image`.

                  - `const ImageImage Image = "image"`

                - `URL string`

                  The URL of the image output from the code interpreter.

            - `Status BetaResponseCodeInterpreterToolCallStatus`

              The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

              - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

              - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

              - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

              - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

              - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

            - `Type CodeInterpreterCall`

              The type of the code interpreter tool call. Always `code_interpreter_call`.

              - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

            - `Agent BetaResponseCodeInterpreterToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemLocalShellCall struct{…}`

            A tool call to run a command on the local shell.

            - `ID string`

              The unique ID of the local shell call.

            - `Action BetaResponseInputItemLocalShellCallAction`

              Execute a shell command on the server.

              - `Command []string`

                The command to run.

              - `Env map[string, string]`

                Environment variables to set for the command.

              - `Type Exec`

                The type of the local shell action. Always `exec`.

                - `const ExecExec Exec = "exec"`

              - `TimeoutMs int64`

                Optional timeout in milliseconds for the command.

              - `User string`

                Optional user to run the command as.

              - `WorkingDirectory string`

                Optional working directory to run the command in.

            - `CallID string`

              The unique ID of the local shell tool call generated by the model.

            - `Status string`

              The status of the local shell call.

              - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

              - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

              - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

            - `Type LocalShellCall`

              The type of the local shell call. Always `local_shell_call`.

              - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

            - `Agent BetaResponseInputItemLocalShellCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

            The output of a local shell tool call.

            - `ID string`

              The unique ID of the local shell tool call generated by the model.

            - `Output string`

              A JSON string of the output of the local shell tool call.

            - `Type LocalShellCallOutput`

              The type of the local shell tool call output. Always `local_shell_call_output`.

              - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

            - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Status string`

              The status of the item. One of `in_progress`, `completed`, or `incomplete`.

              - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

              - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

          - `type BetaResponseInputItemShellCall struct{…}`

            A tool representing a request to execute one or more shell commands.

            - `Action BetaResponseInputItemShellCallAction`

              The shell commands and limits that describe how to run the tool call.

              - `Commands []string`

                Ordered shell commands for the execution environment to run.

              - `MaxOutputLength int64`

                Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

              - `TimeoutMs int64`

                Maximum wall-clock time in milliseconds to allow the shell commands to run.

            - `CallID string`

              The unique ID of the shell tool call generated by the model.

            - `Type ShellCall`

              The type of the item. Always `shell_call`.

              - `const ShellCallShellCall ShellCall = "shell_call"`

            - `ID string`

              The unique ID of the shell tool call. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemShellCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemShellCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

              The environment to execute the shell commands in.

              - `type BetaLocalEnvironment struct{…}`

              - `type BetaContainerReference struct{…}`

            - `Status string`

              The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

              - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

              - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

              - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

          - `type BetaResponseInputItemShellCallOutput struct{…}`

            The streamed output items emitted by a shell tool call.

            - `CallID string`

              The unique ID of the shell tool call generated by the model.

            - `Output []BetaResponseFunctionShellCallOutputContent`

              Captured chunks of stdout and stderr output, along with their associated outcomes.

              - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

                The exit or timeout outcome associated with this shell call.

                - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                  Indicates that the shell call exceeded its configured time limit.

                  - `Type Timeout`

                    The outcome type. Always `timeout`.

                    - `const TimeoutTimeout Timeout = "timeout"`

                - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                  Indicates that the shell commands finished and returned an exit code.

                  - `ExitCode int64`

                    The exit code returned by the shell process.

                  - `Type Exit`

                    The outcome type. Always `exit`.

                    - `const ExitExit Exit = "exit"`

              - `Stderr string`

                Captured stderr output for the shell call.

              - `Stdout string`

                Captured stdout output for the shell call.

            - `Type ShellCallOutput`

              The type of the item. Always `shell_call_output`.

              - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

            - `ID string`

              The unique ID of the shell tool call output. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemShellCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `MaxOutputLength int64`

              The maximum number of UTF-8 characters captured for this shell call's combined output.

            - `Status string`

              The status of the shell call output.

              - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

              - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

          - `type BetaResponseInputItemApplyPatchCall struct{…}`

            A tool call representing a request to create, delete, or update files using diff patches.

            - `CallID string`

              The unique ID of the apply patch tool call generated by the model.

            - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

              The specific create, delete, or update instruction for the apply_patch tool call.

              - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

                Instruction for creating a new file via the apply_patch tool.

                - `Diff string`

                  Unified diff content to apply when creating the file.

                - `Path string`

                  Path of the file to create relative to the workspace root.

                - `Type CreateFile`

                  The operation type. Always `create_file`.

                  - `const CreateFileCreateFile CreateFile = "create_file"`

              - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

                Instruction for deleting an existing file via the apply_patch tool.

                - `Path string`

                  Path of the file to delete relative to the workspace root.

                - `Type DeleteFile`

                  The operation type. Always `delete_file`.

                  - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

              - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

                Instruction for updating an existing file via the apply_patch tool.

                - `Diff string`

                  Unified diff content to apply to the existing file.

                - `Path string`

                  Path of the file to update relative to the workspace root.

                - `Type UpdateFile`

                  The operation type. Always `update_file`.

                  - `const UpdateFileUpdateFile UpdateFile = "update_file"`

            - `Status string`

              The status of the apply patch tool call. One of `in_progress` or `completed`.

              - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

              - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

            - `Type ApplyPatchCall`

              The type of the item. Always `apply_patch_call`.

              - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

            - `ID string`

              The unique ID of the apply patch tool call. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemApplyPatchCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

          - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

            The streamed output emitted by an apply patch tool call.

            - `CallID string`

              The unique ID of the apply patch tool call generated by the model.

            - `Status string`

              The status of the apply patch tool call output. One of `completed` or `failed`.

              - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

              - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

            - `Type ApplyPatchCallOutput`

              The type of the item. Always `apply_patch_call_output`.

              - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

            - `ID string`

              The unique ID of the apply patch tool call output. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `Output string`

              Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

          - `type BetaResponseInputItemMcpListTools struct{…}`

            A list of tools available on an MCP server.

            - `ID string`

              The unique ID of the list.

            - `ServerLabel string`

              The label of the MCP server.

            - `Tools []BetaResponseInputItemMcpListToolsTool`

              The tools available on the server.

              - `InputSchema any`

                The JSON schema describing the tool's input.

              - `Name string`

                The name of the tool.

              - `Annotations any`

                Additional annotations about the tool.

              - `Description string`

                The description of the tool.

            - `Type McpListTools`

              The type of the item. Always `mcp_list_tools`.

              - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

            - `Agent BetaResponseInputItemMcpListToolsAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Error string`

              Error message if the server could not list tools.

          - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

            A request for human approval of a tool invocation.

            - `ID string`

              The unique ID of the approval request.

            - `Arguments string`

              A JSON string of arguments for the tool.

            - `Name string`

              The name of the tool to run.

            - `ServerLabel string`

              The label of the MCP server making the request.

            - `Type McpApprovalRequest`

              The type of the item. Always `mcp_approval_request`.

              - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

            - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

            A response to an MCP approval request.

            - `ApprovalRequestID string`

              The ID of the approval request being answered.

            - `Approve bool`

              Whether the request was approved.

            - `Type McpApprovalResponse`

              The type of the item. Always `mcp_approval_response`.

              - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

            - `ID string`

              The unique ID of the approval response

            - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Reason string`

              Optional reason for the decision.

          - `type BetaResponseInputItemMcpCall struct{…}`

            An invocation of a tool on an MCP server.

            - `ID string`

              The unique ID of the tool call.

            - `Arguments string`

              A JSON string of the arguments passed to the tool.

            - `Name string`

              The name of the tool that was run.

            - `ServerLabel string`

              The label of the MCP server running the tool.

            - `Type McpCall`

              The type of the item. Always `mcp_call`.

              - `const McpCallMcpCall McpCall = "mcp_call"`

            - `Agent BetaResponseInputItemMcpCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `ApprovalRequestID string`

              Unique identifier for the MCP tool call approval request.
              Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

            - `Error string`

              The error from the tool call, if any.

            - `Output string`

              The output from the tool call.

            - `Status string`

              The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

              - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

              - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

              - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

              - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

              - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

          - `type BetaResponseCustomToolCallOutput struct{…}`

            The output of a custom tool call from your code, being sent back to the model.

            - `CallID string`

              The call ID, used to map this custom tool call output to a custom tool call.

            - `Output BetaResponseCustomToolCallOutputOutputUnion`

              The output from the custom tool call generated by your code.
              Can be a string or an list of output content.

              - `string`

              - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

                Text, image, or file output of the custom tool call.

                - `type BetaResponseInputText struct{…}`

                  A text input to the model.

                - `type BetaResponseInputImage struct{…}`

                  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `type BetaResponseInputFile struct{…}`

                  A file input to the model.

            - `Type CustomToolCallOutput`

              The type of the custom tool call output. Always `custom_tool_call_output`.

              - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

            - `ID string`

              The unique ID of the custom tool call output in the OpenAI platform.

            - `Agent BetaResponseCustomToolCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseCustomToolCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

          - `type BetaResponseCustomToolCall struct{…}`

            A call to a custom tool created by the model.

            - `CallID string`

              An identifier used to map this custom tool call to a tool call output.

            - `Input string`

              The input for the custom tool call generated by the model.

            - `Name string`

              The name of the custom tool being called.

            - `Type CustomToolCall`

              The type of the custom tool call. Always `custom_tool_call`.

              - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

            - `ID string`

              The unique ID of the custom tool call in the OpenAI platform.

            - `Agent BetaResponseCustomToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseCustomToolCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseCustomToolCallCallerDirect struct{…}`

                - `Type Direct`

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseCustomToolCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  - `const ProgramProgram Program = "program"`

            - `Namespace string`

              The namespace of the custom tool being called.

          - `type BetaResponseInputItemCompactionTrigger struct{…}`

            Compacts the current context. Must be the final input item.

            - `Type CompactionTrigger`

              The type of the item. Always `compaction_trigger`.

              - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

            - `Agent BetaResponseInputItemCompactionTriggerAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemItemReference struct{…}`

            An internal identifier for an item to reference.

            - `ID string`

              The ID of the item to reference.

            - `Agent BetaResponseInputItemItemReferenceAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Type string`

              The type of item to reference. Always `item_reference`.

              - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

          - `type BetaResponseInputItemProgram struct{…}`

            - `ID string`

              The unique ID of this program item.

            - `CallID string`

              The stable call ID of the program item.

            - `Code string`

              The JavaScript source executed by programmatic tool calling.

            - `Fingerprint string`

              Opaque program replay fingerprint that must be round-tripped.

            - `Type Program`

              The item type. Always `program`.

              - `const ProgramProgram Program = "program"`

            - `Agent BetaResponseInputItemProgramAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemProgramOutput struct{…}`

            - `ID string`

              The unique ID of this program output item.

            - `CallID string`

              The call ID of the program item.

            - `Result string`

              The result produced by the program item.

            - `Status string`

              The terminal status of the program output.

              - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

              - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

            - `Type ProgramOutput`

              The item type. Always `program_output`.

              - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

            - `Agent BetaResponseInputItemProgramOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

      - `Metadata map[string, string]`

        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.

      - `Model BetaResponseModel`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `type BetaResponseModel string`

          Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
          offers a wide range of models with different capabilities, performance
          characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
          to browse and compare available models.

          - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

          - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

          - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

          - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

          - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

          - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

          - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

          - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

          - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

          - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

          - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

          - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

          - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

          - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

          - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

          - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

          - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

          - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

          - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

          - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

          - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

          - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

          - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

          - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

          - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

          - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

          - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

          - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

          - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

          - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

          - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

          - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

          - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

          - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

          - `const BetaResponseModelO3 BetaResponseModel = "o3"`

          - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

          - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

          - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

          - `const BetaResponseModelO1 BetaResponseModel = "o1"`

          - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

          - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

          - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

          - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

          - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

          - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

          - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

          - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

          - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

          - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

          - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

          - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

          - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

          - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

          - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

          - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

          - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

          - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

          - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

          - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

          - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

          - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

          - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

          - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

          - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

          - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

          - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

          - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

          - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

          - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

          - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

          - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

          - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

          - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

          - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

          - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

          - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

          - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

          - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

          - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

          - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

          - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

          - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

          - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

          - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

          - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

          - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

          - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

          - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

          - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

          - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

          - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

          - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

          - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

          - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

          - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

        - `string`

      - `Object Response`

        The object type of this resource - always set to `response`.

        - `const ResponseResponse Response = "response"`

      - `Output []BetaResponseOutputItemUnion`

        An array of content items generated by the model.

        - The length and order of items in the `output` array is dependent
          on the model's response.
        - Rather than accessing the first item in the `output` array and
          assuming it's an `assistant` message with the content generated by
          the model, you might consider using the `output_text` property where
          supported in SDKs.

        - `type BetaResponseOutputMessage struct{…}`

          An output message from the model.

        - `type BetaResponseFileSearchToolCall struct{…}`

          The results of a file search tool call. See the
          [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

        - `type BetaResponseFunctionToolCallOutputItem struct{…}`

          - `ID string`

            The unique ID of the function call tool output.

          - `CallID string`

            The unique ID of the function tool call generated by the model.

          - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

            The output from the function call generated by your code.
            Can be a string or an list of output content.

            - `string`

            - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

              Text, image, or file output of the function call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Status BetaResponseFunctionToolCallOutputItemStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `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`.

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `Agent BetaResponseFunctionToolCallOutputItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `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.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

            - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

              A text content.

              - `Text string`

              - `Type Text`

                - `const TextText Text = "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`.

                - `const SummaryTextSummaryText SummaryText = "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`.

                - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

            - `type BetaResponseOutputRefusal struct{…}`

              A refusal from the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `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`.

                - `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.

              - `Type ComputerScreenshot`

                Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

                - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

              - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

            - `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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The type of the item. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `Agent BetaResponseOutputItemAgentMessageAgent`

            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.

            - `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`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `Agent BetaResponseOutputItemMultiAgentCallAgent`

            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.

            - `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.

          - `Output []BetaResponseOutputText`

            Text output returned by the multi-agent action.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

            - `Logprobs []BetaResponseOutputTextLogprob`

          - `Type MultiAgentCallOutput`

            The type of the multi-agent result. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

        - `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.

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            A computer screenshot image used with the computer use tool.

          - `Status BetaResponseComputerToolCallOutputItemStatus`

            The status of the message input. One of `in_progress`, `completed`, or
            `incomplete`. Populated when input items are returned via API.

            - `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`.

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

            The safety checks reported by the API that have been acknowledged by the
            developer.

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseComputerToolCallOutputItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            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](https://platform.openai.com/docs/guides/conversation-state).

        - `type BetaResponseOutputItemProgram struct{…}`

          - `ID string`

            The unique ID of the program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The type of the item. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseOutputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseOutputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of the program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output item.

            - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

            - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The type of the item. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseOutputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseToolSearchCall struct{…}`

          - `ID string`

            The unique ID of the tool search call item.

          - `Arguments any`

            Arguments used for the tool search call.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution BetaResponseToolSearchCallExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

            - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

          - `Status BetaResponseToolSearchCallStatus`

            The status of the tool search call item that was recorded.

            - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

            - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

            - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

          - `Type ToolSearchCall`

            The type of the item. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `Agent BetaResponseToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseToolSearchOutputItem struct{…}`

          - `ID string`

            The unique ID of the tool search output item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution BetaResponseToolSearchOutputItemExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

            - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemStatus`

            The status of the tool search output item that was recorded.

            - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by tool search.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ToolSearchOutput`

            The type of the item. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `Agent BetaResponseToolSearchOutputItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseOutputItemAdditionalTools struct{…}`

          - `ID string`

            The unique ID of the additional tools item.

          - `Role string`

            The role that provided the additional tools.

            - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

            - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

            - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

            - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

            - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

            - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

            - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

            - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

          - `Tools []BetaToolUnion`

            The additional tool definitions made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The type of the item. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `Agent BetaResponseOutputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCompactionItem struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `ID string`

            The unique ID of the compaction item.

          - `EncryptedContent string`

            The encrypted content that was produced by compaction.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `Agent BetaResponseCompactionItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseOutputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseOutputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

        - `type BetaResponseOutputItemLocalShellCall struct{…}`

          A tool call to run a command on the local shell.

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseOutputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseOutputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionShellToolCall struct{…}`

          A tool call that executes one or more shell commands in a managed environment.

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Action BetaResponseFunctionShellToolCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

            - `MaxOutputLength int64`

              Optional maximum number of characters to return from each command.

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the commands.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

            Represents the use of a local environment to perform shell actions.

            - `type BetaResponseLocalEnvironment struct{…}`

              Represents the use of a local environment to perform shell actions.

              - `Type Local`

                The environment type. Always `local`.

                - `const LocalLocal Local = "local"`

            - `type BetaResponseContainerReference struct{…}`

              Represents a container created with /v1/containers.

              - `ContainerID string`

              - `Type ContainerReference`

                The environment type. Always `container_reference`.

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `Status BetaResponseFunctionShellToolCallStatus`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

            - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `Agent BetaResponseFunctionShellToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionShellToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The ID of the entity that created this tool call.

        - `type BetaResponseFunctionShellToolCallOutput struct{…}`

          The output of a shell tool call that was emitted.

          - `ID string`

            The unique ID of the shell call output. Populated when this item is returned via API.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `MaxOutputLength int64`

            The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

          - `Output []BetaResponseFunctionShellToolCallOutputOutput`

            An array of shell call output contents

            - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

              Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

              - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  Exit code from the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              The standard error output that was captured.

            - `Stdout string`

              The standard output that was captured.

            - `CreatedBy string`

              The identifier of the actor that created the item.

          - `Status BetaResponseFunctionShellToolCallOutputStatus`

            The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

            - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

            - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

          - `Type ShellCallOutput`

            The type of the shell call output. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `Agent BetaResponseFunctionShellToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseApplyPatchToolCall struct{…}`

          A tool call that applies file diffs by creating, deleting, or updating files.

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseApplyPatchToolCallOperationUnion`

            One of the create_file, delete_file, or update_file operations applied via apply_patch.

            - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

              Instruction describing how to create a file via the apply_patch tool.

              - `Diff string`

                Diff to apply.

              - `Path string`

                Path of the file to create.

              - `Type CreateFile`

                Create a new file with the provided diff.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

              Instruction describing how to delete a file via the apply_patch tool.

              - `Path string`

                Path of the file to delete.

              - `Type DeleteFile`

                Delete the specified file.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

              Instruction describing how to update a file via the apply_patch tool.

              - `Diff string`

                Diff to apply.

              - `Path string`

                Path of the file to update.

              - `Type UpdateFile`

                Update an existing file with the provided diff.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status BetaResponseApplyPatchToolCallStatus`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

            - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `Agent BetaResponseApplyPatchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseApplyPatchToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The ID of the entity that created this tool call.

        - `type BetaResponseApplyPatchToolCallOutput struct{…}`

          The output emitted by an apply patch tool call.

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status BetaResponseApplyPatchToolCallOutputStatus`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

            - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `Agent BetaResponseApplyPatchToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The ID of the entity that created this tool call output.

          - `Output string`

            Optional textual output returned by the apply patch tool.

        - `type BetaResponseOutputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseOutputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

            - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

            - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

        - `type BetaResponseOutputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseOutputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseOutputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ID string`

            The unique ID of the approval response

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `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.

          - `ID string`

            The unique ID of the custom tool call output item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

            - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

            - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

          - `CreatedBy string`

            The identifier of the actor that created the item.

      - `ParallelToolCalls bool`

        Whether to allow the model to run tool calls in parallel.

      - `Temperature float64`

        What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        We generally recommend altering this or `top_p` but not both.

      - `ToolChoice BetaResponseToolChoiceUnion`

        How the model should select which tool (or tools) to use when generating
        a response. See the `tools` parameter to see how to specify which tools
        the model can call.

        - `type BetaToolChoiceOptions string`

          Controls which (if any) tool is called by the model.

          `none` means the model will not call any tool and instead generates a message.

          `auto` means the model can pick between generating a message or calling one or
          more tools.

          `required` means the model must call one or more tools.

          - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

          - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

          - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

        - `type BetaToolChoiceAllowed struct{…}`

          Constrains the tools available to the model to a pre-defined set.

          - `Mode BetaToolChoiceAllowedMode`

            Constrains the tools available to the model to a pre-defined set.

            `auto` allows the model to pick from among the allowed tools and generate a
            message.

            `required` requires the model to call one or more of the allowed tools.

            - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

            - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

          - `Tools []map[string, any]`

            A list of tool definitions that the model should be allowed to call.

            For the Responses API, the list of tool definitions might look like:

            ```json
            [
              { "type": "function", "name": "get_weather" },
              { "type": "mcp", "server_label": "deepwiki" },
              { "type": "image_generation" }
            ]
            ```

          - `Type AllowedTools`

            Allowed tool configuration type. Always `allowed_tools`.

            - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

        - `type BetaToolChoiceTypes struct{…}`

          Indicates that the model should use a built-in tool to generate a response.
          [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

          - `Type BetaToolChoiceTypesType`

            The type of hosted tool the model should to use. Learn more about
            [built-in tools](https://platform.openai.com/docs/guides/tools).

            Allowed values are:

            - `file_search`
            - `web_search_preview`
            - `computer`
            - `computer_use_preview`
            - `computer_use`
            - `code_interpreter`
            - `image_generation`

            - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

            - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

            - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

            - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

            - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

            - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

            - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

            - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

        - `type BetaToolChoiceFunction struct{…}`

          Use this option to force the model to call a specific function.

          - `Name string`

            The name of the function to call.

          - `Type Function`

            For function calling, the type is always `function`.

            - `const FunctionFunction Function = "function"`

        - `type BetaToolChoiceMcp struct{…}`

          Use this option to force the model to call a specific tool on a remote MCP server.

          - `ServerLabel string`

            The label of the MCP server to use.

          - `Type Mcp`

            For MCP tools, the type is always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `Name string`

            The name of the tool to call on the server.

        - `type BetaToolChoiceCustom struct{…}`

          Use this option to force the model to call a specific custom tool.

          - `Name string`

            The name of the custom tool to call.

          - `Type Custom`

            For custom tool calling, the type is always `custom`.

            - `const CustomCustom Custom = "custom"`

        - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

          - `Type ProgrammaticToolCalling`

            The tool to call. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolChoiceApplyPatch struct{…}`

          Forces the model to call the apply_patch tool when executing a tool call.

          - `Type ApplyPatch`

            The tool to call. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

        - `type BetaToolChoiceShell struct{…}`

          Forces the model to call the shell tool when a tool call is required.

          - `Type Shell`

            The tool to call. Always `shell`.

            - `const ShellShell Shell = "shell"`

      - `Tools []BetaToolUnion`

        An array of tools the model may call while generating a response. You
        can specify which tool to use by setting the `tool_choice` parameter.

        We support the following categories of tools:

        - **Built-in tools**: Tools that are provided by OpenAI that extend the
          model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
          or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).
        - **MCP Tools**: Integrations with third-party systems via custom MCP servers
          or predefined connectors such as Google Drive and SharePoint. Learn more about
          [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
        - **Function calls (custom tools)**: Functions that are defined by you,
          enabling the model to call your own code with strongly typed arguments
          and outputs. Learn more about
          [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
          custom tools to call your own code.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `TopP float64`

        An alternative to sampling with temperature, called nucleus sampling,
        where the model considers the results of the tokens with top_p probability
        mass. So 0.1 means only the tokens comprising the top 10% probability mass
        are considered.

        We generally recommend altering this or `temperature` but not both.

      - `Background bool`

        Whether to run the model response in the background.
        [Learn more](https://platform.openai.com/docs/guides/background).

      - `CompletedAt float64`

        Unix timestamp (in seconds) of when this Response was completed.
        Only present when the status is `completed`.

      - `Conversation BetaResponseConversation`

        The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

        - `ID string`

          The unique ID of the conversation that this response was associated with.

      - `MaxOutputTokens int64`

        An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

      - `MaxToolCalls int64`

        The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

      - `Moderation BetaResponseModeration`

        Moderation results for the response input and output, if moderated completions were requested.

        - `Input BetaResponseModerationInputUnion`

          Moderation for the response input.

          - `type BetaResponseModerationInputModerationResult struct{…}`

            A moderation result produced for the response input or output.

            - `Categories map[string, bool]`

              A dictionary of moderation categories to booleans, True if the input is flagged under this category.

            - `CategoryAppliedInputTypes map[string, []string]`

              Which modalities of input are reflected by the score for each category.

              - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

              - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

            - `CategoryScores map[string, float64]`

              A dictionary of moderation categories to scores.

            - `Flagged bool`

              A boolean indicating whether the content was flagged by any category.

            - `Model string`

              The moderation model that produced this result.

            - `Type ModerationResult`

              The object type, which was always `moderation_result` for successful moderation results.

              - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

          - `type BetaResponseModerationInputError struct{…}`

            An error produced while attempting moderation for the response input or output.

            - `Code string`

              The error code.

            - `Message string`

              The error message.

            - `Type Error`

              The object type, which was always `error` for moderation failures.

              - `const ErrorError Error = "error"`

        - `Output BetaResponseModerationOutputUnion`

          Moderation for the response output.

          - `type BetaResponseModerationOutputModerationResult struct{…}`

            A moderation result produced for the response input or output.

            - `Categories map[string, bool]`

              A dictionary of moderation categories to booleans, True if the input is flagged under this category.

            - `CategoryAppliedInputTypes map[string, []string]`

              Which modalities of input are reflected by the score for each category.

              - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

              - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

            - `CategoryScores map[string, float64]`

              A dictionary of moderation categories to scores.

            - `Flagged bool`

              A boolean indicating whether the content was flagged by any category.

            - `Model string`

              The moderation model that produced this result.

            - `Type ModerationResult`

              The object type, which was always `moderation_result` for successful moderation results.

              - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

          - `type BetaResponseModerationOutputError struct{…}`

            An error produced while attempting moderation for the response input or output.

            - `Code string`

              The error code.

            - `Message string`

              The error message.

            - `Type Error`

              The object type, which was always `error` for moderation failures.

              - `const ErrorError Error = "error"`

      - `PreviousResponseID string`

        The unique ID of the previous response to the model. Use this to
        create multi-turn conversations. Learn more about
        [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

      - `Prompt BetaResponsePrompt`

        Reference to a prompt template and its variables.
        [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

        - `ID string`

          The unique identifier of the prompt template to use.

        - `Variables map[string, BetaResponsePromptVariableUnion]`

          Optional map of values to substitute in for variables in your
          prompt. The substitution values can either be strings, or other
          Response input types like images or files.

          - `string`

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

        - `Version string`

          Optional version of the prompt template.

      - `PromptCacheKey string`

        Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

      - `PromptCacheOptions BetaResponsePromptCacheOptions`

        The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

        - `Mode string`

          Whether implicit prompt-cache breakpoints were enabled.

          - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

          - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

        - `Ttl string`

          The minimum lifetime applied to each cache breakpoint.

          - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

      - `PromptCacheRetention BetaResponsePromptCacheRetention`

        Deprecated. Use `prompt_cache_options.ttl` instead.

        The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
        This field expresses a maximum retention policy, while
        `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
        fields are independent and do not interact.
        For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

        For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

        - Organizations without ZDR enabled default to `24h`.
        - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

        - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

        - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

      - `Reasoning BetaResponseReasoning`

        **gpt-5 and o-series models only**

        Configuration options for
        [reasoning models](https://platform.openai.com/docs/guides/reasoning).

        - `Context string`

          Controls which reasoning items are rendered back to the model on later turns.
          If omitted or set to `auto`, the model determines the context mode. The
          `gpt-5.6` model family defaults to `all_turns`; earlier models default to
          `current_turn`.

          When returned on a response, this is the effective reasoning context mode
          used for the response.

          - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

          - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

          - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

        - `Effort string`

          Constrains effort on reasoning for reasoning models. Currently supported
          values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
          Reducing reasoning effort can result in faster responses and fewer tokens
          used on reasoning in a response. Not all reasoning models support every
          value. See the
          [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
          for model-specific support.

          - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

          - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

          - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

          - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

          - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

          - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

          - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

        - `GenerateSummary string`

          **Deprecated:** use `summary` instead.

          A summary of the reasoning performed by the model. This can be
          useful for debugging and understanding the model's reasoning process.
          One of `auto`, `concise`, or `detailed`.

          - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

          - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

          - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

        - `Mode string`

          Controls the reasoning execution mode for the request.

          When returned on a response, this is the effective execution mode.

          - `string`

          - `string`

            - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

            - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

        - `Summary string`

          A summary of the reasoning performed by the model. This can be
          useful for debugging and understanding the model's reasoning process.
          One of `auto`, `concise`, or `detailed`.

          `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

          - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

          - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

          - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

      - `SafetyIdentifier string`

        A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
        The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

      - `ServiceTier BetaResponseServiceTier`

        Specifies the processing type used for serving the request.

        - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
        - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
        - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
        - When not set, the default behavior is 'auto'.

        When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

        - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

        - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

        - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

        - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

        - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

      - `Status BetaResponseStatus`

        The status of the response generation. One of `completed`, `failed`,
        `in_progress`, `cancelled`, `queued`, or `incomplete`.

        - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

        - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

        - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

        - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

        - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

        - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

      - `Text BetaResponseTextConfig`

        Configuration options for a text response from the model. Can be plain
        text or structured JSON data. Learn more:

        - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
        - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

        - `Format BetaResponseFormatTextConfigUnion`

          An object specifying the format that the model must output.

          Configuring `{ "type": "json_schema" }` enables Structured Outputs,
          which ensures the model will match your supplied JSON schema. Learn more in the
          [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

          The default format is `{ "type": "text" }` with no additional options.

          **Not recommended for gpt-4o and newer models:**

          Setting to `{ "type": "json_object" }` enables the older JSON mode, which
          ensures the message the model generates is valid JSON. Using `json_schema`
          is preferred for models that support it.

          - `type BetaResponseFormatTextConfigText struct{…}`

            Default response format. Used to generate text responses.

            - `Type Text`

              The type of response format being defined. Always `text`.

              - `const TextText Text = "text"`

          - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

            JSON Schema response format. Used to generate structured JSON responses.
            Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

            - `Name string`

              The name of the response format. Must be a-z, A-Z, 0-9, or contain
              underscores and dashes, with a maximum length of 64.

            - `Schema map[string, any]`

              The schema for the response format, described as a JSON Schema object.
              Learn how to build JSON schemas [here](https://json-schema.org/).

            - `Type JSONSchema`

              The type of response format being defined. Always `json_schema`.

              - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

            - `Description string`

              A description of what the response format is for, used by the model to
              determine how to respond in the format.

            - `Strict bool`

              Whether to enable strict schema adherence when generating the output.
              If set to true, the model will always follow the exact schema defined
              in the `schema` field. Only a subset of JSON Schema is supported when
              `strict` is `true`. To learn more, read the [Structured Outputs
              guide](https://platform.openai.com/docs/guides/structured-outputs).

          - `type BetaResponseFormatTextConfigJSONObject struct{…}`

            JSON object response format. An older method of generating JSON responses.
            Using `json_schema` is recommended for models that support it. Note that the
            model will not generate JSON without a system or user message instructing it
            to do so.

            - `Type JSONObject`

              The type of response format being defined. Always `json_object`.

              - `const JSONObjectJSONObject JSONObject = "json_object"`

        - `Verbosity BetaResponseTextConfigVerbosity`

          Constrains the verbosity of the model's response. Lower values will result in
          more concise responses, while higher values will result in more verbose responses.
          Currently supported values are `low`, `medium`, and `high`. The default is
          `medium`.

          - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

          - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

          - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

      - `TopLogprobs int64`

        An integer between 0 and 20 specifying the maximum number of most likely
        tokens to return at each token position, each with an associated log
        probability. In some cases, the number of returned tokens may be fewer than
        requested.

      - `Truncation BetaResponseTruncation`

        The truncation strategy to use for the model response.

        - `auto`: If the input to this Response exceeds
          the model's context window size, the model will truncate the
          response to fit the context window by dropping items from the beginning of the conversation.
        - `disabled` (default): If the input size will exceed the context window
          size for a model, the request will fail with a 400 error.

        - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

        - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

      - `Usage BetaResponseUsage`

        Represents token usage details including input tokens, output tokens,
        a breakdown of output tokens, and the total tokens used.

        - `InputTokens int64`

          The number of input tokens.

        - `InputTokensDetails BetaResponseUsageInputTokensDetails`

          A detailed breakdown of the input tokens.

          - `CacheWriteTokens int64`

            The number of input tokens that were written to the cache.

          - `CachedTokens int64`

            The number of tokens that were retrieved from the cache.
            [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

        - `OutputTokens int64`

          The number of output tokens.

        - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

          A detailed breakdown of the output tokens.

          - `ReasoningTokens int64`

            The number of reasoning tokens.

        - `TotalTokens int64`

          The total number of tokens used.

      - `User string`

        This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
        A stable identifier for your end-users.
        Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseCompleted`

      The type of the event. Always `response.completed`.

      - `const ResponseCompletedResponseCompleted ResponseCompleted = "response.completed"`

    - `Agent BetaResponseCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseContentPartAddedEvent struct{…}`

    Emitted when a new content part is added.

    - `ContentIndex int64`

      The index of the content part that was added.

    - `ItemID string`

      The ID of the output item that the content part was added to.

    - `OutputIndex int64`

      The index of the output item that the content part was added to.

    - `Part BetaResponseContentPartAddedEventPartUnion`

      The content part that was added.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

      - `type BetaResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type BetaResponseContentPartAddedEventPartReasoningText 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`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseContentPartAdded`

      The type of the event. Always `response.content_part.added`.

      - `const ResponseContentPartAddedResponseContentPartAdded ResponseContentPartAdded = "response.content_part.added"`

    - `Agent BetaResponseContentPartAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseContentPartDoneEvent struct{…}`

    Emitted when a content part is done.

    - `ContentIndex int64`

      The index of the content part that is done.

    - `ItemID string`

      The ID of the output item that the content part was added to.

    - `OutputIndex int64`

      The index of the output item that the content part was added to.

    - `Part BetaResponseContentPartDoneEventPartUnion`

      The content part that is done.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

      - `type BetaResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type BetaResponseContentPartDoneEventPartReasoningText 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`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseContentPartDone`

      The type of the event. Always `response.content_part.done`.

      - `const ResponseContentPartDoneResponseContentPartDone ResponseContentPartDone = "response.content_part.done"`

    - `Agent BetaResponseContentPartDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCreatedEvent struct{…}`

    An event that is emitted when a response is created.

    - `Response BetaResponse`

      The response that was created.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseCreated`

      The type of the event. Always `response.created`.

      - `const ResponseCreatedResponseCreated ResponseCreated = "response.created"`

    - `Agent BetaResponseCreatedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseErrorEvent struct{…}`

    Emitted when an error occurs.

    - `Code string`

      The error code.

    - `Message string`

      The error message.

    - `Param string`

      The error parameter.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type Error`

      The type of the event. Always `error`.

      - `const ErrorError Error = "error"`

    - `Agent BetaResponseErrorEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFileSearchCallCompletedEvent struct{…}`

    Emitted when a file search call is completed (results found).

    - `ItemID string`

      The ID of the output item that the file search call is initiated.

    - `OutputIndex int64`

      The index of the output item that the file search call is initiated.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFileSearchCallCompleted`

      The type of the event. Always `response.file_search_call.completed`.

      - `const ResponseFileSearchCallCompletedResponseFileSearchCallCompleted ResponseFileSearchCallCompleted = "response.file_search_call.completed"`

    - `Agent BetaResponseFileSearchCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFileSearchCallInProgressEvent struct{…}`

    Emitted when a file search call is initiated.

    - `ItemID string`

      The ID of the output item that the file search call is initiated.

    - `OutputIndex int64`

      The index of the output item that the file search call is initiated.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFileSearchCallInProgress`

      The type of the event. Always `response.file_search_call.in_progress`.

      - `const ResponseFileSearchCallInProgressResponseFileSearchCallInProgress ResponseFileSearchCallInProgress = "response.file_search_call.in_progress"`

    - `Agent BetaResponseFileSearchCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFileSearchCallSearchingEvent struct{…}`

    Emitted when a file search is currently searching.

    - `ItemID string`

      The ID of the output item that the file search call is initiated.

    - `OutputIndex int64`

      The index of the output item that the file search call is searching.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFileSearchCallSearching`

      The type of the event. Always `response.file_search_call.searching`.

      - `const ResponseFileSearchCallSearchingResponseFileSearchCallSearching ResponseFileSearchCallSearching = "response.file_search_call.searching"`

    - `Agent BetaResponseFileSearchCallSearchingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionCallArgumentsDeltaEvent struct{…}`

    Emitted when there is a partial function-call arguments delta.

    - `Delta string`

      The function-call arguments delta that is added.

    - `ItemID string`

      The ID of the output item that the function-call arguments delta is added to.

    - `OutputIndex int64`

      The index of the output item that the function-call arguments delta is added to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFunctionCallArgumentsDelta`

      The type of the event. Always `response.function_call_arguments.delta`.

      - `const ResponseFunctionCallArgumentsDeltaResponseFunctionCallArgumentsDelta ResponseFunctionCallArgumentsDelta = "response.function_call_arguments.delta"`

    - `Agent BetaResponseFunctionCallArgumentsDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionCallArgumentsDoneEvent struct{…}`

    Emitted when function-call arguments are finalized.

    - `Arguments string`

      The function-call arguments.

    - `ItemID string`

      The ID of the item.

    - `Name string`

      The name of the function that was called.

    - `OutputIndex int64`

      The index of the output item.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFunctionCallArgumentsDone`

      - `const ResponseFunctionCallArgumentsDoneResponseFunctionCallArgumentsDone ResponseFunctionCallArgumentsDone = "response.function_call_arguments.done"`

    - `Agent BetaResponseFunctionCallArgumentsDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInProgressEvent struct{…}`

    Emitted when the response is in progress.

    - `Response BetaResponse`

      The response that is in progress.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseInProgress`

      The type of the event. Always `response.in_progress`.

      - `const ResponseInProgressResponseInProgress ResponseInProgress = "response.in_progress"`

    - `Agent BetaResponseInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFailedEvent struct{…}`

    An event that is emitted when a response fails.

    - `Response BetaResponse`

      The response that failed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFailed`

      The type of the event. Always `response.failed`.

      - `const ResponseFailedResponseFailed ResponseFailed = "response.failed"`

    - `Agent BetaResponseFailedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseIncompleteEvent struct{…}`

    An event that is emitted when a response finishes as incomplete.

    - `Response BetaResponse`

      The response that was incomplete.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseIncomplete`

      The type of the event. Always `response.incomplete`.

      - `const ResponseIncompleteResponseIncomplete ResponseIncomplete = "response.incomplete"`

    - `Agent BetaResponseIncompleteEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemAddedEvent struct{…}`

    Emitted when a new output item is added.

    - `Item BetaResponseOutputItemUnion`

      The output item that was added.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

      - `type BetaResponseOutputItemAgentMessage struct{…}`

      - `type BetaResponseOutputItemMultiAgentCall struct{…}`

      - `type BetaResponseOutputItemMultiAgentCallOutput struct{…}`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `type BetaResponseComputerToolCallOutputItem struct{…}`

      - `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](https://platform.openai.com/docs/guides/conversation-state).

      - `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](https://platform.openai.com/docs/api-reference/responses/compact).

      - `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.

    - `OutputIndex int64`

      The index of the output item that was added.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseOutputItemAdded`

      The type of the event. Always `response.output_item.added`.

      - `const ResponseOutputItemAddedResponseOutputItemAdded ResponseOutputItemAdded = "response.output_item.added"`

    - `Agent BetaResponseOutputItemAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemDoneEvent struct{…}`

    Emitted when an output item is marked done.

    - `Item BetaResponseOutputItemUnion`

      The output item that was marked done.

    - `OutputIndex int64`

      The index of the output item that was marked done.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseOutputItemDone`

      The type of the event. Always `response.output_item.done`.

      - `const ResponseOutputItemDoneResponseOutputItemDone ResponseOutputItemDone = "response.output_item.done"`

    - `Agent BetaResponseOutputItemDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningSummaryPartAddedEvent struct{…}`

    Emitted when a new reasoning summary part is added.

    - `ItemID string`

      The ID of the item this summary part is associated with.

    - `OutputIndex int64`

      The index of the output item this summary part is associated with.

    - `Part BetaResponseReasoningSummaryPartAddedEventPart`

      The summary part that was added.

      - `Text string`

        The text of the summary part.

      - `Type SummaryText`

        The type of the summary part. Always `summary_text`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Type ResponseReasoningSummaryPartAdded`

      The type of the event. Always `response.reasoning_summary_part.added`.

      - `const ResponseReasoningSummaryPartAddedResponseReasoningSummaryPartAdded ResponseReasoningSummaryPartAdded = "response.reasoning_summary_part.added"`

    - `Agent BetaResponseReasoningSummaryPartAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningSummaryPartDoneEvent struct{…}`

    Emitted when a reasoning summary part is completed.

    - `ItemID string`

      The ID of the item this summary part is associated with.

    - `OutputIndex int64`

      The index of the output item this summary part is associated with.

    - `Part BetaResponseReasoningSummaryPartDoneEventPart`

      The completed summary part.

      - `Text string`

        The text of the summary part.

      - `Type SummaryText`

        The type of the summary part. Always `summary_text`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Type ResponseReasoningSummaryPartDone`

      The type of the event. Always `response.reasoning_summary_part.done`.

      - `const ResponseReasoningSummaryPartDoneResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDone = "response.reasoning_summary_part.done"`

    - `Agent BetaResponseReasoningSummaryPartDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status BetaResponseReasoningSummaryPartDoneEventStatus`

      The completion status of the summary part. Omitted when the part completed
      normally and set to `incomplete` when generation was interrupted.

      - `const BetaResponseReasoningSummaryPartDoneEventStatusIncomplete BetaResponseReasoningSummaryPartDoneEventStatus = "incomplete"`

  - `type BetaResponseReasoningSummaryTextDeltaEvent struct{…}`

    Emitted when a delta is added to a reasoning summary text.

    - `Delta string`

      The text delta that was added to the summary.

    - `ItemID string`

      The ID of the item this summary text delta is associated with.

    - `OutputIndex int64`

      The index of the output item this summary text delta is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Type ResponseReasoningSummaryTextDelta`

      The type of the event. Always `response.reasoning_summary_text.delta`.

      - `const ResponseReasoningSummaryTextDeltaResponseReasoningSummaryTextDelta ResponseReasoningSummaryTextDelta = "response.reasoning_summary_text.delta"`

    - `Agent BetaResponseReasoningSummaryTextDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningSummaryTextDoneEvent struct{…}`

    Emitted when a reasoning summary text is completed.

    - `ItemID string`

      The ID of the item this summary text is associated with.

    - `OutputIndex int64`

      The index of the output item this summary text is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Text string`

      The full text of the completed reasoning summary.

    - `Type ResponseReasoningSummaryTextDone`

      The type of the event. Always `response.reasoning_summary_text.done`.

      - `const ResponseReasoningSummaryTextDoneResponseReasoningSummaryTextDone ResponseReasoningSummaryTextDone = "response.reasoning_summary_text.done"`

    - `Agent BetaResponseReasoningSummaryTextDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningTextDeltaEvent struct{…}`

    Emitted when a delta is added to a reasoning text.

    - `ContentIndex int64`

      The index of the reasoning content part this delta is associated with.

    - `Delta string`

      The text delta that was added to the reasoning content.

    - `ItemID string`

      The ID of the item this reasoning text delta is associated with.

    - `OutputIndex int64`

      The index of the output item this reasoning text delta is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseReasoningTextDelta`

      The type of the event. Always `response.reasoning_text.delta`.

      - `const ResponseReasoningTextDeltaResponseReasoningTextDelta ResponseReasoningTextDelta = "response.reasoning_text.delta"`

    - `Agent BetaResponseReasoningTextDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningTextDoneEvent struct{…}`

    Emitted when a reasoning text is completed.

    - `ContentIndex int64`

      The index of the reasoning content part.

    - `ItemID string`

      The ID of the item this reasoning text is associated with.

    - `OutputIndex int64`

      The index of the output item this reasoning text is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Text string`

      The full text of the completed reasoning content.

    - `Type ResponseReasoningTextDone`

      The type of the event. Always `response.reasoning_text.done`.

      - `const ResponseReasoningTextDoneResponseReasoningTextDone ResponseReasoningTextDone = "response.reasoning_text.done"`

    - `Agent BetaResponseReasoningTextDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseRefusalDeltaEvent struct{…}`

    Emitted when there is a partial refusal text.

    - `ContentIndex int64`

      The index of the content part that the refusal text is added to.

    - `Delta string`

      The refusal text that is added.

    - `ItemID string`

      The ID of the output item that the refusal text is added to.

    - `OutputIndex int64`

      The index of the output item that the refusal text is added to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseRefusalDelta`

      The type of the event. Always `response.refusal.delta`.

      - `const ResponseRefusalDeltaResponseRefusalDelta ResponseRefusalDelta = "response.refusal.delta"`

    - `Agent BetaResponseRefusalDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseRefusalDoneEvent struct{…}`

    Emitted when refusal text is finalized.

    - `ContentIndex int64`

      The index of the content part that the refusal text is finalized.

    - `ItemID string`

      The ID of the output item that the refusal text is finalized.

    - `OutputIndex int64`

      The index of the output item that the refusal text is finalized.

    - `Refusal string`

      The refusal text that is finalized.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseRefusalDone`

      The type of the event. Always `response.refusal.done`.

      - `const ResponseRefusalDoneResponseRefusalDone ResponseRefusalDone = "response.refusal.done"`

    - `Agent BetaResponseRefusalDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseTextDeltaEvent struct{…}`

    Emitted when there is an additional text delta.

    - `ContentIndex int64`

      The index of the content part that the text delta was added to.

    - `Delta string`

      The text delta that was added.

    - `ItemID string`

      The ID of the output item that the text delta was added to.

    - `Logprobs []BetaResponseTextDeltaEventLogprob`

      The log probabilities of the tokens in the delta.

      - `Token string`

        A possible text token.

      - `Logprob float64`

        The log probability of this token.

      - `TopLogprobs []BetaResponseTextDeltaEventLogprobTopLogprob`

        The log probabilities of up to 20 of the most likely tokens.

        - `Token string`

          A possible text token.

        - `Logprob float64`

          The log probability of this token.

    - `OutputIndex int64`

      The index of the output item that the text delta was added to.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseOutputTextDelta`

      The type of the event. Always `response.output_text.delta`.

      - `const ResponseOutputTextDeltaResponseOutputTextDelta ResponseOutputTextDelta = "response.output_text.delta"`

    - `Agent BetaResponseTextDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseTextDoneEvent struct{…}`

    Emitted when text content is finalized.

    - `ContentIndex int64`

      The index of the content part that the text content is finalized.

    - `ItemID string`

      The ID of the output item that the text content is finalized.

    - `Logprobs []BetaResponseTextDoneEventLogprob`

      The log probabilities of the tokens in the delta.

      - `Token string`

        A possible text token.

      - `Logprob float64`

        The log probability of this token.

      - `TopLogprobs []BetaResponseTextDoneEventLogprobTopLogprob`

        The log probabilities of up to 20 of the most likely tokens.

        - `Token string`

          A possible text token.

        - `Logprob float64`

          The log probability of this token.

    - `OutputIndex int64`

      The index of the output item that the text content is finalized.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Text string`

      The text content that is finalized.

    - `Type ResponseOutputTextDone`

      The type of the event. Always `response.output_text.done`.

      - `const ResponseOutputTextDoneResponseOutputTextDone ResponseOutputTextDone = "response.output_text.done"`

    - `Agent BetaResponseTextDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseWebSearchCallCompletedEvent struct{…}`

    Emitted when a web search call is completed.

    - `ItemID string`

      Unique ID for the output item associated with the web search call.

    - `OutputIndex int64`

      The index of the output item that the web search call is associated with.

    - `SequenceNumber int64`

      The sequence number of the web search call being processed.

    - `Type ResponseWebSearchCallCompleted`

      The type of the event. Always `response.web_search_call.completed`.

      - `const ResponseWebSearchCallCompletedResponseWebSearchCallCompleted ResponseWebSearchCallCompleted = "response.web_search_call.completed"`

    - `Agent BetaResponseWebSearchCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseWebSearchCallInProgressEvent struct{…}`

    Emitted when a web search call is initiated.

    - `ItemID string`

      Unique ID for the output item associated with the web search call.

    - `OutputIndex int64`

      The index of the output item that the web search call is associated with.

    - `SequenceNumber int64`

      The sequence number of the web search call being processed.

    - `Type ResponseWebSearchCallInProgress`

      The type of the event. Always `response.web_search_call.in_progress`.

      - `const ResponseWebSearchCallInProgressResponseWebSearchCallInProgress ResponseWebSearchCallInProgress = "response.web_search_call.in_progress"`

    - `Agent BetaResponseWebSearchCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseWebSearchCallSearchingEvent struct{…}`

    Emitted when a web search call is executing.

    - `ItemID string`

      Unique ID for the output item associated with the web search call.

    - `OutputIndex int64`

      The index of the output item that the web search call is associated with.

    - `SequenceNumber int64`

      The sequence number of the web search call being processed.

    - `Type ResponseWebSearchCallSearching`

      The type of the event. Always `response.web_search_call.searching`.

      - `const ResponseWebSearchCallSearchingResponseWebSearchCallSearching ResponseWebSearchCallSearching = "response.web_search_call.searching"`

    - `Agent BetaResponseWebSearchCallSearchingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallCompletedEvent struct{…}`

    Emitted when an image generation tool call has completed and the final image is available.

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseImageGenerationCallCompleted`

      The type of the event. Always 'response.image_generation_call.completed'.

      - `const ResponseImageGenerationCallCompletedResponseImageGenerationCallCompleted ResponseImageGenerationCallCompleted = "response.image_generation_call.completed"`

    - `Agent BetaResponseImageGenCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallGeneratingEvent struct{…}`

    Emitted when an image generation tool call is actively generating an image (intermediate state).

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of the image generation item being processed.

    - `Type ResponseImageGenerationCallGenerating`

      The type of the event. Always 'response.image_generation_call.generating'.

      - `const ResponseImageGenerationCallGeneratingResponseImageGenerationCallGenerating ResponseImageGenerationCallGenerating = "response.image_generation_call.generating"`

    - `Agent BetaResponseImageGenCallGeneratingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallInProgressEvent struct{…}`

    Emitted when an image generation tool call is in progress.

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of the image generation item being processed.

    - `Type ResponseImageGenerationCallInProgress`

      The type of the event. Always 'response.image_generation_call.in_progress'.

      - `const ResponseImageGenerationCallInProgressResponseImageGenerationCallInProgress ResponseImageGenerationCallInProgress = "response.image_generation_call.in_progress"`

    - `Agent BetaResponseImageGenCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallPartialImageEvent struct{…}`

    Emitted when a partial image is available during image generation streaming.

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `PartialImageB64 string`

      Base64-encoded partial image data, suitable for rendering as an image.

    - `PartialImageIndex int64`

      0-based index for the partial image (backend is 1-based, but this is 0-based for the user).

    - `SequenceNumber int64`

      The sequence number of the image generation item being processed.

    - `Type ResponseImageGenerationCallPartialImage`

      The type of the event. Always 'response.image_generation_call.partial_image'.

      - `const ResponseImageGenerationCallPartialImageResponseImageGenerationCallPartialImage ResponseImageGenerationCallPartialImage = "response.image_generation_call.partial_image"`

    - `Agent BetaResponseImageGenCallPartialImageEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallArgumentsDeltaEvent struct{…}`

    Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

    - `Delta string`

      A JSON string containing the partial update to the arguments for the MCP tool call.

    - `ItemID string`

      The unique identifier of the MCP tool call item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallArgumentsDelta`

      The type of the event. Always 'response.mcp_call_arguments.delta'.

      - `const ResponseMcpCallArgumentsDeltaResponseMcpCallArgumentsDelta ResponseMcpCallArgumentsDelta = "response.mcp_call_arguments.delta"`

    - `Agent BetaResponseMcpCallArgumentsDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallArgumentsDoneEvent struct{…}`

    Emitted when the arguments for an MCP tool call are finalized.

    - `Arguments string`

      A JSON string containing the finalized arguments for the MCP tool call.

    - `ItemID string`

      The unique identifier of the MCP tool call item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallArgumentsDone`

      The type of the event. Always 'response.mcp_call_arguments.done'.

      - `const ResponseMcpCallArgumentsDoneResponseMcpCallArgumentsDone ResponseMcpCallArgumentsDone = "response.mcp_call_arguments.done"`

    - `Agent BetaResponseMcpCallArgumentsDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallCompletedEvent struct{…}`

    Emitted when an MCP  tool call has completed successfully.

    - `ItemID string`

      The ID of the MCP tool call item that completed.

    - `OutputIndex int64`

      The index of the output item that completed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallCompleted`

      The type of the event. Always 'response.mcp_call.completed'.

      - `const ResponseMcpCallCompletedResponseMcpCallCompleted ResponseMcpCallCompleted = "response.mcp_call.completed"`

    - `Agent BetaResponseMcpCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallFailedEvent struct{…}`

    Emitted when an MCP  tool call has failed.

    - `ItemID string`

      The ID of the MCP tool call item that failed.

    - `OutputIndex int64`

      The index of the output item that failed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallFailed`

      The type of the event. Always 'response.mcp_call.failed'.

      - `const ResponseMcpCallFailedResponseMcpCallFailed ResponseMcpCallFailed = "response.mcp_call.failed"`

    - `Agent BetaResponseMcpCallFailedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallInProgressEvent struct{…}`

    Emitted when an MCP  tool call is in progress.

    - `ItemID string`

      The unique identifier of the MCP tool call item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallInProgress`

      The type of the event. Always 'response.mcp_call.in_progress'.

      - `const ResponseMcpCallInProgressResponseMcpCallInProgress ResponseMcpCallInProgress = "response.mcp_call.in_progress"`

    - `Agent BetaResponseMcpCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpListToolsCompletedEvent struct{…}`

    Emitted when the list of available MCP tools has been successfully retrieved.

    - `ItemID string`

      The ID of the MCP tool call item that produced this output.

    - `OutputIndex int64`

      The index of the output item that was processed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpListToolsCompleted`

      The type of the event. Always 'response.mcp_list_tools.completed'.

      - `const ResponseMcpListToolsCompletedResponseMcpListToolsCompleted ResponseMcpListToolsCompleted = "response.mcp_list_tools.completed"`

    - `Agent BetaResponseMcpListToolsCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpListToolsFailedEvent struct{…}`

    Emitted when the attempt to list available MCP tools has failed.

    - `ItemID string`

      The ID of the MCP tool call item that failed.

    - `OutputIndex int64`

      The index of the output item that failed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpListToolsFailed`

      The type of the event. Always 'response.mcp_list_tools.failed'.

      - `const ResponseMcpListToolsFailedResponseMcpListToolsFailed ResponseMcpListToolsFailed = "response.mcp_list_tools.failed"`

    - `Agent BetaResponseMcpListToolsFailedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpListToolsInProgressEvent struct{…}`

    Emitted when the system is in the process of retrieving the list of available MCP tools.

    - `ItemID string`

      The ID of the MCP tool call item that is being processed.

    - `OutputIndex int64`

      The index of the output item that is being processed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpListToolsInProgress`

      The type of the event. Always 'response.mcp_list_tools.in_progress'.

      - `const ResponseMcpListToolsInProgressResponseMcpListToolsInProgress ResponseMcpListToolsInProgress = "response.mcp_list_tools.in_progress"`

    - `Agent BetaResponseMcpListToolsInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputTextAnnotationAddedEvent struct{…}`

    Emitted when an annotation is added to output text content.

    - `Annotation any`

      The annotation object being added. (See annotation schema for details.)

    - `AnnotationIndex int64`

      The index of the annotation within the content part.

    - `ContentIndex int64`

      The index of the content part within the output item.

    - `ItemID string`

      The unique identifier of the item to which the annotation is being added.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseOutputTextAnnotationAdded`

      The type of the event. Always 'response.output_text.annotation.added'.

      - `const ResponseOutputTextAnnotationAddedResponseOutputTextAnnotationAdded ResponseOutputTextAnnotationAdded = "response.output_text.annotation.added"`

    - `Agent BetaResponseOutputTextAnnotationAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseQueuedEvent struct{…}`

    Emitted when a response is queued and waiting to be processed.

    - `Response BetaResponse`

      The full response object that is queued.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseQueued`

      The type of the event. Always 'response.queued'.

      - `const ResponseQueuedResponseQueued ResponseQueued = "response.queued"`

    - `Agent BetaResponseQueuedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCustomToolCallInputDeltaEvent struct{…}`

    Event representing a delta (partial update) to the input of a custom tool call.

    - `Delta string`

      The incremental input data (delta) for the custom tool call.

    - `ItemID string`

      Unique identifier for the API item associated with this event.

    - `OutputIndex int64`

      The index of the output this delta applies to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseCustomToolCallInputDelta`

      The event type identifier.

      - `const ResponseCustomToolCallInputDeltaResponseCustomToolCallInputDelta ResponseCustomToolCallInputDelta = "response.custom_tool_call_input.delta"`

    - `Agent BetaResponseCustomToolCallInputDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCustomToolCallInputDoneEvent struct{…}`

    Event indicating that input for a custom tool call is complete.

    - `Input string`

      The complete input data for the custom tool call.

    - `ItemID string`

      Unique identifier for the API item associated with this event.

    - `OutputIndex int64`

      The index of the output this event applies to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseCustomToolCallInputDone`

      The event type identifier.

      - `const ResponseCustomToolCallInputDoneResponseCustomToolCallInputDone ResponseCustomToolCallInputDone = "response.custom_tool_call_input.done"`

    - `Agent BetaResponseCustomToolCallInputDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

### Beta Response Text Config

- `type BetaResponseTextConfig struct{…}`

  Configuration options for a text response from the model. Can be plain
  text or structured JSON data. Learn more:

  - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
  - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

  - `Format BetaResponseFormatTextConfigUnion`

    An object specifying the format that the model must output.

    Configuring `{ "type": "json_schema" }` enables Structured Outputs,
    which ensures the model will match your supplied JSON schema. Learn more in the
    [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

    The default format is `{ "type": "text" }` with no additional options.

    **Not recommended for gpt-4o and newer models:**

    Setting to `{ "type": "json_object" }` enables the older JSON mode, which
    ensures the message the model generates is valid JSON. Using `json_schema`
    is preferred for models that support it.

    - `type BetaResponseFormatTextConfigText struct{…}`

      Default response format. Used to generate text responses.

      - `Type Text`

        The type of response format being defined. Always `text`.

        - `const TextText Text = "text"`

    - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

      JSON Schema response format. Used to generate structured JSON responses.
      Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

      - `Name string`

        The name of the response format. Must be a-z, A-Z, 0-9, or contain
        underscores and dashes, with a maximum length of 64.

      - `Schema map[string, any]`

        The schema for the response format, described as a JSON Schema object.
        Learn how to build JSON schemas [here](https://json-schema.org/).

      - `Type JSONSchema`

        The type of response format being defined. Always `json_schema`.

        - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

      - `Description string`

        A description of what the response format is for, used by the model to
        determine how to respond in the format.

      - `Strict bool`

        Whether to enable strict schema adherence when generating the output.
        If set to true, the model will always follow the exact schema defined
        in the `schema` field. Only a subset of JSON Schema is supported when
        `strict` is `true`. To learn more, read the [Structured Outputs
        guide](https://platform.openai.com/docs/guides/structured-outputs).

    - `type BetaResponseFormatTextConfigJSONObject struct{…}`

      JSON object response format. An older method of generating JSON responses.
      Using `json_schema` is recommended for models that support it. Note that the
      model will not generate JSON without a system or user message instructing it
      to do so.

      - `Type JSONObject`

        The type of response format being defined. Always `json_object`.

        - `const JSONObjectJSONObject JSONObject = "json_object"`

  - `Verbosity BetaResponseTextConfigVerbosity`

    Constrains the verbosity of the model's response. Lower values will result in
    more concise responses, while higher values will result in more verbose responses.
    Currently supported values are `low`, `medium`, and `high`. The default is
    `medium`.

    - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

    - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

    - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

### Beta Response Text Delta Event

- `type BetaResponseTextDeltaEvent struct{…}`

  Emitted when there is an additional text delta.

  - `ContentIndex int64`

    The index of the content part that the text delta was added to.

  - `Delta string`

    The text delta that was added.

  - `ItemID string`

    The ID of the output item that the text delta was added to.

  - `Logprobs []BetaResponseTextDeltaEventLogprob`

    The log probabilities of the tokens in the delta.

    - `Token string`

      A possible text token.

    - `Logprob float64`

      The log probability of this token.

    - `TopLogprobs []BetaResponseTextDeltaEventLogprobTopLogprob`

      The log probabilities of up to 20 of the most likely tokens.

      - `Token string`

        A possible text token.

      - `Logprob float64`

        The log probability of this token.

  - `OutputIndex int64`

    The index of the output item that the text delta was added to.

  - `SequenceNumber int64`

    The sequence number for this event.

  - `Type ResponseOutputTextDelta`

    The type of the event. Always `response.output_text.delta`.

    - `const ResponseOutputTextDeltaResponseOutputTextDelta ResponseOutputTextDelta = "response.output_text.delta"`

  - `Agent BetaResponseTextDeltaEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Text Done Event

- `type BetaResponseTextDoneEvent struct{…}`

  Emitted when text content is finalized.

  - `ContentIndex int64`

    The index of the content part that the text content is finalized.

  - `ItemID string`

    The ID of the output item that the text content is finalized.

  - `Logprobs []BetaResponseTextDoneEventLogprob`

    The log probabilities of the tokens in the delta.

    - `Token string`

      A possible text token.

    - `Logprob float64`

      The log probability of this token.

    - `TopLogprobs []BetaResponseTextDoneEventLogprobTopLogprob`

      The log probabilities of up to 20 of the most likely tokens.

      - `Token string`

        A possible text token.

      - `Logprob float64`

        The log probability of this token.

  - `OutputIndex int64`

    The index of the output item that the text content is finalized.

  - `SequenceNumber int64`

    The sequence number for this event.

  - `Text string`

    The text content that is finalized.

  - `Type ResponseOutputTextDone`

    The type of the event. Always `response.output_text.done`.

    - `const ResponseOutputTextDoneResponseOutputTextDone ResponseOutputTextDone = "response.output_text.done"`

  - `Agent BetaResponseTextDoneEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Tool Search Call

- `type BetaResponseToolSearchCall struct{…}`

  - `ID string`

    The unique ID of the tool search call item.

  - `Arguments any`

    Arguments used for the tool search call.

  - `CallID string`

    The unique ID of the tool search call generated by the model.

  - `Execution BetaResponseToolSearchCallExecution`

    Whether tool search was executed by the server or by the client.

    - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

    - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

  - `Status BetaResponseToolSearchCallStatus`

    The status of the tool search call item that was recorded.

    - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

    - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

    - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

  - `Type ToolSearchCall`

    The type of the item. Always `tool_search_call`.

    - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

  - `Agent BetaResponseToolSearchCallAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Tool Search Output Item

- `type BetaResponseToolSearchOutputItem struct{…}`

  - `ID string`

    The unique ID of the tool search output item.

  - `CallID string`

    The unique ID of the tool search call generated by the model.

  - `Execution BetaResponseToolSearchOutputItemExecution`

    Whether tool search was executed by the server or by the client.

    - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

    - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

  - `Status BetaResponseToolSearchOutputItemStatus`

    The status of the tool search output item that was recorded.

    - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

    - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

    - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

  - `Tools []BetaToolUnion`

    The loaded tool definitions returned by tool search.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `Name string`

        The name of the function to call.

      - `Parameters map[string, any]`

        A JSON schema object describing the parameters of the function.

      - `Strict bool`

        Whether strict parameter validation is enforced for this function tool.

      - `Type Function`

        The type of the function tool. Always `function`.

        - `const FunctionFunction Function = "function"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

        - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

      - `DeferLoading bool`

        Whether this function is deferred and loaded via tool search.

      - `Description string`

        A description of the function. Used by the model to determine whether or not to call the function.

      - `OutputSchema map[string, any]`

        A JSON schema object describing the JSON value encoded in string outputs for this function.

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `Type FileSearch`

        The type of the file search tool. Always `file_search`.

        - `const FileSearchFileSearch FileSearch = "file_search"`

      - `VectorStoreIDs []string`

        The IDs of the vector stores to search.

      - `Filters BetaFileSearchToolFiltersUnion`

        A filter to apply.

        - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

          A filter used to compare a specified attribute key to a given value using a defined comparison operation.

          - `Key string`

            The key to compare against the value.

          - `Type string`

            Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

            - `eq`: equals
            - `ne`: not equal
            - `gt`: greater than
            - `gte`: greater than or equal
            - `lt`: less than
            - `lte`: less than or equal
            - `in`: in
            - `nin`: not in

            - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

          - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

            The value to compare against the attribute key; supports string, number, or boolean types.

            - `string`

            - `float64`

            - `bool`

            - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

              - `string`

              - `float64`

        - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

          Combine multiple filters using `and` or `or`.

          - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

            Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

            - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

          - `Type string`

            Type of operation: `and` or `or`.

            - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

            - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

      - `MaxNumResults int64`

        The maximum number of results to return. This number should be between 1 and 50 inclusive.

      - `RankingOptions BetaFileSearchToolRankingOptions`

        Ranking options for search.

        - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

          Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

          - `EmbeddingWeight float64`

            The weight of the embedding in the reciprocal ranking fusion.

          - `TextWeight float64`

            The weight of the text in the reciprocal ranking fusion.

        - `Ranker string`

          The ranker to use for the file search.

          - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

          - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

        - `ScoreThreshold float64`

          The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `Type Computer`

        The type of the computer tool. Always `computer`.

        - `const ComputerComputer Computer = "computer"`

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `DisplayHeight int64`

        The height of the computer display.

      - `DisplayWidth int64`

        The width of the computer display.

      - `Environment BetaComputerUsePreviewToolEnvironment`

        The type of computer environment to control.

        - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

        - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

        - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

        - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

        - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

      - `Type ComputerUsePreview`

        The type of the computer use tool. Always `computer_use_preview`.

        - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `Type BetaWebSearchToolType`

        The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

        - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

        - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

      - `Filters BetaWebSearchToolFilters`

        Filters for the search.

        - `AllowedDomains []string`

          Allowed domains for the search. If not provided, all domains are allowed.
          Subdomains of the provided domains are allowed as well.

          Example: `["pubmed.ncbi.nlm.nih.gov"]`

      - `SearchContextSize BetaWebSearchToolSearchContextSize`

        High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

        - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

        - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

        - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

      - `UserLocation BetaWebSearchToolUserLocation`

        The approximate location of the user.

        - `City string`

          Free text input for the city of the user, e.g. `San Francisco`.

        - `Country string`

          The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

        - `Region string`

          Free text input for the region of the user, e.g. `California`.

        - `Timezone string`

          The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `Type string`

          The type of location approximation. Always `approximate`.

          - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `ServerLabel string`

        A label for this MCP server, used to identify it in tool calls.

      - `Type Mcp`

        The type of the MCP tool. Always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

        - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

      - `AllowedTools BetaToolMcpAllowedToolsUnion`

        List of allowed tool names or a filter object.

        - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

          A string array of allowed tool names

        - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

          A filter object to specify which tools are allowed.

          - `ReadOnly bool`

            Indicates whether or not a tool modifies data or is read-only. If an
            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
            it will match this filter.

          - `ToolNames []string`

            List of allowed tool names.

      - `Authorization string`

        An OAuth access token that can be used with a remote MCP server, either
        with a custom MCP server URL or a service connector. Your application
        must handle the OAuth authorization flow and provide the token here.

      - `ConnectorID string`

        Identifier for service connectors, like those available in ChatGPT. One of
        `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
        about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

        Currently supported `connector_id` values are:

        - Dropbox: `connector_dropbox`
        - Gmail: `connector_gmail`
        - Google Calendar: `connector_googlecalendar`
        - Google Drive: `connector_googledrive`
        - Microsoft Teams: `connector_microsoftteams`
        - Outlook Calendar: `connector_outlookcalendar`
        - Outlook Email: `connector_outlookemail`
        - SharePoint: `connector_sharepoint`

        - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

        - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

        - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

        - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

        - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

        - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

        - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

        - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

      - `DeferLoading bool`

        Whether this MCP tool is deferred and discovered via tool search.

      - `Headers map[string, string]`

        Optional HTTP headers to send to the MCP server. Use for authentication
        or other purposes.

      - `RequireApproval BetaToolMcpRequireApprovalUnion`

        Specify which of the MCP server's tools require approval.

        - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

          Specify which of the MCP server's tools require approval. Can be
          `always`, `never`, or a filter object associated with tools
          that require approval.

          - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

          - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

        - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

          Specify a single approval policy for all tools. One of `always` or
          `never`. When set to `always`, all tools will require approval. When
          set to `never`, all tools will not require approval.

          - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

          - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

      - `ServerDescription string`

        Optional description of the MCP server, used to provide more context.

      - `ServerURL string`

        The URL for the MCP server. One of `server_url`, `connector_id`, or
        `tunnel_id` must be provided.

      - `TunnelID string`

        The Secure MCP Tunnel ID to use instead of a direct server URL. One of
        `server_url`, `connector_id`, or `tunnel_id` must be provided.

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

      - `Container BetaToolCodeInterpreterContainerUnion`

        The code interpreter container. Can be a container ID or an object that
        specifies uploaded file IDs to make available to your code, along with an
        optional `memory_limit` setting.

        - `string`

        - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

          Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

          - `Type Auto`

            Always `auto`.

            - `const AutoAuto Auto = "auto"`

          - `FileIDs []string`

            An optional list of uploaded files to make available to your code.

          - `MemoryLimit string`

            The memory limit for the code interpreter container.

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

          - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

            Network access policy for the container.

            - `type BetaContainerNetworkPolicyDisabled struct{…}`

              - `Type Disabled`

                Disable outbound network access. Always `disabled`.

                - `const DisabledDisabled Disabled = "disabled"`

            - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `AllowedDomains []string`

                A list of allowed domains when type is `allowlist`.

              - `Type Allowlist`

                Allow outbound network access only to specified domains. Always `allowlist`.

                - `const AllowlistAllowlist Allowlist = "allowlist"`

              - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                Optional domain-scoped secrets for allowlisted domains.

                - `Domain string`

                  The domain associated with the secret.

                - `Name string`

                  The name of the secret to inject for the domain.

                - `Value string`

                  The secret value to inject for the domain.

      - `Type CodeInterpreter`

        The type of the code interpreter tool. Always `code_interpreter`.

        - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

        - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

    - `type BetaToolProgrammaticToolCalling struct{…}`

      - `Type ProgrammaticToolCalling`

        The type of the tool. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

      - `Type ImageGeneration`

        The type of the image generation tool. Always `image_generation`.

        - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

      - `Action string`

        Whether to generate a new image or edit an existing image. Default: `auto`.

        - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

        - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

        - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

      - `Background string`

        Allows to set transparency for the background of the generated image(s).
        This parameter is only supported for GPT image models that support
        transparent backgrounds. Must be one of `transparent`, `opaque`, or
        `auto` (default value). When `auto` is used, the model will
        automatically determine the best background for the image.

        `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
        transparent backgrounds. Requests with `background` set to
        `transparent` will return an error for these models; use `opaque` or
        `auto` instead.

        If `transparent`, the output format needs to support transparency,
        so it should be set to either `png` (default value) or `webp`.

        - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

        - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

        - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

      - `InputFidelity string`

        Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

        - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

        - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

      - `InputImageMask BetaToolImageGenerationInputImageMask`

        Optional mask for inpainting. Contains `image_url`
        (string, optional) and `file_id` (string, optional).

        - `FileID string`

          File ID for the mask image.

        - `ImageURL string`

          Base64-encoded mask image.

      - `Model string`

        The image generation model to use. Default: `gpt-image-1`.

        - `string`

        - `string`

          - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

          - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

          - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

          - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

          - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

          - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

      - `Moderation string`

        Moderation level for the generated image. Default: `auto`.

        - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

        - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

      - `OutputCompression int64`

        Compression level for the output image. Default: 100.

      - `OutputFormat string`

        The output format of the generated image. One of `png`, `webp`, or
        `jpeg`. Default: `png`.

        - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

        - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

        - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

      - `PartialImages int64`

        Number of partial images to generate in streaming mode, from 0 (default value) to 3.

      - `Quality string`

        The quality of the generated image. One of `low`, `medium`, `high`,
        or `auto`. Default: `auto`.

        - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

        - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

        - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

        - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

      - `Size string`

        The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

        - `string`

        - `string`

          - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

          - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

          - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

          - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

      - `Type LocalShell`

        The type of the local shell tool. Always `local_shell`.

        - `const LocalShellLocalShell LocalShell = "local_shell"`

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

      - `Type Shell`

        The type of the shell tool. Always `shell`.

        - `const ShellShell Shell = "shell"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

        - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

      - `Environment BetaFunctionShellToolEnvironmentUnion`

        - `type BetaContainerAuto struct{…}`

          - `Type ContainerAuto`

            Automatically creates a container for this request

            - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

          - `FileIDs []string`

            An optional list of uploaded files to make available to your code.

          - `MemoryLimit BetaContainerAutoMemoryLimit`

            The memory limit for the container.

            - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

            - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

            - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

            - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

          - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

            Network access policy for the container.

            - `type BetaContainerNetworkPolicyDisabled struct{…}`

            - `type BetaContainerNetworkPolicyAllowlist struct{…}`

          - `Skills []BetaContainerAutoSkillUnion`

            An optional list of skills referenced by id or inline data.

            - `type BetaSkillReference struct{…}`

              - `SkillID string`

                The ID of the referenced skill.

              - `Type SkillReference`

                References a skill created with the /v1/skills endpoint.

                - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

              - `Version string`

                Optional skill version. Use a positive integer or 'latest'. Omit for default.

            - `type BetaInlineSkill struct{…}`

              - `Description string`

                The description of the skill.

              - `Name string`

                The name of the skill.

              - `Source BetaInlineSkillSource`

                Inline skill payload

                - `Data string`

                  Base64-encoded skill zip bundle.

                - `MediaType ApplicationZip`

                  The media type of the inline skill payload. Must be `application/zip`.

                  - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                - `Type Base64`

                  The type of the inline skill source. Must be `base64`.

                  - `const Base64Base64 Base64 = "base64"`

              - `Type Inline`

                Defines an inline skill for this request.

                - `const InlineInline Inline = "inline"`

        - `type BetaLocalEnvironment struct{…}`

          - `Type Local`

            Use a local computer environment.

            - `const LocalLocal Local = "local"`

          - `Skills []BetaLocalSkill`

            An optional list of skills.

            - `Description string`

              The description of the skill.

            - `Name string`

              The name of the skill.

            - `Path string`

              The path to the directory containing the skill.

        - `type BetaContainerReference struct{…}`

          - `ContainerID string`

            The ID of the referenced container.

          - `Type ContainerReference`

            References a container created with the /v1/containers endpoint

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `Name string`

        The name of the custom tool, used to identify it in tool calls.

      - `Type Custom`

        The type of the custom tool. Always `custom`.

        - `const CustomCustom Custom = "custom"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

        - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

      - `DeferLoading bool`

        Whether this tool should be deferred and discovered via tool search.

      - `Description string`

        Optional description of the custom tool, used to provide more context.

      - `Format BetaCustomToolFormatUnion`

        The input format for the custom tool. Default is unconstrained text.

        - `type BetaCustomToolFormatText struct{…}`

          Unconstrained free-form text.

          - `Type Text`

            Unconstrained text format. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaCustomToolFormatGrammar struct{…}`

          A grammar defined by the user.

          - `Definition string`

            The grammar definition.

          - `Syntax string`

            The syntax of the grammar definition. One of `lark` or `regex`.

            - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

            - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

          - `Type Grammar`

            Grammar format. Always `grammar`.

            - `const GrammarGrammar Grammar = "grammar"`

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

      - `Description string`

        A description of the namespace shown to the model.

      - `Name string`

        The namespace name used in tool calls (for example, `crm`).

      - `Tools []BetaNamespaceToolToolUnion`

        The function/custom tools available inside this namespace.

        - `type BetaNamespaceToolToolFunction struct{…}`

          - `Name string`

          - `Type Function`

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

            - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function should be deferred and discovered via tool search.

          - `Description string`

          - `OutputSchema map[string, any]`

            A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

          - `Parameters any`

          - `Strict bool`

            Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `Type Namespace`

        The type of the tool. Always `namespace`.

        - `const NamespaceNamespace Namespace = "namespace"`

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

      - `Type ToolSearch`

        The type of the tool. Always `tool_search`.

        - `const ToolSearchToolSearch ToolSearch = "tool_search"`

      - `Description string`

        Description shown to the model for a client-executed tool search tool.

      - `Execution BetaToolSearchToolExecution`

        Whether tool search is executed by the server or by the client.

        - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

        - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

      - `Parameters any`

        Parameter schema for a client-executed tool search tool.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `Type BetaWebSearchPreviewToolType`

        The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

        - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

        - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

      - `SearchContentTypes []string`

        - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

        - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

      - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

        High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

        - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

        - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

        - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

      - `UserLocation BetaWebSearchPreviewToolUserLocation`

        The user's location.

        - `Type Approximate`

          The type of location approximation. Always `approximate`.

          - `const ApproximateApproximate Approximate = "approximate"`

        - `City string`

          Free text input for the city of the user, e.g. `San Francisco`.

        - `Country string`

          The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

        - `Region string`

          Free text input for the region of the user, e.g. `California`.

        - `Timezone string`

          The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

      - `Type ApplyPatch`

        The type of the tool. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

        - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

  - `Type ToolSearchOutput`

    The type of the item. Always `tool_search_output`.

    - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

  - `Agent BetaResponseToolSearchOutputItemAgent`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `CreatedBy string`

    The identifier of the actor that created the item.

### Beta Response Tool Search Output Item Param

- `type BetaResponseToolSearchOutputItemParamResp struct{…}`

  - `Tools []BetaToolUnion`

    The loaded tool definitions returned by the tool search output.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `Name string`

        The name of the function to call.

      - `Parameters map[string, any]`

        A JSON schema object describing the parameters of the function.

      - `Strict bool`

        Whether strict parameter validation is enforced for this function tool.

      - `Type Function`

        The type of the function tool. Always `function`.

        - `const FunctionFunction Function = "function"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

        - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

      - `DeferLoading bool`

        Whether this function is deferred and loaded via tool search.

      - `Description string`

        A description of the function. Used by the model to determine whether or not to call the function.

      - `OutputSchema map[string, any]`

        A JSON schema object describing the JSON value encoded in string outputs for this function.

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `Type FileSearch`

        The type of the file search tool. Always `file_search`.

        - `const FileSearchFileSearch FileSearch = "file_search"`

      - `VectorStoreIDs []string`

        The IDs of the vector stores to search.

      - `Filters BetaFileSearchToolFiltersUnion`

        A filter to apply.

        - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

          A filter used to compare a specified attribute key to a given value using a defined comparison operation.

          - `Key string`

            The key to compare against the value.

          - `Type string`

            Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

            - `eq`: equals
            - `ne`: not equal
            - `gt`: greater than
            - `gte`: greater than or equal
            - `lt`: less than
            - `lte`: less than or equal
            - `in`: in
            - `nin`: not in

            - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

            - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

          - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

            The value to compare against the attribute key; supports string, number, or boolean types.

            - `string`

            - `float64`

            - `bool`

            - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

              - `string`

              - `float64`

        - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

          Combine multiple filters using `and` or `or`.

          - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

            Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

            - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

          - `Type string`

            Type of operation: `and` or `or`.

            - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

            - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

      - `MaxNumResults int64`

        The maximum number of results to return. This number should be between 1 and 50 inclusive.

      - `RankingOptions BetaFileSearchToolRankingOptions`

        Ranking options for search.

        - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

          Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

          - `EmbeddingWeight float64`

            The weight of the embedding in the reciprocal ranking fusion.

          - `TextWeight float64`

            The weight of the text in the reciprocal ranking fusion.

        - `Ranker string`

          The ranker to use for the file search.

          - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

          - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

        - `ScoreThreshold float64`

          The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `Type Computer`

        The type of the computer tool. Always `computer`.

        - `const ComputerComputer Computer = "computer"`

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `DisplayHeight int64`

        The height of the computer display.

      - `DisplayWidth int64`

        The width of the computer display.

      - `Environment BetaComputerUsePreviewToolEnvironment`

        The type of computer environment to control.

        - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

        - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

        - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

        - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

        - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

      - `Type ComputerUsePreview`

        The type of the computer use tool. Always `computer_use_preview`.

        - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `Type BetaWebSearchToolType`

        The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

        - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

        - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

      - `Filters BetaWebSearchToolFilters`

        Filters for the search.

        - `AllowedDomains []string`

          Allowed domains for the search. If not provided, all domains are allowed.
          Subdomains of the provided domains are allowed as well.

          Example: `["pubmed.ncbi.nlm.nih.gov"]`

      - `SearchContextSize BetaWebSearchToolSearchContextSize`

        High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

        - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

        - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

        - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

      - `UserLocation BetaWebSearchToolUserLocation`

        The approximate location of the user.

        - `City string`

          Free text input for the city of the user, e.g. `San Francisco`.

        - `Country string`

          The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

        - `Region string`

          Free text input for the region of the user, e.g. `California`.

        - `Timezone string`

          The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `Type string`

          The type of location approximation. Always `approximate`.

          - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `ServerLabel string`

        A label for this MCP server, used to identify it in tool calls.

      - `Type Mcp`

        The type of the MCP tool. Always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

        - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

      - `AllowedTools BetaToolMcpAllowedToolsUnion`

        List of allowed tool names or a filter object.

        - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

          A string array of allowed tool names

        - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

          A filter object to specify which tools are allowed.

          - `ReadOnly bool`

            Indicates whether or not a tool modifies data or is read-only. If an
            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
            it will match this filter.

          - `ToolNames []string`

            List of allowed tool names.

      - `Authorization string`

        An OAuth access token that can be used with a remote MCP server, either
        with a custom MCP server URL or a service connector. Your application
        must handle the OAuth authorization flow and provide the token here.

      - `ConnectorID string`

        Identifier for service connectors, like those available in ChatGPT. One of
        `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
        about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

        Currently supported `connector_id` values are:

        - Dropbox: `connector_dropbox`
        - Gmail: `connector_gmail`
        - Google Calendar: `connector_googlecalendar`
        - Google Drive: `connector_googledrive`
        - Microsoft Teams: `connector_microsoftteams`
        - Outlook Calendar: `connector_outlookcalendar`
        - Outlook Email: `connector_outlookemail`
        - SharePoint: `connector_sharepoint`

        - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

        - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

        - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

        - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

        - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

        - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

        - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

        - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

      - `DeferLoading bool`

        Whether this MCP tool is deferred and discovered via tool search.

      - `Headers map[string, string]`

        Optional HTTP headers to send to the MCP server. Use for authentication
        or other purposes.

      - `RequireApproval BetaToolMcpRequireApprovalUnion`

        Specify which of the MCP server's tools require approval.

        - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

          Specify which of the MCP server's tools require approval. Can be
          `always`, `never`, or a filter object associated with tools
          that require approval.

          - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

          - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

        - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

          Specify a single approval policy for all tools. One of `always` or
          `never`. When set to `always`, all tools will require approval. When
          set to `never`, all tools will not require approval.

          - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

          - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

      - `ServerDescription string`

        Optional description of the MCP server, used to provide more context.

      - `ServerURL string`

        The URL for the MCP server. One of `server_url`, `connector_id`, or
        `tunnel_id` must be provided.

      - `TunnelID string`

        The Secure MCP Tunnel ID to use instead of a direct server URL. One of
        `server_url`, `connector_id`, or `tunnel_id` must be provided.

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

      - `Container BetaToolCodeInterpreterContainerUnion`

        The code interpreter container. Can be a container ID or an object that
        specifies uploaded file IDs to make available to your code, along with an
        optional `memory_limit` setting.

        - `string`

        - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

          Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

          - `Type Auto`

            Always `auto`.

            - `const AutoAuto Auto = "auto"`

          - `FileIDs []string`

            An optional list of uploaded files to make available to your code.

          - `MemoryLimit string`

            The memory limit for the code interpreter container.

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

            - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

          - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

            Network access policy for the container.

            - `type BetaContainerNetworkPolicyDisabled struct{…}`

              - `Type Disabled`

                Disable outbound network access. Always `disabled`.

                - `const DisabledDisabled Disabled = "disabled"`

            - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `AllowedDomains []string`

                A list of allowed domains when type is `allowlist`.

              - `Type Allowlist`

                Allow outbound network access only to specified domains. Always `allowlist`.

                - `const AllowlistAllowlist Allowlist = "allowlist"`

              - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                Optional domain-scoped secrets for allowlisted domains.

                - `Domain string`

                  The domain associated with the secret.

                - `Name string`

                  The name of the secret to inject for the domain.

                - `Value string`

                  The secret value to inject for the domain.

      - `Type CodeInterpreter`

        The type of the code interpreter tool. Always `code_interpreter`.

        - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

        - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

    - `type BetaToolProgrammaticToolCalling struct{…}`

      - `Type ProgrammaticToolCalling`

        The type of the tool. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

      - `Type ImageGeneration`

        The type of the image generation tool. Always `image_generation`.

        - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

      - `Action string`

        Whether to generate a new image or edit an existing image. Default: `auto`.

        - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

        - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

        - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

      - `Background string`

        Allows to set transparency for the background of the generated image(s).
        This parameter is only supported for GPT image models that support
        transparent backgrounds. Must be one of `transparent`, `opaque`, or
        `auto` (default value). When `auto` is used, the model will
        automatically determine the best background for the image.

        `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
        transparent backgrounds. Requests with `background` set to
        `transparent` will return an error for these models; use `opaque` or
        `auto` instead.

        If `transparent`, the output format needs to support transparency,
        so it should be set to either `png` (default value) or `webp`.

        - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

        - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

        - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

      - `InputFidelity string`

        Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

        - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

        - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

      - `InputImageMask BetaToolImageGenerationInputImageMask`

        Optional mask for inpainting. Contains `image_url`
        (string, optional) and `file_id` (string, optional).

        - `FileID string`

          File ID for the mask image.

        - `ImageURL string`

          Base64-encoded mask image.

      - `Model string`

        The image generation model to use. Default: `gpt-image-1`.

        - `string`

        - `string`

          - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

          - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

          - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

          - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

          - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

          - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

      - `Moderation string`

        Moderation level for the generated image. Default: `auto`.

        - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

        - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

      - `OutputCompression int64`

        Compression level for the output image. Default: 100.

      - `OutputFormat string`

        The output format of the generated image. One of `png`, `webp`, or
        `jpeg`. Default: `png`.

        - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

        - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

        - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

      - `PartialImages int64`

        Number of partial images to generate in streaming mode, from 0 (default value) to 3.

      - `Quality string`

        The quality of the generated image. One of `low`, `medium`, `high`,
        or `auto`. Default: `auto`.

        - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

        - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

        - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

        - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

      - `Size string`

        The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

        - `string`

        - `string`

          - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

          - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

          - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

          - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

      - `Type LocalShell`

        The type of the local shell tool. Always `local_shell`.

        - `const LocalShellLocalShell LocalShell = "local_shell"`

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

      - `Type Shell`

        The type of the shell tool. Always `shell`.

        - `const ShellShell Shell = "shell"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

        - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

      - `Environment BetaFunctionShellToolEnvironmentUnion`

        - `type BetaContainerAuto struct{…}`

          - `Type ContainerAuto`

            Automatically creates a container for this request

            - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

          - `FileIDs []string`

            An optional list of uploaded files to make available to your code.

          - `MemoryLimit BetaContainerAutoMemoryLimit`

            The memory limit for the container.

            - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

            - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

            - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

            - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

          - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

            Network access policy for the container.

            - `type BetaContainerNetworkPolicyDisabled struct{…}`

            - `type BetaContainerNetworkPolicyAllowlist struct{…}`

          - `Skills []BetaContainerAutoSkillUnion`

            An optional list of skills referenced by id or inline data.

            - `type BetaSkillReference struct{…}`

              - `SkillID string`

                The ID of the referenced skill.

              - `Type SkillReference`

                References a skill created with the /v1/skills endpoint.

                - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

              - `Version string`

                Optional skill version. Use a positive integer or 'latest'. Omit for default.

            - `type BetaInlineSkill struct{…}`

              - `Description string`

                The description of the skill.

              - `Name string`

                The name of the skill.

              - `Source BetaInlineSkillSource`

                Inline skill payload

                - `Data string`

                  Base64-encoded skill zip bundle.

                - `MediaType ApplicationZip`

                  The media type of the inline skill payload. Must be `application/zip`.

                  - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                - `Type Base64`

                  The type of the inline skill source. Must be `base64`.

                  - `const Base64Base64 Base64 = "base64"`

              - `Type Inline`

                Defines an inline skill for this request.

                - `const InlineInline Inline = "inline"`

        - `type BetaLocalEnvironment struct{…}`

          - `Type Local`

            Use a local computer environment.

            - `const LocalLocal Local = "local"`

          - `Skills []BetaLocalSkill`

            An optional list of skills.

            - `Description string`

              The description of the skill.

            - `Name string`

              The name of the skill.

            - `Path string`

              The path to the directory containing the skill.

        - `type BetaContainerReference struct{…}`

          - `ContainerID string`

            The ID of the referenced container.

          - `Type ContainerReference`

            References a container created with the /v1/containers endpoint

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `Name string`

        The name of the custom tool, used to identify it in tool calls.

      - `Type Custom`

        The type of the custom tool. Always `custom`.

        - `const CustomCustom Custom = "custom"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

        - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

      - `DeferLoading bool`

        Whether this tool should be deferred and discovered via tool search.

      - `Description string`

        Optional description of the custom tool, used to provide more context.

      - `Format BetaCustomToolFormatUnion`

        The input format for the custom tool. Default is unconstrained text.

        - `type BetaCustomToolFormatText struct{…}`

          Unconstrained free-form text.

          - `Type Text`

            Unconstrained text format. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaCustomToolFormatGrammar struct{…}`

          A grammar defined by the user.

          - `Definition string`

            The grammar definition.

          - `Syntax string`

            The syntax of the grammar definition. One of `lark` or `regex`.

            - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

            - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

          - `Type Grammar`

            Grammar format. Always `grammar`.

            - `const GrammarGrammar Grammar = "grammar"`

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

      - `Description string`

        A description of the namespace shown to the model.

      - `Name string`

        The namespace name used in tool calls (for example, `crm`).

      - `Tools []BetaNamespaceToolToolUnion`

        The function/custom tools available inside this namespace.

        - `type BetaNamespaceToolToolFunction struct{…}`

          - `Name string`

          - `Type Function`

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

            - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function should be deferred and discovered via tool search.

          - `Description string`

          - `OutputSchema map[string, any]`

            A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

          - `Parameters any`

          - `Strict bool`

            Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `Type Namespace`

        The type of the tool. Always `namespace`.

        - `const NamespaceNamespace Namespace = "namespace"`

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

      - `Type ToolSearch`

        The type of the tool. Always `tool_search`.

        - `const ToolSearchToolSearch ToolSearch = "tool_search"`

      - `Description string`

        Description shown to the model for a client-executed tool search tool.

      - `Execution BetaToolSearchToolExecution`

        Whether tool search is executed by the server or by the client.

        - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

        - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

      - `Parameters any`

        Parameter schema for a client-executed tool search tool.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `Type BetaWebSearchPreviewToolType`

        The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

        - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

        - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

      - `SearchContentTypes []string`

        - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

        - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

      - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

        High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

        - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

        - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

        - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

      - `UserLocation BetaWebSearchPreviewToolUserLocation`

        The user's location.

        - `Type Approximate`

          The type of location approximation. Always `approximate`.

          - `const ApproximateApproximate Approximate = "approximate"`

        - `City string`

          Free text input for the city of the user, e.g. `San Francisco`.

        - `Country string`

          The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

        - `Region string`

          Free text input for the region of the user, e.g. `California`.

        - `Timezone string`

          The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

      - `Type ApplyPatch`

        The type of the tool. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `AllowedCallers []string`

        The tool invocation context(s).

        - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

        - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

  - `Type ToolSearchOutput`

    The item type. Always `tool_search_output`.

    - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

  - `ID string`

    The unique ID of this tool search output.

  - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

    The agent that produced this item.

    - `AgentName string`

      The canonical name of the agent that produced this item.

  - `CallID string`

    The unique ID of the tool search call generated by the model.

  - `Execution BetaResponseToolSearchOutputItemParamExecution`

    Whether tool search was executed by the server or by the client.

    - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

    - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

  - `Status BetaResponseToolSearchOutputItemParamStatus`

    The status of the tool search output.

    - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

    - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

    - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

### Beta Response Usage

- `type BetaResponseUsage struct{…}`

  Represents token usage details including input tokens, output tokens,
  a breakdown of output tokens, and the total tokens used.

  - `InputTokens int64`

    The number of input tokens.

  - `InputTokensDetails BetaResponseUsageInputTokensDetails`

    A detailed breakdown of the input tokens.

    - `CacheWriteTokens int64`

      The number of input tokens that were written to the cache.

    - `CachedTokens int64`

      The number of tokens that were retrieved from the cache.
      [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

  - `OutputTokens int64`

    The number of output tokens.

  - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

    A detailed breakdown of the output tokens.

    - `ReasoningTokens int64`

      The number of reasoning tokens.

  - `TotalTokens int64`

    The total number of tokens used.

### Beta Response Web Search Call Completed Event

- `type BetaResponseWebSearchCallCompletedEvent struct{…}`

  Emitted when a web search call is completed.

  - `ItemID string`

    Unique ID for the output item associated with the web search call.

  - `OutputIndex int64`

    The index of the output item that the web search call is associated with.

  - `SequenceNumber int64`

    The sequence number of the web search call being processed.

  - `Type ResponseWebSearchCallCompleted`

    The type of the event. Always `response.web_search_call.completed`.

    - `const ResponseWebSearchCallCompletedResponseWebSearchCallCompleted ResponseWebSearchCallCompleted = "response.web_search_call.completed"`

  - `Agent BetaResponseWebSearchCallCompletedEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Web Search Call In Progress Event

- `type BetaResponseWebSearchCallInProgressEvent struct{…}`

  Emitted when a web search call is initiated.

  - `ItemID string`

    Unique ID for the output item associated with the web search call.

  - `OutputIndex int64`

    The index of the output item that the web search call is associated with.

  - `SequenceNumber int64`

    The sequence number of the web search call being processed.

  - `Type ResponseWebSearchCallInProgress`

    The type of the event. Always `response.web_search_call.in_progress`.

    - `const ResponseWebSearchCallInProgressResponseWebSearchCallInProgress ResponseWebSearchCallInProgress = "response.web_search_call.in_progress"`

  - `Agent BetaResponseWebSearchCallInProgressEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Response Web Search Call Searching Event

- `type BetaResponseWebSearchCallSearchingEvent struct{…}`

  Emitted when a web search call is executing.

  - `ItemID string`

    Unique ID for the output item associated with the web search call.

  - `OutputIndex int64`

    The index of the output item that the web search call is associated with.

  - `SequenceNumber int64`

    The sequence number of the web search call being processed.

  - `Type ResponseWebSearchCallSearching`

    The type of the event. Always `response.web_search_call.searching`.

    - `const ResponseWebSearchCallSearchingResponseWebSearchCallSearching ResponseWebSearchCallSearching = "response.web_search_call.searching"`

  - `Agent BetaResponseWebSearchCallSearchingEventAgent`

    The agent that owns this multi-agent streaming event.

    - `AgentName string`

      The canonical name of the agent that produced this item.

### Beta Responses Client Event

- `type BetaResponsesClientEventUnion interface{…}`

  Client events accepted by the Responses WebSocket server.

  - `BetaResponsesClientEventResponseCreate`

    - `Type ResponseCreate`

      The type of the client event. Always `response.create`.

      - `const ResponseCreateResponseCreate ResponseCreate = "response.create"`

    - `Background bool`

      Whether to run the model response in the background.
      [Learn more](https://platform.openai.com/docs/guides/background).

    - `ContextManagement []BetaResponsesClientEventResponseCreateContextManagement`

      Context management configuration for this request.

      - `Type string`

        The context management entry type. Currently only 'compaction' is supported.

      - `CompactThreshold int64`

        Token threshold at which compaction should be triggered for this entry.

    - `Conversation BetaResponsesClientEventResponseCreateConversationUnion`

      The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.
      Input items and output items from this response are automatically added to this conversation after this response completes.

      - `string`

      - `type BetaResponseConversationParamResp struct{…}`

        The conversation that this response belongs to.

        - `ID string`

          The unique ID of the conversation.

    - `Include []BetaResponseIncludable`

      Specify additional output data to include in the model response. Currently supported values are:

      - `web_search_call.action.sources`: Include the sources of the web search tool call.
      - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.
      - `computer_call_output.output.image_url`: Include image urls from the computer call output.
      - `file_search_call.results`: Include the search results of the file search tool call.
      - `message.input_image.image_url`: Include image urls from the input message.
      - `message.output_text.logprobs`: Include logprobs with assistant messages.
      - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).

      - `const BetaResponseIncludableFileSearchCallResults BetaResponseIncludable = "file_search_call.results"`

      - `const BetaResponseIncludableWebSearchCallResults BetaResponseIncludable = "web_search_call.results"`

      - `const BetaResponseIncludableWebSearchCallActionSources BetaResponseIncludable = "web_search_call.action.sources"`

      - `const BetaResponseIncludableMessageInputImageImageURL BetaResponseIncludable = "message.input_image.image_url"`

      - `const BetaResponseIncludableComputerCallOutputOutputImageURL BetaResponseIncludable = "computer_call_output.output.image_url"`

      - `const BetaResponseIncludableCodeInterpreterCallOutputs BetaResponseIncludable = "code_interpreter_call.outputs"`

      - `const BetaResponseIncludableReasoningEncryptedContent BetaResponseIncludable = "reasoning.encrypted_content"`

      - `const BetaResponseIncludableMessageOutputTextLogprobs BetaResponseIncludable = "message.output_text.logprobs"`

    - `Input BetaResponsesClientEventResponseCreateInputUnion`

      Text, image, or file inputs to the model, used to generate a response.

      Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Image inputs](https://platform.openai.com/docs/guides/images)
      - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
      - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
      - [Function calling](https://platform.openai.com/docs/guides/function-calling)

      - `string`

      - `type BetaResponseInput []BetaResponseInputItemUnion`

        A list of one or many input items to the model, containing
        different content types.

        - `type BetaEasyInputMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role. Messages with the
          `assistant` role are presumed to have been generated by the model in previous
          interactions.

          - `Content BetaEasyInputMessageContentUnion`

            Text, image, or audio input to the model, used to generate a response.
            Can also contain previous assistant responses.

            - `string`

            - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

              A list of one or many input items to the model, containing different content
              types.

              - `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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail BetaResponseInputImageDetail`

                  The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                  - `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`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `ImageURL string`

                  The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileDetail`

                  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`.

                  - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                  - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                  - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                - `FileData string`

                  The content of the file to be sent to the model.

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `FileURL string`

                  The URL of the file to be sent to the model.

                - `Filename string`

                  The name of the file to be sent to the model.

                - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Role BetaEasyInputMessageRole`

            The role of the message input. One of `user`, `assistant`, `system`, or
            `developer`.

            - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

            - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

            - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

            - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

          - `Phase BetaEasyInputMessagePhase`

            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.

            - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

            - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

          - `Type BetaEasyInputMessageType`

            The type of the message input. Always `message`.

            - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

        - `type BetaResponseInputItemMessage struct{…}`

          A message input to the model with a role indicating instruction following
          hierarchy. Instructions given with the `developer` or `system` role take
          precedence over instructions given with the `user` role.

          - `Content BetaResponseInputMessageContentList`

            A list of one or many input items to the model, containing different content
            types.

          - `Role string`

            The role of the message input. One of `user`, `system`, or `developer`.

            - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

            - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

            - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

          - `Agent BetaResponseInputItemMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

            - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

            - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

          - `Type string`

            The type of the message input. Always set to `message`.

            - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

        - `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.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

              - `Annotations []BetaResponseOutputTextAnnotationUnion`

                The annotations of the text output.

                - `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`.

                    - `const FileCitationFileCitation FileCitation = "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`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the web resource.

                - `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`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                    - `const FilePathFilePath FilePath = "file_path"`

              - `Text string`

                The text output from the model.

              - `Type OutputText`

                The type of the output text. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Logprobs []BetaResponseOutputTextLogprob`

                - `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`.

                - `const RefusalRefusal Refusal = "refusal"`

          - `Role Assistant`

            The role of the output message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `Status BetaResponseOutputMessageStatus`

            The status of the message input. One of `in_progress`, `completed`, or
            `incomplete`. Populated when input items are returned via API.

            - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

            - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

            - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

          - `Type Message`

            The type of the output message. Always `message`.

            - `const MessageMessage Message = "message"`

          - `Agent BetaResponseOutputMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Phase BetaResponseOutputMessagePhase`

            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.

            - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

            - `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`.

            - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

          - `Agent BetaResponseFileSearchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Results []BetaResponseFileSearchToolCallResult`

            The results of the file search tool call.

            - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

              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.

              - `string`

              - `float64`

              - `bool`

            - `FileID string`

              The unique ID of the file.

            - `Filename string`

              The name of the file.

            - `Score float64`

              The relevance score of the file - a value between 0 and 1.

            - `Text string`

              The text that was retrieved from the file.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

              The type of the pending safety check.

            - `Message string`

              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.

            - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

            - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

            - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

          - `Type BetaResponseComputerToolCallType`

            The type of the computer call. Always `computer_call`.

            - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

          - `Action BetaComputerActionUnion`

            A click action.

            - `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`.

                - `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`.

                - `const ClickClick Click = "click"`

              - `X int64`

                The x-coordinate where the click occurred.

              - `Y int64`

                The y-coordinate where the click occurred.

              - `Keys []string`

                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`.

                - `const DoubleClickDoubleClick DoubleClick = "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`.

                - `const DragDrag Drag = "drag"`

              - `Keys []string`

                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`.

                - `const KeypressKeypress Keypress = "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`.

                - `const MoveMove Move = "move"`

              - `X int64`

                The x-coordinate to move to.

              - `Y int64`

                The y-coordinate to move to.

              - `Keys []string`

                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`.

                - `const ScreenshotScreenshot Screenshot = "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`.

                - `const ScrollScroll Scroll = "scroll"`

              - `X int64`

                The x-coordinate where the scroll occurred.

              - `Y int64`

                The y-coordinate where the scroll occurred.

              - `Keys []string`

                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`.

                - `const TypeType Type = "type"`

            - `type BetaComputerActionWait struct{…}`

              A wait action.

              - `Type Wait`

                Specifies the event type. For a wait action, this property is always set to `wait`.

                - `const WaitWait Wait = "wait"`

          - `Actions BetaComputerActionList`

            Flattened batched actions for `computer_use`. Each action includes an
            `type` discriminator and action-specific fields.

            - `type BetaComputerActionClick struct{…}`

              A click action.

            - `type BetaComputerActionDoubleClick struct{…}`

              A double click action.

            - `type BetaComputerActionDrag struct{…}`

              A drag action.

            - `type BetaComputerActionKeypress struct{…}`

              A collection of keypresses the model would like to perform.

            - `type BetaComputerActionMove struct{…}`

              A mouse move action.

            - `type BetaComputerActionScreenshot struct{…}`

              A screenshot action.

            - `type BetaComputerActionScroll struct{…}`

              A scroll action.

            - `type BetaComputerActionType struct{…}`

              An action to type in text.

            - `type BetaComputerActionWait struct{…}`

              A wait action.

          - `Agent BetaResponseComputerToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

            The ID of the computer tool call that produced the output.

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            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`.

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

              The identifier of an uploaded file that contains the screenshot.

            - `ImageURL string`

              The URL of the screenshot image.

          - `Type ComputerCallOutput`

            The type of the computer tool call output. Always `computer_call_output`.

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

            The ID of the computer tool call output.

          - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

            The safety checks reported by the API that have been acknowledged by the developer.

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseInputItemComputerCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

            - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

            - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

          - `ID string`

            The unique ID of the web search tool call.

          - `Action BetaResponseFunctionWebSearchActionUnion`

            An object describing the specific action taken in this web search call.
            Includes details on how the model used the web (search, open_page, find_in_page).

            - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

              Action type "search" - Performs a web search query.

              - `Type Search`

                The action type.

                - `const SearchSearch Search = "search"`

              - `Queries []string`

                The search queries.

              - `Query string`

                The search query.

              - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                The sources used in the search.

                - `Type URL`

                  The type of source. Always `url`.

                  - `const URLURL URL = "url"`

                - `URL string`

                  The URL of the source.

            - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

              Action type "open_page" - Opens a specific URL from search results.

              - `Type OpenPage`

                The action type.

                - `const OpenPageOpenPage OpenPage = "open_page"`

              - `URL string`

                The URL opened by the model.

            - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

              Action type "find_in_page": Searches for a pattern within a loaded page.

              - `Pattern string`

                The pattern or text to search for within the page.

              - `Type FindInPage`

                The action type.

                - `const FindInPageFindInPage FindInPage = "find_in_page"`

              - `URL string`

                The URL of the page searched for the pattern.

          - `Status BetaResponseFunctionWebSearchStatus`

            The status of the web search tool call.

            - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

            - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

            - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

            - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

          - `Type WebSearchCall`

            The type of the web search tool call. Always `web_search_call`.

            - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

          - `Agent BetaResponseFunctionWebSearchAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

            - `const FunctionCallFunctionCall FunctionCall = "function_call"`

          - `ID string`

            The unique ID of the function tool call.

          - `Agent BetaResponseFunctionToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the function to run.

          - `Status BetaResponseFunctionToolCallStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

            - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

        - `type BetaResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

            The unique ID of the function tool call generated by the model.

          - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

            Text, image, or file output of the function tool call.

            - `string`

            - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

              An array of content outputs (text, image, file) for the function tool call.

              - `type BetaResponseInputTextContent 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`.

                  - `const InputTextInputText InputText = "input_text"`

                - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  The type of the input item. Always `input_image`.

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail BetaResponseInputImageContentDetail`

                  The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                  - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                  - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                  - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                  - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `ImageURL string`

                  The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

              - `type BetaResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  The type of the input item. Always `input_file`.

                  - `const InputFileInputFile InputFile = "input_file"`

                - `Detail BetaResponseInputFileContentDetail`

                  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`.

                  - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                  - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                  - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                - `FileData string`

                  The base64-encoded data of the file to be sent to the model.

                - `FileID string`

                  The ID of the file to be sent to the model.

                - `FileURL string`

                  The URL of the file to be sent to the model.

                - `Filename string`

                  The name of the file to be sent to the model.

                - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                  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`.

                    - `const ExplicitExplicit Explicit = "explicit"`

          - `Type FunctionCallOutput`

            The type of the function tool call output. Always `function_call_output`.

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

            The unique ID of the function tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemFunctionCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

            - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemAgentMessage struct{…}`

          A message routed between agents.

          - `Author string`

            The sending agent identity.

          - `Content []BetaResponseInputItemAgentMessageContentUnion`

            Plaintext, image, or encrypted content sent between agents.

            - `type BetaResponseInputTextContent struct{…}`

              A text input to the model.

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

            - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The item type. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `ID string`

            The unique ID of this agent message item.

          - `Agent BetaResponseInputItemAgentMessageAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCall struct{…}`

          - `Action string`

            The multi-agent action that was executed.

            - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

          - `Arguments string`

            The action arguments as a JSON string.

          - `CallID string`

            The unique ID linking this call to its output.

          - `Type MultiAgentCall`

            The item type. Always `multi_agent_call`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `ID string`

            The unique ID of this multi-agent call.

          - `Agent BetaResponseInputItemMultiAgentCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

          - `Action string`

            The multi-agent action that produced this result.

            - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

            - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

          - `CallID string`

            The unique ID of the multi-agent call.

          - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

            Text output returned by the multi-agent action.

            - `Text string`

              The text content.

            - `Type OutputText`

              The content type. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

              Citations associated with the text content.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                - `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 citation type. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                - `EndIndex int64`

                  The index of the last character of the citation in the message.

                - `StartIndex int64`

                  The index of the first character of the citation in the message.

                - `Title string`

                  The title of the cited resource.

                - `Type URLCitation`

                  The citation type. Always `url_citation`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the cited resource.

              - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                - `ContainerID string`

                  The ID of the container.

                - `EndIndex int64`

                  The index of the last character of the citation in the message.

                - `FileID string`

                  The ID of the container file.

                - `Filename string`

                  The filename of the container file cited.

                - `StartIndex int64`

                  The index of the first character of the citation in the message.

                - `Type ContainerFileCitation`

                  The citation type. Always `container_file_citation`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

          - `Type MultiAgentCallOutput`

            The item type. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `ID string`

            The unique ID of this multi-agent call output.

          - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemToolSearchCall struct{…}`

          - `Arguments any`

            The arguments supplied to the tool search call.

          - `Type ToolSearchCall`

            The item type. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `ID string`

            The unique ID of this tool search call.

          - `Agent BetaResponseInputItemToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution string`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

            - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

          - `Status string`

            The status of the tool search call.

            - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

            - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

            - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

        - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by the tool search output.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `Name string`

                The name of the function to call.

              - `Parameters map[string, any]`

                A JSON schema object describing the parameters of the function.

              - `Strict bool`

                Whether strict parameter validation is enforced for this function tool.

              - `Type Function`

                The type of the function tool. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function is deferred and loaded via tool search.

              - `Description string`

                A description of the function. Used by the model to determine whether or not to call the function.

              - `OutputSchema map[string, any]`

                A JSON schema object describing the JSON value encoded in string outputs for this function.

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `Type FileSearch`

                The type of the file search tool. Always `file_search`.

                - `const FileSearchFileSearch FileSearch = "file_search"`

              - `VectorStoreIDs []string`

                The IDs of the vector stores to search.

              - `Filters BetaFileSearchToolFiltersUnion`

                A filter to apply.

                - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                    - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

                - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                  Combine multiple filters using `and` or `or`.

                  - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                    Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                    - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                      A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                      - `Key string`

                        The key to compare against the value.

                      - `Type string`

                        Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                        - `eq`: equals
                        - `ne`: not equal
                        - `gt`: greater than
                        - `gte`: greater than or equal
                        - `lt`: less than
                        - `lte`: less than or equal
                        - `in`: in
                        - `nin`: not in

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                        - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                      - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                        The value to compare against the attribute key; supports string, number, or boolean types.

                        - `string`

                        - `float64`

                        - `bool`

                        - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                          - `string`

                          - `float64`

                  - `Type string`

                    Type of operation: `and` or `or`.

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                    - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

              - `MaxNumResults int64`

                The maximum number of results to return. This number should be between 1 and 50 inclusive.

              - `RankingOptions BetaFileSearchToolRankingOptions`

                Ranking options for search.

                - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                  Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                  - `EmbeddingWeight float64`

                    The weight of the embedding in the reciprocal ranking fusion.

                  - `TextWeight float64`

                    The weight of the text in the reciprocal ranking fusion.

                - `Ranker string`

                  The ranker to use for the file search.

                  - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                  - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                - `ScoreThreshold float64`

                  The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `Type Computer`

                The type of the computer tool. Always `computer`.

                - `const ComputerComputer Computer = "computer"`

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `DisplayHeight int64`

                The height of the computer display.

              - `DisplayWidth int64`

                The width of the computer display.

              - `Environment BetaComputerUsePreviewToolEnvironment`

                The type of computer environment to control.

                - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

              - `Type ComputerUsePreview`

                The type of the computer use tool. Always `computer_use_preview`.

                - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchToolType`

                The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

              - `Filters BetaWebSearchToolFilters`

                Filters for the search.

                - `AllowedDomains []string`

                  Allowed domains for the search. If not provided, all domains are allowed.
                  Subdomains of the provided domains are allowed as well.

                  Example: `["pubmed.ncbi.nlm.nih.gov"]`

              - `SearchContextSize BetaWebSearchToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchToolUserLocation`

                The approximate location of the user.

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                - `Type string`

                  The type of location approximation. Always `approximate`.

                  - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `ServerLabel string`

                A label for this MCP server, used to identify it in tool calls.

              - `Type Mcp`

                The type of the MCP tool. Always `mcp`.

                - `const McpMcp Mcp = "mcp"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

              - `AllowedTools BetaToolMcpAllowedToolsUnion`

                List of allowed tool names or a filter object.

                - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                  A string array of allowed tool names

                - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `Authorization string`

                An OAuth access token that can be used with a remote MCP server, either
                with a custom MCP server URL or a service connector. Your application
                must handle the OAuth authorization flow and provide the token here.

              - `ConnectorID string`

                Identifier for service connectors, like those available in ChatGPT. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                Currently supported `connector_id` values are:

                - Dropbox: `connector_dropbox`
                - Gmail: `connector_gmail`
                - Google Calendar: `connector_googlecalendar`
                - Google Drive: `connector_googledrive`
                - Microsoft Teams: `connector_microsoftteams`
                - Outlook Calendar: `connector_outlookcalendar`
                - Outlook Email: `connector_outlookemail`
                - SharePoint: `connector_sharepoint`

                - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

              - `DeferLoading bool`

                Whether this MCP tool is deferred and discovered via tool search.

              - `Headers map[string, string]`

                Optional HTTP headers to send to the MCP server. Use for authentication
                or other purposes.

              - `RequireApproval BetaToolMcpRequireApprovalUnion`

                Specify which of the MCP server's tools require approval.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                  Specify which of the MCP server's tools require approval. Can be
                  `always`, `never`, or a filter object associated with tools
                  that require approval.

                  - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                  - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                  Specify a single approval policy for all tools. One of `always` or
                  `never`. When set to `always`, all tools will require approval. When
                  set to `never`, all tools will not require approval.

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                  - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

              - `ServerDescription string`

                Optional description of the MCP server, used to provide more context.

              - `ServerURL string`

                The URL for the MCP server. One of `server_url`, `connector_id`, or
                `tunnel_id` must be provided.

              - `TunnelID string`

                The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                `server_url`, `connector_id`, or `tunnel_id` must be provided.

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

              - `Container BetaToolCodeInterpreterContainerUnion`

                The code interpreter container. Can be a container ID or an object that
                specifies uploaded file IDs to make available to your code, along with an
                optional `memory_limit` setting.

                - `string`

                - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                  Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                  - `Type Auto`

                    Always `auto`.

                    - `const AutoAuto Auto = "auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit string`

                    The memory limit for the code interpreter container.

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                    - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `Type Disabled`

                        Disable outbound network access. Always `disabled`.

                        - `const DisabledDisabled Disabled = "disabled"`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                      - `AllowedDomains []string`

                        A list of allowed domains when type is `allowlist`.

                      - `Type Allowlist`

                        Allow outbound network access only to specified domains. Always `allowlist`.

                        - `const AllowlistAllowlist Allowlist = "allowlist"`

                      - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                        Optional domain-scoped secrets for allowlisted domains.

                        - `Domain string`

                          The domain associated with the secret.

                        - `Name string`

                          The name of the secret to inject for the domain.

                        - `Value string`

                          The secret value to inject for the domain.

              - `Type CodeInterpreter`

                The type of the code interpreter tool. Always `code_interpreter`.

                - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

            - `type BetaToolProgrammaticToolCalling struct{…}`

              - `Type ProgrammaticToolCalling`

                The type of the tool. Always `programmatic_tool_calling`.

                - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

              - `Type ImageGeneration`

                The type of the image generation tool. Always `image_generation`.

                - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

              - `Action string`

                Whether to generate a new image or edit an existing image. Default: `auto`.

                - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

              - `Background string`

                Allows to set transparency for the background of the generated image(s).
                This parameter is only supported for GPT image models that support
                transparent backgrounds. Must be one of `transparent`, `opaque`, or
                `auto` (default value). When `auto` is used, the model will
                automatically determine the best background for the image.

                `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                transparent backgrounds. Requests with `background` set to
                `transparent` will return an error for these models; use `opaque` or
                `auto` instead.

                If `transparent`, the output format needs to support transparency,
                so it should be set to either `png` (default value) or `webp`.

                - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

              - `InputFidelity string`

                Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

              - `InputImageMask BetaToolImageGenerationInputImageMask`

                Optional mask for inpainting. Contains `image_url`
                (string, optional) and `file_id` (string, optional).

                - `FileID string`

                  File ID for the mask image.

                - `ImageURL string`

                  Base64-encoded mask image.

              - `Model string`

                The image generation model to use. Default: `gpt-image-1`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                  - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                  - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                  - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                  - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                  - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

              - `Moderation string`

                Moderation level for the generated image. Default: `auto`.

                - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

              - `OutputCompression int64`

                Compression level for the output image. Default: 100.

              - `OutputFormat string`

                The output format of the generated image. One of `png`, `webp`, or
                `jpeg`. Default: `png`.

                - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

              - `PartialImages int64`

                Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              - `Quality string`

                The quality of the generated image. One of `low`, `medium`, `high`,
                or `auto`. Default: `auto`.

                - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

              - `Size string`

                The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                - `string`

                - `string`

                  - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                  - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                  - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                  - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

              - `Type LocalShell`

                The type of the local shell tool. Always `local_shell`.

                - `const LocalShellLocalShell LocalShell = "local_shell"`

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

              - `Type Shell`

                The type of the shell tool. Always `shell`.

                - `const ShellShell Shell = "shell"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

              - `Environment BetaFunctionShellToolEnvironmentUnion`

                - `type BetaContainerAuto struct{…}`

                  - `Type ContainerAuto`

                    Automatically creates a container for this request

                    - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                  - `FileIDs []string`

                    An optional list of uploaded files to make available to your code.

                  - `MemoryLimit BetaContainerAutoMemoryLimit`

                    The memory limit for the container.

                    - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                    - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                    - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                    - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                  - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                    Network access policy for the container.

                    - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `Skills []BetaContainerAutoSkillUnion`

                    An optional list of skills referenced by id or inline data.

                    - `type BetaSkillReference struct{…}`

                      - `SkillID string`

                        The ID of the referenced skill.

                      - `Type SkillReference`

                        References a skill created with the /v1/skills endpoint.

                        - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                      - `Version string`

                        Optional skill version. Use a positive integer or 'latest'. Omit for default.

                    - `type BetaInlineSkill struct{…}`

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Source BetaInlineSkillSource`

                        Inline skill payload

                        - `Data string`

                          Base64-encoded skill zip bundle.

                        - `MediaType ApplicationZip`

                          The media type of the inline skill payload. Must be `application/zip`.

                          - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                        - `Type Base64`

                          The type of the inline skill source. Must be `base64`.

                          - `const Base64Base64 Base64 = "base64"`

                      - `Type Inline`

                        Defines an inline skill for this request.

                        - `const InlineInline Inline = "inline"`

                - `type BetaLocalEnvironment struct{…}`

                  - `Type Local`

                    Use a local computer environment.

                    - `const LocalLocal Local = "local"`

                  - `Skills []BetaLocalSkill`

                    An optional list of skills.

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Path string`

                      The path to the directory containing the skill.

                - `type BetaContainerReference struct{…}`

                  - `ContainerID string`

                    The ID of the referenced container.

                  - `Type ContainerReference`

                    References a container created with the /v1/containers endpoint

                    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Name string`

                The name of the custom tool, used to identify it in tool calls.

              - `Type Custom`

                The type of the custom tool. Always `custom`.

                - `const CustomCustom Custom = "custom"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this tool should be deferred and discovered via tool search.

              - `Description string`

                Optional description of the custom tool, used to provide more context.

              - `Format BetaCustomToolFormatUnion`

                The input format for the custom tool. Default is unconstrained text.

                - `type BetaCustomToolFormatText struct{…}`

                  Unconstrained free-form text.

                  - `Type Text`

                    Unconstrained text format. Always `text`.

                    - `const TextText Text = "text"`

                - `type BetaCustomToolFormatGrammar struct{…}`

                  A grammar defined by the user.

                  - `Definition string`

                    The grammar definition.

                  - `Syntax string`

                    The syntax of the grammar definition. One of `lark` or `regex`.

                    - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                    - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                  - `Type Grammar`

                    Grammar format. Always `grammar`.

                    - `const GrammarGrammar Grammar = "grammar"`

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

              - `Description string`

                A description of the namespace shown to the model.

              - `Name string`

                The namespace name used in tool calls (for example, `crm`).

              - `Tools []BetaNamespaceToolToolUnion`

                The function/custom tools available inside this namespace.

                - `type BetaNamespaceToolToolFunction struct{…}`

                  - `Name string`

                  - `Type Function`

                    - `const FunctionFunction Function = "function"`

                  - `AllowedCallers []string`

                    The tool invocation context(s).

                    - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                    - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                  - `DeferLoading bool`

                    Whether this function should be deferred and discovered via tool search.

                  - `Description string`

                  - `OutputSchema map[string, any]`

                    A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                  - `Parameters any`

                  - `Strict bool`

                    Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                - `type BetaCustomTool struct{…}`

                  A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `Type Namespace`

                The type of the tool. Always `namespace`.

                - `const NamespaceNamespace Namespace = "namespace"`

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

              - `Type ToolSearch`

                The type of the tool. Always `tool_search`.

                - `const ToolSearchToolSearch ToolSearch = "tool_search"`

              - `Description string`

                Description shown to the model for a client-executed tool search tool.

              - `Execution BetaToolSearchToolExecution`

                Whether tool search is executed by the server or by the client.

                - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

              - `Parameters any`

                Parameter schema for a client-executed tool search tool.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `Type BetaWebSearchPreviewToolType`

                The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

              - `SearchContentTypes []string`

                - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

              - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

              - `UserLocation BetaWebSearchPreviewToolUserLocation`

                The user's location.

                - `Type Approximate`

                  The type of location approximation. Always `approximate`.

                  - `const ApproximateApproximate Approximate = "approximate"`

                - `City string`

                  Free text input for the city of the user, e.g. `San Francisco`.

                - `Country string`

                  The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                - `Region string`

                  Free text input for the region of the user, e.g. `California`.

                - `Timezone string`

                  The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

              - `Type ApplyPatch`

                The type of the tool. Always `apply_patch`.

                - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

          - `Type ToolSearchOutput`

            The item type. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `ID string`

            The unique ID of this tool search output.

          - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution BetaResponseToolSearchOutputItemParamExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

            - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemParamStatus`

            The status of the tool search output.

            - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

        - `type BetaResponseInputItemAdditionalTools struct{…}`

          - `Role Developer`

            The role that provided the additional tools. Only `developer` is supported.

            - `const DeveloperDeveloper Developer = "developer"`

          - `Tools []BetaToolUnion`

            A list of additional tools made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The item type. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `ID string`

            The unique ID of this additional tools item.

          - `Agent BetaResponseInputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

          - `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`.

              - `const SummaryTextSummaryText SummaryText = "summary_text"`

          - `Type Reasoning`

            The type of the object. Always `reasoning`.

            - `const ReasoningReasoning Reasoning = "reasoning"`

          - `Agent BetaResponseReasoningItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Content []BetaResponseReasoningItemContent`

            Reasoning text content.

            - `Text string`

              The reasoning text from the model.

            - `Type ReasoningText`

              The type of the reasoning text. Always `reasoning_text`.

              - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

          - `EncryptedContent string`

            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.

          - `Status BetaResponseReasoningItemStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

            - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

            - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

        - `type BetaResponseCompactionItemParamResp struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `EncryptedContent string`

            The encrypted content of the compaction summary.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

            The ID of the compaction item.

          - `Agent BetaResponseCompactionItemParamAgentResp`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseInputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

          - `ID string`

            The unique ID of the code interpreter tool call.

          - `Code string`

            The code to run, or null if not available.

          - `ContainerID string`

            The ID of the container used to run the code.

          - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

            The outputs generated by the code interpreter, such as logs or images.
            Can be null if no outputs are available.

            - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

              The logs output from the code interpreter.

              - `Logs string`

                The logs output from the code interpreter.

              - `Type Logs`

                The type of the output. Always `logs`.

                - `const LogsLogs Logs = "logs"`

            - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

              The image output from the code interpreter.

              - `Type Image`

                The type of the output. Always `image`.

                - `const ImageImage Image = "image"`

              - `URL string`

                The URL of the image output from the code interpreter.

          - `Status BetaResponseCodeInterpreterToolCallStatus`

            The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

            - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

            - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

            - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

            - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

            - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

          - `Type CodeInterpreterCall`

            The type of the code interpreter tool call. Always `code_interpreter_call`.

            - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

          - `Agent BetaResponseCodeInterpreterToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCall struct{…}`

          A tool call to run a command on the local shell.

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseInputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemShellCall struct{…}`

          A tool representing a request to execute one or more shell commands.

          - `Action BetaResponseInputItemShellCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

              Ordered shell commands for the execution environment to run.

            - `MaxOutputLength int64`

              Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

            - `TimeoutMs int64`

              Maximum wall-clock time in milliseconds to allow the shell commands to run.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

            The environment to execute the shell commands in.

            - `type BetaLocalEnvironment struct{…}`

            - `type BetaContainerReference struct{…}`

          - `Status string`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

            - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

        - `type BetaResponseInputItemShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Output []BetaResponseFunctionShellCallOutputContent`

            Captured chunks of stdout and stderr output, along with their associated outcomes.

            - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

              The exit or timeout outcome associated with this shell call.

              - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  The exit code returned by the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              Captured stderr output for the shell call.

            - `Stdout string`

              Captured stdout output for the shell call.

          - `Type ShellCallOutput`

            The type of the item. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

            The unique ID of the shell tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `MaxOutputLength int64`

            The maximum number of UTF-8 characters captured for this shell call's combined output.

          - `Status string`

            The status of the shell call output.

            - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

            - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

            - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

        - `type BetaResponseInputItemApplyPatchCall struct{…}`

          A tool call representing a request to create, delete, or update files using diff patches.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

            The specific create, delete, or update instruction for the apply_patch tool call.

            - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply when creating the file.

              - `Path string`

                Path of the file to create relative to the workspace root.

              - `Type CreateFile`

                The operation type. Always `create_file`.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

                Path of the file to delete relative to the workspace root.

              - `Type DeleteFile`

                The operation type. Always `delete_file`.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

                Unified diff content to apply to the existing file.

              - `Path string`

                Path of the file to update relative to the workspace root.

              - `Type UpdateFile`

                The operation type. Always `update_file`.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status string`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

            - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status string`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

            - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `Output string`

            Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

        - `type BetaResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseInputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseInputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

            The unique ID of the approval response

          - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `type BetaResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseInputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

            - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

            - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

        - `type BetaResponseCustomToolCallOutput struct{…}`

          The output of a custom tool call from your code, being sent back to the model.

          - `CallID string`

            The call ID, used to map this custom tool call output to a custom tool call.

          - `Output BetaResponseCustomToolCallOutputOutputUnion`

            The output from the custom tool call generated by your code.
            Can be a string or an list of output content.

            - `string`

            - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              Text, image, or file output of the custom tool call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            The type of the custom tool call output. Always `custom_tool_call_output`.

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

            The unique ID of the custom tool call output in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

        - `type BetaResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

          - `CallID string`

            An identifier used to map this custom tool call to a tool call output.

          - `Input string`

            The input for the custom tool call generated by the model.

          - `Name string`

            The name of the custom tool being called.

          - `Type CustomToolCall`

            The type of the custom tool call. Always `custom_tool_call`.

            - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

          - `ID string`

            The unique ID of the custom tool call in the OpenAI platform.

          - `Agent BetaResponseCustomToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseCustomToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseCustomToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseCustomToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `Namespace string`

            The namespace of the custom tool being called.

        - `type BetaResponseInputItemCompactionTrigger struct{…}`

          Compacts the current context. Must be the final input item.

          - `Type CompactionTrigger`

            The type of the item. Always `compaction_trigger`.

            - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

          - `Agent BetaResponseInputItemCompactionTriggerAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

            The ID of the item to reference.

          - `Agent BetaResponseInputItemItemReferenceAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Type string`

            The type of item to reference. Always `item_reference`.

            - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

        - `type BetaResponseInputItemProgram struct{…}`

          - `ID string`

            The unique ID of this program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The item type. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseInputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseInputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of this program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output.

            - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

            - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The item type. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseInputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

    - `Instructions string`

      A system (or developer) message inserted into the model's context.

      When using along with `previous_response_id`, the instructions from a previous
      response will not be carried over to the next response. This makes it simple
      to swap out system (or developer) messages in new responses.

    - `MaxOutputTokens int64`

      An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

    - `MaxToolCalls int64`

      The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

    - `Metadata map[string, string]`

      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.

    - `Model BetaResponsesClientEventResponseCreateModel`

      Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
      offers a wide range of models with different capabilities, performance
      characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
      to browse and compare available models.

      - `BetaResponsesClientEventResponseCreateModel`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_6Sol BetaResponsesClientEventResponseCreateModel = "gpt-5.6-sol"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_6Terra BetaResponsesClientEventResponseCreateModel = "gpt-5.6-terra"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_6Luna BetaResponsesClientEventResponseCreateModel = "gpt-5.6-luna"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_4 BetaResponsesClientEventResponseCreateModel = "gpt-5.4"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_4Mini BetaResponsesClientEventResponseCreateModel = "gpt-5.4-mini"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_4Nano BetaResponsesClientEventResponseCreateModel = "gpt-5.4-nano"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_4Mini2026_03_17 BetaResponsesClientEventResponseCreateModel = "gpt-5.4-mini-2026-03-17"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_4Nano2026_03_17 BetaResponsesClientEventResponseCreateModel = "gpt-5.4-nano-2026-03-17"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_3ChatLatest BetaResponsesClientEventResponseCreateModel = "gpt-5.3-chat-latest"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_2 BetaResponsesClientEventResponseCreateModel = "gpt-5.2"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_2_2025_12_11 BetaResponsesClientEventResponseCreateModel = "gpt-5.2-2025-12-11"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_2ChatLatest BetaResponsesClientEventResponseCreateModel = "gpt-5.2-chat-latest"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_2Pro BetaResponsesClientEventResponseCreateModel = "gpt-5.2-pro"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_2Pro2025_12_11 BetaResponsesClientEventResponseCreateModel = "gpt-5.2-pro-2025-12-11"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_1 BetaResponsesClientEventResponseCreateModel = "gpt-5.1"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_1_2025_11_13 BetaResponsesClientEventResponseCreateModel = "gpt-5.1-2025-11-13"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_1Codex BetaResponsesClientEventResponseCreateModel = "gpt-5.1-codex"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_1Mini BetaResponsesClientEventResponseCreateModel = "gpt-5.1-mini"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_1ChatLatest BetaResponsesClientEventResponseCreateModel = "gpt-5.1-chat-latest"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5 BetaResponsesClientEventResponseCreateModel = "gpt-5"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5Mini BetaResponsesClientEventResponseCreateModel = "gpt-5-mini"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5Nano BetaResponsesClientEventResponseCreateModel = "gpt-5-nano"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_2025_08_07 BetaResponsesClientEventResponseCreateModel = "gpt-5-2025-08-07"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5Mini2025_08_07 BetaResponsesClientEventResponseCreateModel = "gpt-5-mini-2025-08-07"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5Nano2025_08_07 BetaResponsesClientEventResponseCreateModel = "gpt-5-nano-2025-08-07"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5ChatLatest BetaResponsesClientEventResponseCreateModel = "gpt-5-chat-latest"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_1 BetaResponsesClientEventResponseCreateModel = "gpt-4.1"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_1Mini BetaResponsesClientEventResponseCreateModel = "gpt-4.1-mini"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_1Nano BetaResponsesClientEventResponseCreateModel = "gpt-4.1-nano"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_1_2025_04_14 BetaResponsesClientEventResponseCreateModel = "gpt-4.1-2025-04-14"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_1Mini2025_04_14 BetaResponsesClientEventResponseCreateModel = "gpt-4.1-mini-2025-04-14"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_1Nano2025_04_14 BetaResponsesClientEventResponseCreateModel = "gpt-4.1-nano-2025-04-14"`

        - `const BetaResponsesClientEventResponseCreateModelO4Mini BetaResponsesClientEventResponseCreateModel = "o4-mini"`

        - `const BetaResponsesClientEventResponseCreateModelO4Mini2025_04_16 BetaResponsesClientEventResponseCreateModel = "o4-mini-2025-04-16"`

        - `const BetaResponsesClientEventResponseCreateModelO3 BetaResponsesClientEventResponseCreateModel = "o3"`

        - `const BetaResponsesClientEventResponseCreateModelO3_2025_04_16 BetaResponsesClientEventResponseCreateModel = "o3-2025-04-16"`

        - `const BetaResponsesClientEventResponseCreateModelO3Mini BetaResponsesClientEventResponseCreateModel = "o3-mini"`

        - `const BetaResponsesClientEventResponseCreateModelO3Mini2025_01_31 BetaResponsesClientEventResponseCreateModel = "o3-mini-2025-01-31"`

        - `const BetaResponsesClientEventResponseCreateModelO1 BetaResponsesClientEventResponseCreateModel = "o1"`

        - `const BetaResponsesClientEventResponseCreateModelO1_2024_12_17 BetaResponsesClientEventResponseCreateModel = "o1-2024-12-17"`

        - `const BetaResponsesClientEventResponseCreateModelO1Preview BetaResponsesClientEventResponseCreateModel = "o1-preview"`

        - `const BetaResponsesClientEventResponseCreateModelO1Preview2024_09_12 BetaResponsesClientEventResponseCreateModel = "o1-preview-2024-09-12"`

        - `const BetaResponsesClientEventResponseCreateModelO1Mini BetaResponsesClientEventResponseCreateModel = "o1-mini"`

        - `const BetaResponsesClientEventResponseCreateModelO1Mini2024_09_12 BetaResponsesClientEventResponseCreateModel = "o1-mini-2024-09-12"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4o BetaResponsesClientEventResponseCreateModel = "gpt-4o"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4o2024_11_20 BetaResponsesClientEventResponseCreateModel = "gpt-4o-2024-11-20"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4o2024_08_06 BetaResponsesClientEventResponseCreateModel = "gpt-4o-2024-08-06"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4o2024_05_13 BetaResponsesClientEventResponseCreateModel = "gpt-4o-2024-05-13"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oAudioPreview BetaResponsesClientEventResponseCreateModel = "gpt-4o-audio-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oAudioPreview2024_10_01 BetaResponsesClientEventResponseCreateModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oAudioPreview2024_12_17 BetaResponsesClientEventResponseCreateModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oAudioPreview2025_06_03 BetaResponsesClientEventResponseCreateModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oMiniAudioPreview BetaResponsesClientEventResponseCreateModel = "gpt-4o-mini-audio-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oMiniAudioPreview2024_12_17 BetaResponsesClientEventResponseCreateModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oSearchPreview BetaResponsesClientEventResponseCreateModel = "gpt-4o-search-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oMiniSearchPreview BetaResponsesClientEventResponseCreateModel = "gpt-4o-mini-search-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oSearchPreview2025_03_11 BetaResponsesClientEventResponseCreateModel = "gpt-4o-search-preview-2025-03-11"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oMiniSearchPreview2025_03_11 BetaResponsesClientEventResponseCreateModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const BetaResponsesClientEventResponseCreateModelChatgpt4oLatest BetaResponsesClientEventResponseCreateModel = "chatgpt-4o-latest"`

        - `const BetaResponsesClientEventResponseCreateModelCodexMiniLatest BetaResponsesClientEventResponseCreateModel = "codex-mini-latest"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oMini BetaResponsesClientEventResponseCreateModel = "gpt-4o-mini"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4oMini2024_07_18 BetaResponsesClientEventResponseCreateModel = "gpt-4o-mini-2024-07-18"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4Turbo BetaResponsesClientEventResponseCreateModel = "gpt-4-turbo"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4Turbo2024_04_09 BetaResponsesClientEventResponseCreateModel = "gpt-4-turbo-2024-04-09"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_0125Preview BetaResponsesClientEventResponseCreateModel = "gpt-4-0125-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4TurboPreview BetaResponsesClientEventResponseCreateModel = "gpt-4-turbo-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_1106Preview BetaResponsesClientEventResponseCreateModel = "gpt-4-1106-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4VisionPreview BetaResponsesClientEventResponseCreateModel = "gpt-4-vision-preview"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4 BetaResponsesClientEventResponseCreateModel = "gpt-4"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_0314 BetaResponsesClientEventResponseCreateModel = "gpt-4-0314"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_0613 BetaResponsesClientEventResponseCreateModel = "gpt-4-0613"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_32k BetaResponsesClientEventResponseCreateModel = "gpt-4-32k"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_32k0314 BetaResponsesClientEventResponseCreateModel = "gpt-4-32k-0314"`

        - `const BetaResponsesClientEventResponseCreateModelGPT4_32k0613 BetaResponsesClientEventResponseCreateModel = "gpt-4-32k-0613"`

        - `const BetaResponsesClientEventResponseCreateModelGPT3_5Turbo BetaResponsesClientEventResponseCreateModel = "gpt-3.5-turbo"`

        - `const BetaResponsesClientEventResponseCreateModelGPT3_5Turbo16k BetaResponsesClientEventResponseCreateModel = "gpt-3.5-turbo-16k"`

        - `const BetaResponsesClientEventResponseCreateModelGPT3_5Turbo0301 BetaResponsesClientEventResponseCreateModel = "gpt-3.5-turbo-0301"`

        - `const BetaResponsesClientEventResponseCreateModelGPT3_5Turbo0613 BetaResponsesClientEventResponseCreateModel = "gpt-3.5-turbo-0613"`

        - `const BetaResponsesClientEventResponseCreateModelGPT3_5Turbo1106 BetaResponsesClientEventResponseCreateModel = "gpt-3.5-turbo-1106"`

        - `const BetaResponsesClientEventResponseCreateModelGPT3_5Turbo0125 BetaResponsesClientEventResponseCreateModel = "gpt-3.5-turbo-0125"`

        - `const BetaResponsesClientEventResponseCreateModelGPT3_5Turbo16k0613 BetaResponsesClientEventResponseCreateModel = "gpt-3.5-turbo-16k-0613"`

        - `const BetaResponsesClientEventResponseCreateModelO1Pro BetaResponsesClientEventResponseCreateModel = "o1-pro"`

        - `const BetaResponsesClientEventResponseCreateModelO1Pro2025_03_19 BetaResponsesClientEventResponseCreateModel = "o1-pro-2025-03-19"`

        - `const BetaResponsesClientEventResponseCreateModelO3Pro BetaResponsesClientEventResponseCreateModel = "o3-pro"`

        - `const BetaResponsesClientEventResponseCreateModelO3Pro2025_06_10 BetaResponsesClientEventResponseCreateModel = "o3-pro-2025-06-10"`

        - `const BetaResponsesClientEventResponseCreateModelO3DeepResearch BetaResponsesClientEventResponseCreateModel = "o3-deep-research"`

        - `const BetaResponsesClientEventResponseCreateModelO3DeepResearch2025_06_26 BetaResponsesClientEventResponseCreateModel = "o3-deep-research-2025-06-26"`

        - `const BetaResponsesClientEventResponseCreateModelO4MiniDeepResearch BetaResponsesClientEventResponseCreateModel = "o4-mini-deep-research"`

        - `const BetaResponsesClientEventResponseCreateModelO4MiniDeepResearch2025_06_26 BetaResponsesClientEventResponseCreateModel = "o4-mini-deep-research-2025-06-26"`

        - `const BetaResponsesClientEventResponseCreateModelComputerUsePreview BetaResponsesClientEventResponseCreateModel = "computer-use-preview"`

        - `const BetaResponsesClientEventResponseCreateModelComputerUsePreview2025_03_11 BetaResponsesClientEventResponseCreateModel = "computer-use-preview-2025-03-11"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5Codex BetaResponsesClientEventResponseCreateModel = "gpt-5-codex"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5Pro BetaResponsesClientEventResponseCreateModel = "gpt-5-pro"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5Pro2025_10_06 BetaResponsesClientEventResponseCreateModel = "gpt-5-pro-2025-10-06"`

        - `const BetaResponsesClientEventResponseCreateModelGPT5_1CodexMax BetaResponsesClientEventResponseCreateModel = "gpt-5.1-codex-max"`

      - `string`

    - `Moderation BetaResponsesClientEventResponseCreateModeration`

      Configuration for running moderation on the input and output of this response.

      - `Model string`

        The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'.

      - `Policy BetaResponsesClientEventResponseCreateModerationPolicy`

        The policy to apply to moderated response input and output.

        - `Input BetaResponsesClientEventResponseCreateModerationPolicyInput`

          The moderation policy for the response input.

          - `Mode string`

            - `const BetaResponsesClientEventResponseCreateModerationPolicyInputModeScore BetaResponsesClientEventResponseCreateModerationPolicyInputMode = "score"`

            - `const BetaResponsesClientEventResponseCreateModerationPolicyInputModeBlock BetaResponsesClientEventResponseCreateModerationPolicyInputMode = "block"`

        - `Output BetaResponsesClientEventResponseCreateModerationPolicyOutput`

          The moderation policy for the response output.

          - `Mode string`

            - `const BetaResponsesClientEventResponseCreateModerationPolicyOutputModeScore BetaResponsesClientEventResponseCreateModerationPolicyOutputMode = "score"`

            - `const BetaResponsesClientEventResponseCreateModerationPolicyOutputModeBlock BetaResponsesClientEventResponseCreateModerationPolicyOutputMode = "block"`

    - `MultiAgent BetaResponsesClientEventResponseCreateMultiAgent`

      Configuration for server-hosted multi-agent execution.

      - `Enabled bool`

        Whether to enable server-hosted multi-agent execution for this response.

      - `MaxConcurrentSubagents int64`

        `max_concurrent_subagents` sets the maximum number of subagents that can be active simultaneously across the entire agent tree. It includes all descendants—children, grandchildren, and deeper subagents—but excludes the root agent.
        The API does not impose a fixed upper bound on this setting. The default is `3`, which is recommended for most workloads. Multi-agent runs also have no fixed limit on tree depth or the total number of subagents created during a run.

    - `ParallelToolCalls bool`

      Whether to allow the model to run tool calls in parallel.

    - `PreviousResponseID string`

      The unique ID of the previous response to the model. Use this to
      create multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

    - `Prompt BetaResponsePrompt`

      Reference to a prompt template and its variables.
      [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

      - `ID string`

        The unique identifier of the prompt template to use.

      - `Variables map[string, BetaResponsePromptVariableUnion]`

        Optional map of values to substitute in for variables in your
        prompt. The substitution values can either be strings, or other
        Response input types like images or files.

        - `string`

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

        Optional version of the prompt template.

    - `PromptCacheKey string`

      Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

    - `PromptCacheOptions BetaResponsesClientEventResponseCreatePromptCacheOptions`

      Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details.

      - `Mode string`

        Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.

        - `const BetaResponsesClientEventResponseCreatePromptCacheOptionsModeImplicit BetaResponsesClientEventResponseCreatePromptCacheOptionsMode = "implicit"`

        - `const BetaResponsesClientEventResponseCreatePromptCacheOptionsModeExplicit BetaResponsesClientEventResponseCreatePromptCacheOptionsMode = "explicit"`

      - `Ttl string`

        The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.

        - `const BetaResponsesClientEventResponseCreatePromptCacheOptionsTtl30m BetaResponsesClientEventResponseCreatePromptCacheOptionsTtl = "30m"`

    - `PromptCacheRetention string`

      Deprecated. Use `prompt_cache_options.ttl` instead.

      The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
      This field expresses a maximum retention policy, while
      `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
      fields are independent and do not interact.
      For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

      For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

      - Organizations without ZDR enabled default to `24h`.
      - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

      - `const BetaResponsesClientEventResponseCreatePromptCacheRetentionInMemory BetaResponsesClientEventResponseCreatePromptCacheRetention = "in_memory"`

      - `const BetaResponsesClientEventResponseCreatePromptCacheRetention24h BetaResponsesClientEventResponseCreatePromptCacheRetention = "24h"`

    - `Reasoning BetaResponsesClientEventResponseCreateReasoning`

      **gpt-5 and o-series models only**

      Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

      - `Context string`

        Controls which reasoning items are rendered back to the model on later turns.
        If omitted or set to `auto`, the model determines the context mode. The
        `gpt-5.6` model family defaults to `all_turns`; earlier models default to
        `current_turn`.

        When returned on a response, this is the effective reasoning context mode
        used for the response.

        - `const BetaResponsesClientEventResponseCreateReasoningContextAuto BetaResponsesClientEventResponseCreateReasoningContext = "auto"`

        - `const BetaResponsesClientEventResponseCreateReasoningContextCurrentTurn BetaResponsesClientEventResponseCreateReasoningContext = "current_turn"`

        - `const BetaResponsesClientEventResponseCreateReasoningContextAllTurns BetaResponsesClientEventResponseCreateReasoningContext = "all_turns"`

      - `Effort string`

        Constrains effort on reasoning for reasoning models. Currently supported
        values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
        Reducing reasoning effort can result in faster responses and fewer tokens
        used on reasoning in a response. Not all reasoning models support every
        value. See the
        [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
        for model-specific support.

        - `const BetaResponsesClientEventResponseCreateReasoningEffortNone BetaResponsesClientEventResponseCreateReasoningEffort = "none"`

        - `const BetaResponsesClientEventResponseCreateReasoningEffortMinimal BetaResponsesClientEventResponseCreateReasoningEffort = "minimal"`

        - `const BetaResponsesClientEventResponseCreateReasoningEffortLow BetaResponsesClientEventResponseCreateReasoningEffort = "low"`

        - `const BetaResponsesClientEventResponseCreateReasoningEffortMedium BetaResponsesClientEventResponseCreateReasoningEffort = "medium"`

        - `const BetaResponsesClientEventResponseCreateReasoningEffortHigh BetaResponsesClientEventResponseCreateReasoningEffort = "high"`

        - `const BetaResponsesClientEventResponseCreateReasoningEffortXhigh BetaResponsesClientEventResponseCreateReasoningEffort = "xhigh"`

        - `const BetaResponsesClientEventResponseCreateReasoningEffortMax BetaResponsesClientEventResponseCreateReasoningEffort = "max"`

      - `GenerateSummary string`

        **Deprecated:** use `summary` instead.

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        - `const BetaResponsesClientEventResponseCreateReasoningGenerateSummaryAuto BetaResponsesClientEventResponseCreateReasoningGenerateSummary = "auto"`

        - `const BetaResponsesClientEventResponseCreateReasoningGenerateSummaryConcise BetaResponsesClientEventResponseCreateReasoningGenerateSummary = "concise"`

        - `const BetaResponsesClientEventResponseCreateReasoningGenerateSummaryDetailed BetaResponsesClientEventResponseCreateReasoningGenerateSummary = "detailed"`

      - `Mode string`

        Controls the reasoning execution mode for the request.

        When returned on a response, this is the effective execution mode.

        - `string`

        - `string`

          - `const BetaResponsesClientEventResponseCreateReasoningModeStandard BetaResponsesClientEventResponseCreateReasoningMode = "standard"`

          - `const BetaResponsesClientEventResponseCreateReasoningModePro BetaResponsesClientEventResponseCreateReasoningMode = "pro"`

      - `Summary string`

        A summary of the reasoning performed by the model. This can be
        useful for debugging and understanding the model's reasoning process.
        One of `auto`, `concise`, or `detailed`.

        `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

        - `const BetaResponsesClientEventResponseCreateReasoningSummaryAuto BetaResponsesClientEventResponseCreateReasoningSummary = "auto"`

        - `const BetaResponsesClientEventResponseCreateReasoningSummaryConcise BetaResponsesClientEventResponseCreateReasoningSummary = "concise"`

        - `const BetaResponsesClientEventResponseCreateReasoningSummaryDetailed BetaResponsesClientEventResponseCreateReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

      A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
      The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `ServiceTier string`

      Specifies the processing type used for serving the request.

      - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
      - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
      - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
      - When not set, the default behavior is 'auto'.

      When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

      - `const BetaResponsesClientEventResponseCreateServiceTierAuto BetaResponsesClientEventResponseCreateServiceTier = "auto"`

      - `const BetaResponsesClientEventResponseCreateServiceTierDefault BetaResponsesClientEventResponseCreateServiceTier = "default"`

      - `const BetaResponsesClientEventResponseCreateServiceTierFlex BetaResponsesClientEventResponseCreateServiceTier = "flex"`

      - `const BetaResponsesClientEventResponseCreateServiceTierScale BetaResponsesClientEventResponseCreateServiceTier = "scale"`

      - `const BetaResponsesClientEventResponseCreateServiceTierPriority BetaResponsesClientEventResponseCreateServiceTier = "priority"`

    - `Store bool`

      Whether to store the generated model response for later retrieval via
      API.

    - `Stream bool`

      If set to true, the model response data will be streamed to the client
      as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
      See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
      for more information.

    - `StreamOptions BetaResponsesClientEventResponseCreateStreamOptions`

      Options for streaming responses. Only set this when you set `stream: true`.

      - `IncludeObfuscation bool`

        When true, stream obfuscation will be enabled. Stream obfuscation adds
        random characters to an `obfuscation` field on streaming delta events to
        normalize payload sizes as a mitigation to certain side-channel attacks.
        These obfuscation fields are included by default, but add a small amount
        of overhead to the data stream. You can set `include_obfuscation` to
        false to optimize for bandwidth if you trust the network links between
        your application and the OpenAI API.

    - `Temperature float64`

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
      We generally recommend altering this or `top_p` but not both.

    - `Text BetaResponseTextConfig`

      Configuration options for a text response from the model. Can be plain
      text or structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

      - `Format BetaResponseFormatTextConfigUnion`

        An object specifying the format that the model must output.

        Configuring `{ "type": "json_schema" }` enables Structured Outputs,
        which ensures the model will match your supplied JSON schema. Learn more in the
        [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

        The default format is `{ "type": "text" }` with no additional options.

        **Not recommended for gpt-4o and newer models:**

        Setting to `{ "type": "json_object" }` enables the older JSON mode, which
        ensures the message the model generates is valid JSON. Using `json_schema`
        is preferred for models that support it.

        - `type BetaResponseFormatTextConfigText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            The type of response format being defined. Always `text`.

            - `const TextText Text = "text"`

        - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

          JSON Schema response format. Used to generate structured JSON responses.
          Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

          - `Name string`

            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.

          - `Schema map[string, any]`

            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).

          - `Type JSONSchema`

            The type of response format being defined. Always `json_schema`.

            - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

          - `Description string`

            A description of what the response format is for, used by the model to
            determine how to respond in the format.

          - `Strict bool`

            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).

        - `type BetaResponseFormatTextConfigJSONObject struct{…}`

          JSON object response format. An older method of generating JSON responses.
          Using `json_schema` is recommended for models that support it. Note that the
          model will not generate JSON without a system or user message instructing it
          to do so.

          - `Type JSONObject`

            The type of response format being defined. Always `json_object`.

            - `const JSONObjectJSONObject JSONObject = "json_object"`

      - `Verbosity BetaResponseTextConfigVerbosity`

        Constrains the verbosity of the model's response. Lower values will result in
        more concise responses, while higher values will result in more verbose responses.
        Currently supported values are `low`, `medium`, and `high`. The default is
        `medium`.

        - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

        - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

        - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

    - `ToolChoice BetaResponsesClientEventResponseCreateToolChoiceUnion`

      How the model should select which tool (or tools) to use when generating
      a response. See the `tools` parameter to see how to specify which tools
      the model can call.

      - `type BetaToolChoiceOptions string`

        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a message.

        `auto` means the model can pick between generating a message or calling one or
        more tools.

        `required` means the model must call one or more tools.

        - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

        - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

        - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

      - `type BetaToolChoiceAllowed struct{…}`

        Constrains the tools available to the model to a pre-defined set.

        - `Mode BetaToolChoiceAllowedMode`

          Constrains the tools available to the model to a pre-defined set.

          `auto` allows the model to pick from among the allowed tools and generate a
          message.

          `required` requires the model to call one or more of the allowed tools.

          - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

          - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

        - `Tools []map[string, any]`

          A list of tool definitions that the model should be allowed to call.

          For the Responses API, the list of tool definitions might look like:

          ```json
          [
            { "type": "function", "name": "get_weather" },
            { "type": "mcp", "server_label": "deepwiki" },
            { "type": "image_generation" }
          ]
          ```

        - `Type AllowedTools`

          Allowed tool configuration type. Always `allowed_tools`.

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type BetaToolChoiceTypes struct{…}`

        Indicates that the model should use a built-in tool to generate a response.
        [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

        - `Type BetaToolChoiceTypesType`

          The type of hosted tool the model should to use. Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).

          Allowed values are:

          - `file_search`
          - `web_search_preview`
          - `computer`
          - `computer_use_preview`
          - `computer_use`
          - `code_interpreter`
          - `image_generation`

          - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

          - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

          - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

          - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

          - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

          - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

      - `type BetaToolChoiceFunction struct{…}`

        Use this option to force the model to call a specific function.

        - `Name string`

          The name of the function to call.

        - `Type Function`

          For function calling, the type is always `function`.

          - `const FunctionFunction Function = "function"`

      - `type BetaToolChoiceMcp struct{…}`

        Use this option to force the model to call a specific tool on a remote MCP server.

        - `ServerLabel string`

          The label of the MCP server to use.

        - `Type Mcp`

          For MCP tools, the type is always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

          The name of the tool to call on the server.

      - `type BetaToolChoiceCustom struct{…}`

        Use this option to force the model to call a specific custom tool.

        - `Name string`

          The name of the custom tool to call.

        - `Type Custom`

          For custom tool calling, the type is always `custom`.

          - `const CustomCustom Custom = "custom"`

      - `BetaResponsesClientEventResponseCreateToolChoiceBetaSpecificProgrammaticToolCallingParam`

        - `Type ProgrammaticToolCalling`

          The tool to call. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolChoiceApplyPatch struct{…}`

        Forces the model to call the apply_patch tool when executing a tool call.

        - `Type ApplyPatch`

          The tool to call. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type BetaToolChoiceShell struct{…}`

        Forces the model to call the shell tool when a tool call is required.

        - `Type Shell`

          The tool to call. Always `shell`.

          - `const ShellShell Shell = "shell"`

    - `Tools []BetaToolUnion`

      An array of tools the model may call while generating a response. You
      can specify which tool to use by setting the `tool_choice` parameter.

      We support the following categories of tools:

      - **Built-in tools**: Tools that are provided by OpenAI that extend the
        model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
        or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).
      - **MCP Tools**: Integrations with third-party systems via custom MCP servers
        or predefined connectors such as Google Drive and SharePoint. Learn more about
        [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
      - **Function calls (custom tools)**: Functions that are defined by you,
        enabling the model to call your own code with strongly typed arguments
        and outputs. Learn more about
        [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
        custom tools to call your own code.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `TopLogprobs int64`

      An integer between 0 and 20 specifying the maximum number of most likely
      tokens to return at each token position, each with an associated log
      probability. In some cases, the number of returned tokens may be fewer than
      requested.

    - `TopP float64`

      An alternative to sampling with temperature, called nucleus sampling,
      where the model considers the results of the tokens with top_p probability
      mass. So 0.1 means only the tokens comprising the top 10% probability mass
      are considered.

      We generally recommend altering this or `temperature` but not both.

    - `Truncation string`

      The truncation strategy to use for the model response.

      - `auto`: If the input to this Response exceeds
        the model's context window size, the model will truncate the
        response to fit the context window by dropping items from the beginning of the conversation.
      - `disabled` (default): If the input size will exceed the context window
        size for a model, the request will fail with a 400 error.

      - `const BetaResponsesClientEventResponseCreateTruncationAuto BetaResponsesClientEventResponseCreateTruncation = "auto"`

      - `const BetaResponsesClientEventResponseCreateTruncationDisabled BetaResponsesClientEventResponseCreateTruncation = "disabled"`

    - `User string`

      This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
      A stable identifier for your end-users.
      Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

  - `type BetaResponseInjectEvent struct{…}`

    Injects input items into an active response over a WebSocket connection.
    The items are validated and committed atomically. Currently, the server
    accepts client-owned tool outputs that resume a waiting agent.

    - `Input []BetaResponseInputItemUnion`

      Input items to inject into the active response.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

      - `type BetaResponseInputItemToolSearchCall struct{…}`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

      - `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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

        A tool call to run a command on the local shell.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

      - `type BetaResponseCustomToolCallOutput struct{…}`

        The output of a custom tool call from your code, being sent back to the model.

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

      - `type BetaResponseInputItemProgram struct{…}`

      - `type BetaResponseInputItemProgramOutput struct{…}`

    - `ResponseID string`

      The ID of the active response that should receive the input.

    - `Type ResponseInject`

      The event discriminator. Always `response.inject`.

      - `const ResponseInjectResponseInject ResponseInject = "response.inject"`

### Beta Responses Server Event

- `type BetaResponsesServerEventUnion interface{…}`

  Server events emitted by the Responses WebSocket server.

  - `type BetaResponseAudioDeltaEvent struct{…}`

    Emitted when there is a partial audio response.

    - `Delta string`

      A chunk of Base64 encoded response audio bytes.

    - `SequenceNumber int64`

      A sequence number for this chunk of the stream response.

    - `Type ResponseAudioDelta`

      The type of the event. Always `response.audio.delta`.

      - `const ResponseAudioDeltaResponseAudioDelta ResponseAudioDelta = "response.audio.delta"`

    - `Agent BetaResponseAudioDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseAudioDoneEvent struct{…}`

    Emitted when the audio response is complete.

    - `SequenceNumber int64`

      The sequence number of the delta.

    - `Type ResponseAudioDone`

      The type of the event. Always `response.audio.done`.

      - `const ResponseAudioDoneResponseAudioDone ResponseAudioDone = "response.audio.done"`

    - `Agent BetaResponseAudioDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseAudioTranscriptDeltaEvent struct{…}`

    Emitted when there is a partial transcript of audio.

    - `Delta string`

      The partial transcript of the audio response.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseAudioTranscriptDelta`

      The type of the event. Always `response.audio.transcript.delta`.

      - `const ResponseAudioTranscriptDeltaResponseAudioTranscriptDelta ResponseAudioTranscriptDelta = "response.audio.transcript.delta"`

    - `Agent BetaResponseAudioTranscriptDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseAudioTranscriptDoneEvent struct{…}`

    Emitted when the full audio transcript is completed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseAudioTranscriptDone`

      The type of the event. Always `response.audio.transcript.done`.

      - `const ResponseAudioTranscriptDoneResponseAudioTranscriptDone ResponseAudioTranscriptDone = "response.audio.transcript.done"`

    - `Agent BetaResponseAudioTranscriptDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallCodeDeltaEvent struct{…}`

    Emitted when a partial code snippet is streamed by the code interpreter.

    - `Delta string`

      The partial code snippet being streamed by the code interpreter.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code is being streamed.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallCodeDelta`

      The type of the event. Always `response.code_interpreter_call_code.delta`.

      - `const ResponseCodeInterpreterCallCodeDeltaResponseCodeInterpreterCallCodeDelta ResponseCodeInterpreterCallCodeDelta = "response.code_interpreter_call_code.delta"`

    - `Agent BetaResponseCodeInterpreterCallCodeDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallCodeDoneEvent struct{…}`

    Emitted when the code snippet is finalized by the code interpreter.

    - `Code string`

      The final code snippet output by the code interpreter.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code is finalized.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallCodeDone`

      The type of the event. Always `response.code_interpreter_call_code.done`.

      - `const ResponseCodeInterpreterCallCodeDoneResponseCodeInterpreterCallCodeDone ResponseCodeInterpreterCallCodeDone = "response.code_interpreter_call_code.done"`

    - `Agent BetaResponseCodeInterpreterCallCodeDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallCompletedEvent struct{…}`

    Emitted when the code interpreter call is completed.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code interpreter call is completed.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallCompleted`

      The type of the event. Always `response.code_interpreter_call.completed`.

      - `const ResponseCodeInterpreterCallCompletedResponseCodeInterpreterCallCompleted ResponseCodeInterpreterCallCompleted = "response.code_interpreter_call.completed"`

    - `Agent BetaResponseCodeInterpreterCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallInProgressEvent struct{…}`

    Emitted when a code interpreter call is in progress.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code interpreter call is in progress.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallInProgress`

      The type of the event. Always `response.code_interpreter_call.in_progress`.

      - `const ResponseCodeInterpreterCallInProgressResponseCodeInterpreterCallInProgress ResponseCodeInterpreterCallInProgress = "response.code_interpreter_call.in_progress"`

    - `Agent BetaResponseCodeInterpreterCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterCallInterpretingEvent struct{…}`

    Emitted when the code interpreter is actively interpreting the code snippet.

    - `ItemID string`

      The unique identifier of the code interpreter tool call item.

    - `OutputIndex int64`

      The index of the output item in the response for which the code interpreter is interpreting code.

    - `SequenceNumber int64`

      The sequence number of this event, used to order streaming events.

    - `Type ResponseCodeInterpreterCallInterpreting`

      The type of the event. Always `response.code_interpreter_call.interpreting`.

      - `const ResponseCodeInterpreterCallInterpretingResponseCodeInterpreterCallInterpreting ResponseCodeInterpreterCallInterpreting = "response.code_interpreter_call.interpreting"`

    - `Agent BetaResponseCodeInterpreterCallInterpretingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCompletedEvent struct{…}`

    Emitted when the model response is complete.

    - `Response BetaResponse`

      Properties of the completed response.

      - `ID string`

        Unique identifier for this Response.

      - `CreatedAt float64`

        Unix timestamp (in seconds) of when this Response was created.

      - `Error BetaResponseError`

        An error object returned when the model fails to generate a Response.

        - `Code BetaResponseErrorCode`

          The error code for the response.

          - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"`

          - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"`

          - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

          - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

          - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

          - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`

          - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"`

          - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"`

          - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"`

          - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"`

          - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"`

          - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"`

          - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"`

          - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"`

          - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"`

          - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"`

          - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"`

          - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"`

          - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"`

          - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"`

        - `Message string`

          A human-readable description of the error.

      - `IncompleteDetails BetaResponseIncompleteDetails`

        Details about why the response is incomplete.

        - `Reason string`

          The reason why the response is incomplete.

          - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"`

          - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"`

      - `Instructions BetaResponseInstructionsUnion`

        A system (or developer) message inserted into the model's context.

        When using along with `previous_response_id`, the instructions from a previous
        response will not be carried over to the next response. This makes it simple
        to swap out system (or developer) messages in new responses.

        - `string`

        - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion`

          A list of one or many input items to the model, containing
          different content types.

          - `type BetaEasyInputMessage struct{…}`

            A message input to the model with a role indicating instruction following
            hierarchy. Instructions given with the `developer` or `system` role take
            precedence over instructions given with the `user` role. Messages with the
            `assistant` role are presumed to have been generated by the model in previous
            interactions.

            - `Content BetaEasyInputMessageContentUnion`

              Text, image, or audio input to the model, used to generate a response.
              Can also contain previous assistant responses.

              - `string`

              - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

                A list of one or many input items to the model, containing different content
                types.

                - `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`.

                    - `const InputTextInputText InputText = "input_text"`

                  - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputImage struct{…}`

                  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                  - `Detail BetaResponseInputImageDetail`

                    The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                    - `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`.

                    - `const InputImageInputImage InputImage = "input_image"`

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `ImageURL string`

                    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                  - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputFile struct{…}`

                  A file input to the model.

                  - `Type InputFile`

                    The type of the input item. Always `input_file`.

                    - `const InputFileInputFile InputFile = "input_file"`

                  - `Detail BetaResponseInputFileDetail`

                    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`.

                    - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                    - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                    - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

                  - `FileData string`

                    The content of the file to be sent to the model.

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `FileURL string`

                    The URL of the file to be sent to the model.

                  - `Filename string`

                    The name of the file to be sent to the model.

                  - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

            - `Role BetaEasyInputMessageRole`

              The role of the message input. One of `user`, `assistant`, `system`, or
              `developer`.

              - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

              - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

              - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

              - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

            - `Phase BetaEasyInputMessagePhase`

              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.

              - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

              - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

            - `Type BetaEasyInputMessageType`

              The type of the message input. Always `message`.

              - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

          - `type BetaResponseInputItemMessage struct{…}`

            A message input to the model with a role indicating instruction following
            hierarchy. Instructions given with the `developer` or `system` role take
            precedence over instructions given with the `user` role.

            - `Content BetaResponseInputMessageContentList`

              A list of one or many input items to the model, containing different content
              types.

            - `Role string`

              The role of the message input. One of `user`, `system`, or `developer`.

              - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

              - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

              - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

            - `Agent BetaResponseInputItemMessageAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Status string`

              The status of item. One of `in_progress`, `completed`, or
              `incomplete`. Populated when items are returned via API.

              - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

              - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

              - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

            - `Type string`

              The type of the message input. Always set to `message`.

              - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

          - `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.

              - `type BetaResponseOutputText struct{…}`

                A text output from the model.

                - `Annotations []BetaResponseOutputTextAnnotationUnion`

                  The annotations of the text output.

                  - `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`.

                      - `const FileCitationFileCitation FileCitation = "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`.

                      - `const URLCitationURLCitation URLCitation = "url_citation"`

                    - `URL string`

                      The URL of the web resource.

                  - `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`.

                      - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                      - `const FilePathFilePath FilePath = "file_path"`

                - `Text string`

                  The text output from the model.

                - `Type OutputText`

                  The type of the output text. Always `output_text`.

                  - `const OutputTextOutputText OutputText = "output_text"`

                - `Logprobs []BetaResponseOutputTextLogprob`

                  - `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`.

                  - `const RefusalRefusal Refusal = "refusal"`

            - `Role Assistant`

              The role of the output message. Always `assistant`.

              - `const AssistantAssistant Assistant = "assistant"`

            - `Status BetaResponseOutputMessageStatus`

              The status of the message input. One of `in_progress`, `completed`, or
              `incomplete`. Populated when input items are returned via API.

              - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

              - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

              - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

            - `Type Message`

              The type of the output message. Always `message`.

              - `const MessageMessage Message = "message"`

            - `Agent BetaResponseOutputMessageAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Phase BetaResponseOutputMessagePhase`

              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.

              - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

              - `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`.

              - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

            - `Agent BetaResponseFileSearchToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Results []BetaResponseFileSearchToolCallResult`

              The results of the file search tool call.

              - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

                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.

                - `string`

                - `float64`

                - `bool`

              - `FileID string`

                The unique ID of the file.

              - `Filename string`

                The name of the file.

              - `Score float64`

                The relevance score of the file - a value between 0 and 1.

              - `Text string`

                The text that was retrieved from the file.

          - `type BetaResponseComputerToolCall struct{…}`

            A tool call to a computer use tool. See the
            [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

                The type of the pending safety check.

              - `Message string`

                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.

              - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

              - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

              - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

            - `Type BetaResponseComputerToolCallType`

              The type of the computer call. Always `computer_call`.

              - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

            - `Action BetaComputerActionUnion`

              A click action.

              - `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`.

                  - `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`.

                  - `const ClickClick Click = "click"`

                - `X int64`

                  The x-coordinate where the click occurred.

                - `Y int64`

                  The y-coordinate where the click occurred.

                - `Keys []string`

                  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`.

                  - `const DoubleClickDoubleClick DoubleClick = "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`.

                  - `const DragDrag Drag = "drag"`

                - `Keys []string`

                  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`.

                  - `const KeypressKeypress Keypress = "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`.

                  - `const MoveMove Move = "move"`

                - `X int64`

                  The x-coordinate to move to.

                - `Y int64`

                  The y-coordinate to move to.

                - `Keys []string`

                  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`.

                  - `const ScreenshotScreenshot Screenshot = "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`.

                  - `const ScrollScroll Scroll = "scroll"`

                - `X int64`

                  The x-coordinate where the scroll occurred.

                - `Y int64`

                  The y-coordinate where the scroll occurred.

                - `Keys []string`

                  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`.

                  - `const TypeType Type = "type"`

              - `type BetaComputerActionWait struct{…}`

                A wait action.

                - `Type Wait`

                  Specifies the event type. For a wait action, this property is always set to `wait`.

                  - `const WaitWait Wait = "wait"`

            - `Actions BetaComputerActionList`

              Flattened batched actions for `computer_use`. Each action includes an
              `type` discriminator and action-specific fields.

              - `type BetaComputerActionClick struct{…}`

                A click action.

              - `type BetaComputerActionDoubleClick struct{…}`

                A double click action.

              - `type BetaComputerActionDrag struct{…}`

                A drag action.

              - `type BetaComputerActionKeypress struct{…}`

                A collection of keypresses the model would like to perform.

              - `type BetaComputerActionMove struct{…}`

                A mouse move action.

              - `type BetaComputerActionScreenshot struct{…}`

                A screenshot action.

              - `type BetaComputerActionScroll struct{…}`

                A scroll action.

              - `type BetaComputerActionType struct{…}`

                An action to type in text.

              - `type BetaComputerActionWait struct{…}`

                A wait action.

            - `Agent BetaResponseComputerToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemComputerCallOutput struct{…}`

            The output of a computer tool call.

            - `CallID string`

              The ID of the computer tool call that produced the output.

            - `Output BetaResponseComputerToolCallOutputScreenshot`

              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`.

                - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

              - `FileID string`

                The identifier of an uploaded file that contains the screenshot.

              - `ImageURL string`

                The URL of the screenshot image.

            - `Type ComputerCallOutput`

              The type of the computer tool call output. Always `computer_call_output`.

              - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

            - `ID string`

              The ID of the computer tool call output.

            - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

              The safety checks reported by the API that have been acknowledged by the developer.

              - `ID string`

                The ID of the pending safety check.

              - `Code string`

                The type of the pending safety check.

              - `Message string`

                Details about the pending safety check.

            - `Agent BetaResponseInputItemComputerCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Status string`

              The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

              - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

              - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

          - `type BetaResponseFunctionWebSearch struct{…}`

            The results of a web search tool call. See the
            [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

            - `ID string`

              The unique ID of the web search tool call.

            - `Action BetaResponseFunctionWebSearchActionUnion`

              An object describing the specific action taken in this web search call.
              Includes details on how the model used the web (search, open_page, find_in_page).

              - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

                Action type "search" - Performs a web search query.

                - `Type Search`

                  The action type.

                  - `const SearchSearch Search = "search"`

                - `Queries []string`

                  The search queries.

                - `Query string`

                  The search query.

                - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

                  The sources used in the search.

                  - `Type URL`

                    The type of source. Always `url`.

                    - `const URLURL URL = "url"`

                  - `URL string`

                    The URL of the source.

              - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

                Action type "open_page" - Opens a specific URL from search results.

                - `Type OpenPage`

                  The action type.

                  - `const OpenPageOpenPage OpenPage = "open_page"`

                - `URL string`

                  The URL opened by the model.

              - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

                Action type "find_in_page": Searches for a pattern within a loaded page.

                - `Pattern string`

                  The pattern or text to search for within the page.

                - `Type FindInPage`

                  The action type.

                  - `const FindInPageFindInPage FindInPage = "find_in_page"`

                - `URL string`

                  The URL of the page searched for the pattern.

            - `Status BetaResponseFunctionWebSearchStatus`

              The status of the web search tool call.

              - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

              - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

              - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

              - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

            - `Type WebSearchCall`

              The type of the web search tool call. Always `web_search_call`.

              - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

            - `Agent BetaResponseFunctionWebSearchAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseFunctionToolCall struct{…}`

            A tool call to run a function. See the
            [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

              - `const FunctionCallFunctionCall FunctionCall = "function_call"`

            - `ID string`

              The unique ID of the function tool call.

            - `Agent BetaResponseFunctionToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseFunctionToolCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

                - `Type Direct`

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  - `const ProgramProgram Program = "program"`

            - `Namespace string`

              The namespace of the function to run.

            - `Status BetaResponseFunctionToolCallStatus`

              The status of the item. One of `in_progress`, `completed`, or
              `incomplete`. Populated when items are returned via API.

              - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

              - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

              - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

          - `type BetaResponseInputItemFunctionCallOutput struct{…}`

            The output of a function tool call.

            - `CallID string`

              The unique ID of the function tool call generated by the model.

            - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

              Text, image, or file output of the function tool call.

              - `string`

              - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

                An array of content outputs (text, image, file) for the function tool call.

                - `type BetaResponseInputTextContent 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`.

                    - `const InputTextInputText InputText = "input_text"`

                  - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputImageContent struct{…}`

                  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                  - `Type InputImage`

                    The type of the input item. Always `input_image`.

                    - `const InputImageInputImage InputImage = "input_image"`

                  - `Detail BetaResponseInputImageContentDetail`

                    The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                    - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                    - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                    - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                    - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `ImageURL string`

                    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

                  - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

                - `type BetaResponseInputFileContent struct{…}`

                  A file input to the model.

                  - `Type InputFile`

                    The type of the input item. Always `input_file`.

                    - `const InputFileInputFile InputFile = "input_file"`

                  - `Detail BetaResponseInputFileContentDetail`

                    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`.

                    - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                    - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                    - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

                  - `FileData string`

                    The base64-encoded data of the file to be sent to the model.

                  - `FileID string`

                    The ID of the file to be sent to the model.

                  - `FileURL string`

                    The URL of the file to be sent to the model.

                  - `Filename string`

                    The name of the file to be sent to the model.

                  - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                    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`.

                      - `const ExplicitExplicit Explicit = "explicit"`

            - `Type FunctionCallOutput`

              The type of the function tool call output. Always `function_call_output`.

              - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

            - `ID string`

              The unique ID of the function tool call output. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemFunctionCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `Status string`

              The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

              - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

              - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

          - `type BetaResponseInputItemAgentMessage struct{…}`

            A message routed between agents.

            - `Author string`

              The sending agent identity.

            - `Content []BetaResponseInputItemAgentMessageContentUnion`

              Plaintext, image, or encrypted content sent between agents.

              - `type BetaResponseInputTextContent struct{…}`

                A text input to the model.

              - `type BetaResponseInputImageContent struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

                  - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

            - `Recipient string`

              The destination agent identity.

            - `Type AgentMessage`

              The item type. Always `agent_message`.

              - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

            - `ID string`

              The unique ID of this agent message item.

            - `Agent BetaResponseInputItemAgentMessageAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemMultiAgentCall struct{…}`

            - `Action string`

              The multi-agent action that was executed.

              - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

              - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

              - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

              - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

              - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

              - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

            - `Arguments string`

              The action arguments as a JSON string.

            - `CallID string`

              The unique ID linking this call to its output.

            - `Type MultiAgentCall`

              The item type. Always `multi_agent_call`.

              - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

            - `ID string`

              The unique ID of this multi-agent call.

            - `Agent BetaResponseInputItemMultiAgentCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

            - `Action string`

              The multi-agent action that produced this result.

              - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

              - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

            - `CallID string`

              The unique ID of the multi-agent call.

            - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

              Text output returned by the multi-agent action.

              - `Text string`

                The text content.

              - `Type OutputText`

                The content type. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

              - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

                Citations associated with the text content.

                - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

                  - `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 citation type. Always `file_citation`.

                    - `const FileCitationFileCitation FileCitation = "file_citation"`

                - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

                  - `EndIndex int64`

                    The index of the last character of the citation in the message.

                  - `StartIndex int64`

                    The index of the first character of the citation in the message.

                  - `Title string`

                    The title of the cited resource.

                  - `Type URLCitation`

                    The citation type. Always `url_citation`.

                    - `const URLCitationURLCitation URLCitation = "url_citation"`

                  - `URL string`

                    The URL of the cited resource.

                - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

                  - `ContainerID string`

                    The ID of the container.

                  - `EndIndex int64`

                    The index of the last character of the citation in the message.

                  - `FileID string`

                    The ID of the container file.

                  - `Filename string`

                    The filename of the container file cited.

                  - `StartIndex int64`

                    The index of the first character of the citation in the message.

                  - `Type ContainerFileCitation`

                    The citation type. Always `container_file_citation`.

                    - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

            - `Type MultiAgentCallOutput`

              The item type. Always `multi_agent_call_output`.

              - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

            - `ID string`

              The unique ID of this multi-agent call output.

            - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemToolSearchCall struct{…}`

            - `Arguments any`

              The arguments supplied to the tool search call.

            - `Type ToolSearchCall`

              The item type. Always `tool_search_call`.

              - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

            - `ID string`

              The unique ID of this tool search call.

            - `Agent BetaResponseInputItemToolSearchCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `CallID string`

              The unique ID of the tool search call generated by the model.

            - `Execution string`

              Whether tool search was executed by the server or by the client.

              - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

              - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

            - `Status string`

              The status of the tool search call.

              - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

              - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

              - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

          - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

            - `Tools []BetaToolUnion`

              The loaded tool definitions returned by the tool search output.

              - `type BetaFunctionTool struct{…}`

                Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

                - `Name string`

                  The name of the function to call.

                - `Parameters map[string, any]`

                  A JSON schema object describing the parameters of the function.

                - `Strict bool`

                  Whether strict parameter validation is enforced for this function tool.

                - `Type Function`

                  The type of the function tool. Always `function`.

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

                  - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function is deferred and loaded via tool search.

                - `Description string`

                  A description of the function. Used by the model to determine whether or not to call the function.

                - `OutputSchema map[string, any]`

                  A JSON schema object describing the JSON value encoded in string outputs for this function.

              - `type BetaFileSearchTool struct{…}`

                A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

                - `Type FileSearch`

                  The type of the file search tool. Always `file_search`.

                  - `const FileSearchFileSearch FileSearch = "file_search"`

                - `VectorStoreIDs []string`

                  The IDs of the vector stores to search.

                - `Filters BetaFileSearchToolFiltersUnion`

                  A filter to apply.

                  - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                      - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                  - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                    Combine multiple filters using `and` or `or`.

                    - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                      Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                      - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                        A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                        - `Key string`

                          The key to compare against the value.

                        - `Type string`

                          Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                          - `eq`: equals
                          - `ne`: not equal
                          - `gt`: greater than
                          - `gte`: greater than or equal
                          - `lt`: less than
                          - `lte`: less than or equal
                          - `in`: in
                          - `nin`: not in

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                          - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                        - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                          The value to compare against the attribute key; supports string, number, or boolean types.

                          - `string`

                          - `float64`

                          - `bool`

                          - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                            - `string`

                            - `float64`

                    - `Type string`

                      Type of operation: `and` or `or`.

                      - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                      - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

                - `MaxNumResults int64`

                  The maximum number of results to return. This number should be between 1 and 50 inclusive.

                - `RankingOptions BetaFileSearchToolRankingOptions`

                  Ranking options for search.

                  - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                    Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                    - `EmbeddingWeight float64`

                      The weight of the embedding in the reciprocal ranking fusion.

                    - `TextWeight float64`

                      The weight of the text in the reciprocal ranking fusion.

                  - `Ranker string`

                    The ranker to use for the file search.

                    - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                    - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

                  - `ScoreThreshold float64`

                    The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

              - `type BetaComputerTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

                - `Type Computer`

                  The type of the computer tool. Always `computer`.

                  - `const ComputerComputer Computer = "computer"`

              - `type BetaComputerUsePreviewTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

                - `DisplayHeight int64`

                  The height of the computer display.

                - `DisplayWidth int64`

                  The width of the computer display.

                - `Environment BetaComputerUsePreviewToolEnvironment`

                  The type of computer environment to control.

                  - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

                  - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

                  - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

                  - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

                  - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

                - `Type ComputerUsePreview`

                  The type of the computer use tool. Always `computer_use_preview`.

                  - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

              - `type BetaWebSearchTool struct{…}`

                Search the Internet for sources related to the prompt. Learn more about the
                [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

                - `Type BetaWebSearchToolType`

                  The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

                  - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

                  - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

                - `Filters BetaWebSearchToolFilters`

                  Filters for the search.

                  - `AllowedDomains []string`

                    Allowed domains for the search. If not provided, all domains are allowed.
                    Subdomains of the provided domains are allowed as well.

                    Example: `["pubmed.ncbi.nlm.nih.gov"]`

                - `SearchContextSize BetaWebSearchToolSearchContextSize`

                  High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                  - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

                  - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

                  - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

                - `UserLocation BetaWebSearchToolUserLocation`

                  The approximate location of the user.

                  - `City string`

                    Free text input for the city of the user, e.g. `San Francisco`.

                  - `Country string`

                    The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                  - `Region string`

                    Free text input for the region of the user, e.g. `California`.

                  - `Timezone string`

                    The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

                  - `Type string`

                    The type of location approximation. Always `approximate`.

                    - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

              - `type BetaToolMcp struct{…}`

                Give the model access to additional tools via remote Model Context Protocol
                (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

                - `ServerLabel string`

                  A label for this MCP server, used to identify it in tool calls.

                - `Type Mcp`

                  The type of the MCP tool. Always `mcp`.

                  - `const McpMcp Mcp = "mcp"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

                  - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

                - `AllowedTools BetaToolMcpAllowedToolsUnion`

                  List of allowed tool names or a filter object.

                  - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                    A string array of allowed tool names

                  - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                    A filter object to specify which tools are allowed.

                    - `ReadOnly bool`

                      Indicates whether or not a tool modifies data or is read-only. If an
                      MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                      it will match this filter.

                    - `ToolNames []string`

                      List of allowed tool names.

                - `Authorization string`

                  An OAuth access token that can be used with a remote MCP server, either
                  with a custom MCP server URL or a service connector. Your application
                  must handle the OAuth authorization flow and provide the token here.

                - `ConnectorID string`

                  Identifier for service connectors, like those available in ChatGPT. One of
                  `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
                  about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

                  Currently supported `connector_id` values are:

                  - Dropbox: `connector_dropbox`
                  - Gmail: `connector_gmail`
                  - Google Calendar: `connector_googlecalendar`
                  - Google Drive: `connector_googledrive`
                  - Microsoft Teams: `connector_microsoftteams`
                  - Outlook Calendar: `connector_outlookcalendar`
                  - Outlook Email: `connector_outlookemail`
                  - SharePoint: `connector_sharepoint`

                  - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

                  - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

                  - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

                  - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

                  - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

                  - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

                  - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

                  - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

                - `DeferLoading bool`

                  Whether this MCP tool is deferred and discovered via tool search.

                - `Headers map[string, string]`

                  Optional HTTP headers to send to the MCP server. Use for authentication
                  or other purposes.

                - `RequireApproval BetaToolMcpRequireApprovalUnion`

                  Specify which of the MCP server's tools require approval.

                  - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                    Specify which of the MCP server's tools require approval. Can be
                    `always`, `never`, or a filter object associated with tools
                    that require approval.

                    - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                      A filter object to specify which tools are allowed.

                      - `ReadOnly bool`

                        Indicates whether or not a tool modifies data or is read-only. If an
                        MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                        it will match this filter.

                      - `ToolNames []string`

                        List of allowed tool names.

                    - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                      A filter object to specify which tools are allowed.

                      - `ReadOnly bool`

                        Indicates whether or not a tool modifies data or is read-only. If an
                        MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                        it will match this filter.

                      - `ToolNames []string`

                        List of allowed tool names.

                  - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                    Specify a single approval policy for all tools. One of `always` or
                    `never`. When set to `always`, all tools will require approval. When
                    set to `never`, all tools will not require approval.

                    - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                    - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

                - `ServerDescription string`

                  Optional description of the MCP server, used to provide more context.

                - `ServerURL string`

                  The URL for the MCP server. One of `server_url`, `connector_id`, or
                  `tunnel_id` must be provided.

                - `TunnelID string`

                  The Secure MCP Tunnel ID to use instead of a direct server URL. One of
                  `server_url`, `connector_id`, or `tunnel_id` must be provided.

              - `type BetaToolCodeInterpreter struct{…}`

                A tool that runs Python code to help generate a response to a prompt.

                - `Container BetaToolCodeInterpreterContainerUnion`

                  The code interpreter container. Can be a container ID or an object that
                  specifies uploaded file IDs to make available to your code, along with an
                  optional `memory_limit` setting.

                  - `string`

                  - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                    Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                    - `Type Auto`

                      Always `auto`.

                      - `const AutoAuto Auto = "auto"`

                    - `FileIDs []string`

                      An optional list of uploaded files to make available to your code.

                    - `MemoryLimit string`

                      The memory limit for the code interpreter container.

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                      - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                    - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                      Network access policy for the container.

                      - `type BetaContainerNetworkPolicyDisabled struct{…}`

                        - `Type Disabled`

                          Disable outbound network access. Always `disabled`.

                          - `const DisabledDisabled Disabled = "disabled"`

                      - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                        - `AllowedDomains []string`

                          A list of allowed domains when type is `allowlist`.

                        - `Type Allowlist`

                          Allow outbound network access only to specified domains. Always `allowlist`.

                          - `const AllowlistAllowlist Allowlist = "allowlist"`

                        - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                          Optional domain-scoped secrets for allowlisted domains.

                          - `Domain string`

                            The domain associated with the secret.

                          - `Name string`

                            The name of the secret to inject for the domain.

                          - `Value string`

                            The secret value to inject for the domain.

                - `Type CodeInterpreter`

                  The type of the code interpreter tool. Always `code_interpreter`.

                  - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

                  - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

              - `type BetaToolProgrammaticToolCalling struct{…}`

                - `Type ProgrammaticToolCalling`

                  The type of the tool. Always `programmatic_tool_calling`.

                  - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

              - `type BetaToolImageGeneration struct{…}`

                A tool that generates images using the GPT image models.

                - `Type ImageGeneration`

                  The type of the image generation tool. Always `image_generation`.

                  - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

                - `Action string`

                  Whether to generate a new image or edit an existing image. Default: `auto`.

                  - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

                  - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

                  - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

                - `Background string`

                  Allows to set transparency for the background of the generated image(s).
                  This parameter is only supported for GPT image models that support
                  transparent backgrounds. Must be one of `transparent`, `opaque`, or
                  `auto` (default value). When `auto` is used, the model will
                  automatically determine the best background for the image.

                  `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
                  transparent backgrounds. Requests with `background` set to
                  `transparent` will return an error for these models; use `opaque` or
                  `auto` instead.

                  If `transparent`, the output format needs to support transparency,
                  so it should be set to either `png` (default value) or `webp`.

                  - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

                  - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

                  - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

                - `InputFidelity string`

                  Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

                  - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

                  - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

                - `InputImageMask BetaToolImageGenerationInputImageMask`

                  Optional mask for inpainting. Contains `image_url`
                  (string, optional) and `file_id` (string, optional).

                  - `FileID string`

                    File ID for the mask image.

                  - `ImageURL string`

                    Base64-encoded mask image.

                - `Model string`

                  The image generation model to use. Default: `gpt-image-1`.

                  - `string`

                  - `string`

                    - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                    - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                    - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                    - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                    - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                    - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

                - `Moderation string`

                  Moderation level for the generated image. Default: `auto`.

                  - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

                  - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

                - `OutputCompression int64`

                  Compression level for the output image. Default: 100.

                - `OutputFormat string`

                  The output format of the generated image. One of `png`, `webp`, or
                  `jpeg`. Default: `png`.

                  - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

                  - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

                  - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

                - `PartialImages int64`

                  Number of partial images to generate in streaming mode, from 0 (default value) to 3.

                - `Quality string`

                  The quality of the generated image. One of `low`, `medium`, `high`,
                  or `auto`. Default: `auto`.

                  - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

                  - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

                  - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

                  - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

                - `Size string`

                  The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

                  - `string`

                  - `string`

                    - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                    - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                    - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                    - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

              - `type BetaToolLocalShell struct{…}`

                A tool that allows the model to execute shell commands in a local environment.

                - `Type LocalShell`

                  The type of the local shell tool. Always `local_shell`.

                  - `const LocalShellLocalShell LocalShell = "local_shell"`

              - `type BetaFunctionShellTool struct{…}`

                A tool that allows the model to execute shell commands.

                - `Type Shell`

                  The type of the shell tool. Always `shell`.

                  - `const ShellShell Shell = "shell"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

                  - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

                - `Environment BetaFunctionShellToolEnvironmentUnion`

                  - `type BetaContainerAuto struct{…}`

                    - `Type ContainerAuto`

                      Automatically creates a container for this request

                      - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                    - `FileIDs []string`

                      An optional list of uploaded files to make available to your code.

                    - `MemoryLimit BetaContainerAutoMemoryLimit`

                      The memory limit for the container.

                      - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                      - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                      - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                      - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                    - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                      Network access policy for the container.

                      - `type BetaContainerNetworkPolicyDisabled struct{…}`

                      - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `Skills []BetaContainerAutoSkillUnion`

                      An optional list of skills referenced by id or inline data.

                      - `type BetaSkillReference struct{…}`

                        - `SkillID string`

                          The ID of the referenced skill.

                        - `Type SkillReference`

                          References a skill created with the /v1/skills endpoint.

                          - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                        - `Version string`

                          Optional skill version. Use a positive integer or 'latest'. Omit for default.

                      - `type BetaInlineSkill struct{…}`

                        - `Description string`

                          The description of the skill.

                        - `Name string`

                          The name of the skill.

                        - `Source BetaInlineSkillSource`

                          Inline skill payload

                          - `Data string`

                            Base64-encoded skill zip bundle.

                          - `MediaType ApplicationZip`

                            The media type of the inline skill payload. Must be `application/zip`.

                            - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                          - `Type Base64`

                            The type of the inline skill source. Must be `base64`.

                            - `const Base64Base64 Base64 = "base64"`

                        - `Type Inline`

                          Defines an inline skill for this request.

                          - `const InlineInline Inline = "inline"`

                  - `type BetaLocalEnvironment struct{…}`

                    - `Type Local`

                      Use a local computer environment.

                      - `const LocalLocal Local = "local"`

                    - `Skills []BetaLocalSkill`

                      An optional list of skills.

                      - `Description string`

                        The description of the skill.

                      - `Name string`

                        The name of the skill.

                      - `Path string`

                        The path to the directory containing the skill.

                  - `type BetaContainerReference struct{…}`

                    - `ContainerID string`

                      The ID of the referenced container.

                    - `Type ContainerReference`

                      References a container created with the /v1/containers endpoint

                      - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

                - `Name string`

                  The name of the custom tool, used to identify it in tool calls.

                - `Type Custom`

                  The type of the custom tool. Always `custom`.

                  - `const CustomCustom Custom = "custom"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

                  - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this tool should be deferred and discovered via tool search.

                - `Description string`

                  Optional description of the custom tool, used to provide more context.

                - `Format BetaCustomToolFormatUnion`

                  The input format for the custom tool. Default is unconstrained text.

                  - `type BetaCustomToolFormatText struct{…}`

                    Unconstrained free-form text.

                    - `Type Text`

                      Unconstrained text format. Always `text`.

                      - `const TextText Text = "text"`

                  - `type BetaCustomToolFormatGrammar struct{…}`

                    A grammar defined by the user.

                    - `Definition string`

                      The grammar definition.

                    - `Syntax string`

                      The syntax of the grammar definition. One of `lark` or `regex`.

                      - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                      - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                    - `Type Grammar`

                      Grammar format. Always `grammar`.

                      - `const GrammarGrammar Grammar = "grammar"`

              - `type BetaNamespaceTool struct{…}`

                Groups function/custom tools under a shared namespace.

                - `Description string`

                  A description of the namespace shown to the model.

                - `Name string`

                  The namespace name used in tool calls (for example, `crm`).

                - `Tools []BetaNamespaceToolToolUnion`

                  The function/custom tools available inside this namespace.

                  - `type BetaNamespaceToolToolFunction struct{…}`

                    - `Name string`

                    - `Type Function`

                      - `const FunctionFunction Function = "function"`

                    - `AllowedCallers []string`

                      The tool invocation context(s).

                      - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                      - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                    - `DeferLoading bool`

                      Whether this function should be deferred and discovered via tool search.

                    - `Description string`

                    - `OutputSchema map[string, any]`

                      A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                    - `Parameters any`

                    - `Strict bool`

                      Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

                  - `type BetaCustomTool struct{…}`

                    A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

                - `Type Namespace`

                  The type of the tool. Always `namespace`.

                  - `const NamespaceNamespace Namespace = "namespace"`

              - `type BetaToolSearchTool struct{…}`

                Hosted or BYOT tool search configuration for deferred tools.

                - `Type ToolSearch`

                  The type of the tool. Always `tool_search`.

                  - `const ToolSearchToolSearch ToolSearch = "tool_search"`

                - `Description string`

                  Description shown to the model for a client-executed tool search tool.

                - `Execution BetaToolSearchToolExecution`

                  Whether tool search is executed by the server or by the client.

                  - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

                  - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

                - `Parameters any`

                  Parameter schema for a client-executed tool search tool.

              - `type BetaWebSearchPreviewTool struct{…}`

                This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

                - `Type BetaWebSearchPreviewToolType`

                  The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

                  - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

                  - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

                - `SearchContentTypes []string`

                  - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

                  - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

                - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

                  High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

                  - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

                  - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

                  - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

                - `UserLocation BetaWebSearchPreviewToolUserLocation`

                  The user's location.

                  - `Type Approximate`

                    The type of location approximation. Always `approximate`.

                    - `const ApproximateApproximate Approximate = "approximate"`

                  - `City string`

                    Free text input for the city of the user, e.g. `San Francisco`.

                  - `Country string`

                    The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

                  - `Region string`

                    Free text input for the region of the user, e.g. `California`.

                  - `Timezone string`

                    The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `type BetaApplyPatchTool struct{…}`

                Allows the assistant to create, delete, or update files using unified diffs.

                - `Type ApplyPatch`

                  The type of the tool. Always `apply_patch`.

                  - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

                  - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

            - `Type ToolSearchOutput`

              The item type. Always `tool_search_output`.

              - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

            - `ID string`

              The unique ID of this tool search output.

            - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `CallID string`

              The unique ID of the tool search call generated by the model.

            - `Execution BetaResponseToolSearchOutputItemParamExecution`

              Whether tool search was executed by the server or by the client.

              - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

              - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

            - `Status BetaResponseToolSearchOutputItemParamStatus`

              The status of the tool search output.

              - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

              - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

              - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

          - `type BetaResponseInputItemAdditionalTools struct{…}`

            - `Role Developer`

              The role that provided the additional tools. Only `developer` is supported.

              - `const DeveloperDeveloper Developer = "developer"`

            - `Tools []BetaToolUnion`

              A list of additional tools made available at this item.

              - `type BetaFunctionTool struct{…}`

                Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

              - `type BetaFileSearchTool struct{…}`

                A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

              - `type BetaComputerTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `type BetaComputerUsePreviewTool struct{…}`

                A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

              - `type BetaWebSearchTool struct{…}`

                Search the Internet for sources related to the prompt. Learn more about the
                [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `type BetaToolMcp struct{…}`

                Give the model access to additional tools via remote Model Context Protocol
                (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

              - `type BetaToolCodeInterpreter struct{…}`

                A tool that runs Python code to help generate a response to a prompt.

              - `type BetaToolProgrammaticToolCalling struct{…}`

              - `type BetaToolImageGeneration struct{…}`

                A tool that generates images using the GPT image models.

              - `type BetaToolLocalShell struct{…}`

                A tool that allows the model to execute shell commands in a local environment.

              - `type BetaFunctionShellTool struct{…}`

                A tool that allows the model to execute shell commands.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

              - `type BetaNamespaceTool struct{…}`

                Groups function/custom tools under a shared namespace.

              - `type BetaToolSearchTool struct{…}`

                Hosted or BYOT tool search configuration for deferred tools.

              - `type BetaWebSearchPreviewTool struct{…}`

                This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

              - `type BetaApplyPatchTool struct{…}`

                Allows the assistant to create, delete, or update files using unified diffs.

            - `Type AdditionalTools`

              The item type. Always `additional_tools`.

              - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

            - `ID string`

              The unique ID of this additional tools item.

            - `Agent BetaResponseInputItemAdditionalToolsAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

            - `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`.

                - `const SummaryTextSummaryText SummaryText = "summary_text"`

            - `Type Reasoning`

              The type of the object. Always `reasoning`.

              - `const ReasoningReasoning Reasoning = "reasoning"`

            - `Agent BetaResponseReasoningItemAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Content []BetaResponseReasoningItemContent`

              Reasoning text content.

              - `Text string`

                The reasoning text from the model.

              - `Type ReasoningText`

                The type of the reasoning text. Always `reasoning_text`.

                - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

            - `EncryptedContent string`

              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.

            - `Status BetaResponseReasoningItemStatus`

              The status of the item. One of `in_progress`, `completed`, or
              `incomplete`. Populated when items are returned via API.

              - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

              - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

              - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

          - `type BetaResponseCompactionItemParamResp struct{…}`

            A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

            - `EncryptedContent string`

              The encrypted content of the compaction summary.

            - `Type Compaction`

              The type of the item. Always `compaction`.

              - `const CompactionCompaction Compaction = "compaction"`

            - `ID string`

              The ID of the compaction item.

            - `Agent BetaResponseCompactionItemParamAgentResp`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemImageGenerationCall struct{…}`

            An image generation request made by the model.

            - `ID string`

              The unique ID of the image generation call.

            - `Result string`

              The generated image encoded in base64.

            - `Status string`

              The status of the image generation call.

              - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

              - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

              - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

              - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

            - `Type ImageGenerationCall`

              The type of the image generation call. Always `image_generation_call`.

              - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

            - `Agent BetaResponseInputItemImageGenerationCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseCodeInterpreterToolCall struct{…}`

            A tool call to run code.

            - `ID string`

              The unique ID of the code interpreter tool call.

            - `Code string`

              The code to run, or null if not available.

            - `ContainerID string`

              The ID of the container used to run the code.

            - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

              The outputs generated by the code interpreter, such as logs or images.
              Can be null if no outputs are available.

              - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

                The logs output from the code interpreter.

                - `Logs string`

                  The logs output from the code interpreter.

                - `Type Logs`

                  The type of the output. Always `logs`.

                  - `const LogsLogs Logs = "logs"`

              - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

                The image output from the code interpreter.

                - `Type Image`

                  The type of the output. Always `image`.

                  - `const ImageImage Image = "image"`

                - `URL string`

                  The URL of the image output from the code interpreter.

            - `Status BetaResponseCodeInterpreterToolCallStatus`

              The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

              - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

              - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

              - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

              - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

              - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

            - `Type CodeInterpreterCall`

              The type of the code interpreter tool call. Always `code_interpreter_call`.

              - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

            - `Agent BetaResponseCodeInterpreterToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemLocalShellCall struct{…}`

            A tool call to run a command on the local shell.

            - `ID string`

              The unique ID of the local shell call.

            - `Action BetaResponseInputItemLocalShellCallAction`

              Execute a shell command on the server.

              - `Command []string`

                The command to run.

              - `Env map[string, string]`

                Environment variables to set for the command.

              - `Type Exec`

                The type of the local shell action. Always `exec`.

                - `const ExecExec Exec = "exec"`

              - `TimeoutMs int64`

                Optional timeout in milliseconds for the command.

              - `User string`

                Optional user to run the command as.

              - `WorkingDirectory string`

                Optional working directory to run the command in.

            - `CallID string`

              The unique ID of the local shell tool call generated by the model.

            - `Status string`

              The status of the local shell call.

              - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

              - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

              - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

            - `Type LocalShellCall`

              The type of the local shell call. Always `local_shell_call`.

              - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

            - `Agent BetaResponseInputItemLocalShellCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

            The output of a local shell tool call.

            - `ID string`

              The unique ID of the local shell tool call generated by the model.

            - `Output string`

              A JSON string of the output of the local shell tool call.

            - `Type LocalShellCallOutput`

              The type of the local shell tool call output. Always `local_shell_call_output`.

              - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

            - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Status string`

              The status of the item. One of `in_progress`, `completed`, or `incomplete`.

              - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

              - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

          - `type BetaResponseInputItemShellCall struct{…}`

            A tool representing a request to execute one or more shell commands.

            - `Action BetaResponseInputItemShellCallAction`

              The shell commands and limits that describe how to run the tool call.

              - `Commands []string`

                Ordered shell commands for the execution environment to run.

              - `MaxOutputLength int64`

                Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

              - `TimeoutMs int64`

                Maximum wall-clock time in milliseconds to allow the shell commands to run.

            - `CallID string`

              The unique ID of the shell tool call generated by the model.

            - `Type ShellCall`

              The type of the item. Always `shell_call`.

              - `const ShellCallShellCall ShellCall = "shell_call"`

            - `ID string`

              The unique ID of the shell tool call. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemShellCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemShellCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

              The environment to execute the shell commands in.

              - `type BetaLocalEnvironment struct{…}`

              - `type BetaContainerReference struct{…}`

            - `Status string`

              The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

              - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

              - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

              - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

          - `type BetaResponseInputItemShellCallOutput struct{…}`

            The streamed output items emitted by a shell tool call.

            - `CallID string`

              The unique ID of the shell tool call generated by the model.

            - `Output []BetaResponseFunctionShellCallOutputContent`

              Captured chunks of stdout and stderr output, along with their associated outcomes.

              - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

                The exit or timeout outcome associated with this shell call.

                - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

                  Indicates that the shell call exceeded its configured time limit.

                  - `Type Timeout`

                    The outcome type. Always `timeout`.

                    - `const TimeoutTimeout Timeout = "timeout"`

                - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

                  Indicates that the shell commands finished and returned an exit code.

                  - `ExitCode int64`

                    The exit code returned by the shell process.

                  - `Type Exit`

                    The outcome type. Always `exit`.

                    - `const ExitExit Exit = "exit"`

              - `Stderr string`

                Captured stderr output for the shell call.

              - `Stdout string`

                Captured stdout output for the shell call.

            - `Type ShellCallOutput`

              The type of the item. Always `shell_call_output`.

              - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

            - `ID string`

              The unique ID of the shell tool call output. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemShellCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `MaxOutputLength int64`

              The maximum number of UTF-8 characters captured for this shell call's combined output.

            - `Status string`

              The status of the shell call output.

              - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

              - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

              - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

          - `type BetaResponseInputItemApplyPatchCall struct{…}`

            A tool call representing a request to create, delete, or update files using diff patches.

            - `CallID string`

              The unique ID of the apply patch tool call generated by the model.

            - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

              The specific create, delete, or update instruction for the apply_patch tool call.

              - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

                Instruction for creating a new file via the apply_patch tool.

                - `Diff string`

                  Unified diff content to apply when creating the file.

                - `Path string`

                  Path of the file to create relative to the workspace root.

                - `Type CreateFile`

                  The operation type. Always `create_file`.

                  - `const CreateFileCreateFile CreateFile = "create_file"`

              - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

                Instruction for deleting an existing file via the apply_patch tool.

                - `Path string`

                  Path of the file to delete relative to the workspace root.

                - `Type DeleteFile`

                  The operation type. Always `delete_file`.

                  - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

              - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

                Instruction for updating an existing file via the apply_patch tool.

                - `Diff string`

                  Unified diff content to apply to the existing file.

                - `Path string`

                  Path of the file to update relative to the workspace root.

                - `Type UpdateFile`

                  The operation type. Always `update_file`.

                  - `const UpdateFileUpdateFile UpdateFile = "update_file"`

            - `Status string`

              The status of the apply patch tool call. One of `in_progress` or `completed`.

              - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

              - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

            - `Type ApplyPatchCall`

              The type of the item. Always `apply_patch_call`.

              - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

            - `ID string`

              The unique ID of the apply patch tool call. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemApplyPatchCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

          - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

            The streamed output emitted by an apply patch tool call.

            - `CallID string`

              The unique ID of the apply patch tool call generated by the model.

            - `Status string`

              The status of the apply patch tool call output. One of `completed` or `failed`.

              - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

              - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

            - `Type ApplyPatchCallOutput`

              The type of the item. Always `apply_patch_call_output`.

              - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

            - `ID string`

              The unique ID of the apply patch tool call output. Populated when this item is returned via API.

            - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

            - `Output string`

              Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

          - `type BetaResponseInputItemMcpListTools struct{…}`

            A list of tools available on an MCP server.

            - `ID string`

              The unique ID of the list.

            - `ServerLabel string`

              The label of the MCP server.

            - `Tools []BetaResponseInputItemMcpListToolsTool`

              The tools available on the server.

              - `InputSchema any`

                The JSON schema describing the tool's input.

              - `Name string`

                The name of the tool.

              - `Annotations any`

                Additional annotations about the tool.

              - `Description string`

                The description of the tool.

            - `Type McpListTools`

              The type of the item. Always `mcp_list_tools`.

              - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

            - `Agent BetaResponseInputItemMcpListToolsAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Error string`

              Error message if the server could not list tools.

          - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

            A request for human approval of a tool invocation.

            - `ID string`

              The unique ID of the approval request.

            - `Arguments string`

              A JSON string of arguments for the tool.

            - `Name string`

              The name of the tool to run.

            - `ServerLabel string`

              The label of the MCP server making the request.

            - `Type McpApprovalRequest`

              The type of the item. Always `mcp_approval_request`.

              - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

            - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

            A response to an MCP approval request.

            - `ApprovalRequestID string`

              The ID of the approval request being answered.

            - `Approve bool`

              Whether the request was approved.

            - `Type McpApprovalResponse`

              The type of the item. Always `mcp_approval_response`.

              - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

            - `ID string`

              The unique ID of the approval response

            - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Reason string`

              Optional reason for the decision.

          - `type BetaResponseInputItemMcpCall struct{…}`

            An invocation of a tool on an MCP server.

            - `ID string`

              The unique ID of the tool call.

            - `Arguments string`

              A JSON string of the arguments passed to the tool.

            - `Name string`

              The name of the tool that was run.

            - `ServerLabel string`

              The label of the MCP server running the tool.

            - `Type McpCall`

              The type of the item. Always `mcp_call`.

              - `const McpCallMcpCall McpCall = "mcp_call"`

            - `Agent BetaResponseInputItemMcpCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `ApprovalRequestID string`

              Unique identifier for the MCP tool call approval request.
              Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

            - `Error string`

              The error from the tool call, if any.

            - `Output string`

              The output from the tool call.

            - `Status string`

              The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

              - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

              - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

              - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

              - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

              - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

          - `type BetaResponseCustomToolCallOutput struct{…}`

            The output of a custom tool call from your code, being sent back to the model.

            - `CallID string`

              The call ID, used to map this custom tool call output to a custom tool call.

            - `Output BetaResponseCustomToolCallOutputOutputUnion`

              The output from the custom tool call generated by your code.
              Can be a string or an list of output content.

              - `string`

              - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

                Text, image, or file output of the custom tool call.

                - `type BetaResponseInputText struct{…}`

                  A text input to the model.

                - `type BetaResponseInputImage struct{…}`

                  An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `type BetaResponseInputFile struct{…}`

                  A file input to the model.

            - `Type CustomToolCallOutput`

              The type of the custom tool call output. Always `custom_tool_call_output`.

              - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

            - `ID string`

              The unique ID of the custom tool call output in the OpenAI platform.

            - `Agent BetaResponseCustomToolCallOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseCustomToolCallOutputCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

                - `Type Direct`

                  The caller type. Always `direct`.

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  The caller type. Always `program`.

                  - `const ProgramProgram Program = "program"`

          - `type BetaResponseCustomToolCall struct{…}`

            A call to a custom tool created by the model.

            - `CallID string`

              An identifier used to map this custom tool call to a tool call output.

            - `Input string`

              The input for the custom tool call generated by the model.

            - `Name string`

              The name of the custom tool being called.

            - `Type CustomToolCall`

              The type of the custom tool call. Always `custom_tool_call`.

              - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

            - `ID string`

              The unique ID of the custom tool call in the OpenAI platform.

            - `Agent BetaResponseCustomToolCallAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Caller BetaResponseCustomToolCallCallerUnion`

              The execution context that produced this tool call.

              - `type BetaResponseCustomToolCallCallerDirect struct{…}`

                - `Type Direct`

                  - `const DirectDirect Direct = "direct"`

              - `type BetaResponseCustomToolCallCallerProgram struct{…}`

                - `CallerID string`

                  The call ID of the program item that produced this tool call.

                - `Type Program`

                  - `const ProgramProgram Program = "program"`

            - `Namespace string`

              The namespace of the custom tool being called.

          - `type BetaResponseInputItemCompactionTrigger struct{…}`

            Compacts the current context. Must be the final input item.

            - `Type CompactionTrigger`

              The type of the item. Always `compaction_trigger`.

              - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

            - `Agent BetaResponseInputItemCompactionTriggerAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemItemReference struct{…}`

            An internal identifier for an item to reference.

            - `ID string`

              The ID of the item to reference.

            - `Agent BetaResponseInputItemItemReferenceAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

            - `Type string`

              The type of item to reference. Always `item_reference`.

              - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

          - `type BetaResponseInputItemProgram struct{…}`

            - `ID string`

              The unique ID of this program item.

            - `CallID string`

              The stable call ID of the program item.

            - `Code string`

              The JavaScript source executed by programmatic tool calling.

            - `Fingerprint string`

              Opaque program replay fingerprint that must be round-tripped.

            - `Type Program`

              The item type. Always `program`.

              - `const ProgramProgram Program = "program"`

            - `Agent BetaResponseInputItemProgramAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

          - `type BetaResponseInputItemProgramOutput struct{…}`

            - `ID string`

              The unique ID of this program output item.

            - `CallID string`

              The call ID of the program item.

            - `Result string`

              The result produced by the program item.

            - `Status string`

              The terminal status of the program output.

              - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

              - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

            - `Type ProgramOutput`

              The item type. Always `program_output`.

              - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

            - `Agent BetaResponseInputItemProgramOutputAgent`

              The agent that produced this item.

              - `AgentName string`

                The canonical name of the agent that produced this item.

      - `Metadata map[string, string]`

        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.

      - `Model BetaResponseModel`

        Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
        offers a wide range of models with different capabilities, performance
        characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
        to browse and compare available models.

        - `type BetaResponseModel string`

          Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
          offers a wide range of models with different capabilities, performance
          characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
          to browse and compare available models.

          - `const BetaResponseModelGPT5_6Sol BetaResponseModel = "gpt-5.6-sol"`

          - `const BetaResponseModelGPT5_6Terra BetaResponseModel = "gpt-5.6-terra"`

          - `const BetaResponseModelGPT5_6Luna BetaResponseModel = "gpt-5.6-luna"`

          - `const BetaResponseModelGPT5_4 BetaResponseModel = "gpt-5.4"`

          - `const BetaResponseModelGPT5_4Mini BetaResponseModel = "gpt-5.4-mini"`

          - `const BetaResponseModelGPT5_4Nano BetaResponseModel = "gpt-5.4-nano"`

          - `const BetaResponseModelGPT5_4Mini2026_03_17 BetaResponseModel = "gpt-5.4-mini-2026-03-17"`

          - `const BetaResponseModelGPT5_4Nano2026_03_17 BetaResponseModel = "gpt-5.4-nano-2026-03-17"`

          - `const BetaResponseModelGPT5_3ChatLatest BetaResponseModel = "gpt-5.3-chat-latest"`

          - `const BetaResponseModelGPT5_2 BetaResponseModel = "gpt-5.2"`

          - `const BetaResponseModelGPT5_2_2025_12_11 BetaResponseModel = "gpt-5.2-2025-12-11"`

          - `const BetaResponseModelGPT5_2ChatLatest BetaResponseModel = "gpt-5.2-chat-latest"`

          - `const BetaResponseModelGPT5_2Pro BetaResponseModel = "gpt-5.2-pro"`

          - `const BetaResponseModelGPT5_2Pro2025_12_11 BetaResponseModel = "gpt-5.2-pro-2025-12-11"`

          - `const BetaResponseModelGPT5_1 BetaResponseModel = "gpt-5.1"`

          - `const BetaResponseModelGPT5_1_2025_11_13 BetaResponseModel = "gpt-5.1-2025-11-13"`

          - `const BetaResponseModelGPT5_1Codex BetaResponseModel = "gpt-5.1-codex"`

          - `const BetaResponseModelGPT5_1Mini BetaResponseModel = "gpt-5.1-mini"`

          - `const BetaResponseModelGPT5_1ChatLatest BetaResponseModel = "gpt-5.1-chat-latest"`

          - `const BetaResponseModelGPT5 BetaResponseModel = "gpt-5"`

          - `const BetaResponseModelGPT5Mini BetaResponseModel = "gpt-5-mini"`

          - `const BetaResponseModelGPT5Nano BetaResponseModel = "gpt-5-nano"`

          - `const BetaResponseModelGPT5_2025_08_07 BetaResponseModel = "gpt-5-2025-08-07"`

          - `const BetaResponseModelGPT5Mini2025_08_07 BetaResponseModel = "gpt-5-mini-2025-08-07"`

          - `const BetaResponseModelGPT5Nano2025_08_07 BetaResponseModel = "gpt-5-nano-2025-08-07"`

          - `const BetaResponseModelGPT5ChatLatest BetaResponseModel = "gpt-5-chat-latest"`

          - `const BetaResponseModelGPT4_1 BetaResponseModel = "gpt-4.1"`

          - `const BetaResponseModelGPT4_1Mini BetaResponseModel = "gpt-4.1-mini"`

          - `const BetaResponseModelGPT4_1Nano BetaResponseModel = "gpt-4.1-nano"`

          - `const BetaResponseModelGPT4_1_2025_04_14 BetaResponseModel = "gpt-4.1-2025-04-14"`

          - `const BetaResponseModelGPT4_1Mini2025_04_14 BetaResponseModel = "gpt-4.1-mini-2025-04-14"`

          - `const BetaResponseModelGPT4_1Nano2025_04_14 BetaResponseModel = "gpt-4.1-nano-2025-04-14"`

          - `const BetaResponseModelO4Mini BetaResponseModel = "o4-mini"`

          - `const BetaResponseModelO4Mini2025_04_16 BetaResponseModel = "o4-mini-2025-04-16"`

          - `const BetaResponseModelO3 BetaResponseModel = "o3"`

          - `const BetaResponseModelO3_2025_04_16 BetaResponseModel = "o3-2025-04-16"`

          - `const BetaResponseModelO3Mini BetaResponseModel = "o3-mini"`

          - `const BetaResponseModelO3Mini2025_01_31 BetaResponseModel = "o3-mini-2025-01-31"`

          - `const BetaResponseModelO1 BetaResponseModel = "o1"`

          - `const BetaResponseModelO1_2024_12_17 BetaResponseModel = "o1-2024-12-17"`

          - `const BetaResponseModelO1Preview BetaResponseModel = "o1-preview"`

          - `const BetaResponseModelO1Preview2024_09_12 BetaResponseModel = "o1-preview-2024-09-12"`

          - `const BetaResponseModelO1Mini BetaResponseModel = "o1-mini"`

          - `const BetaResponseModelO1Mini2024_09_12 BetaResponseModel = "o1-mini-2024-09-12"`

          - `const BetaResponseModelGPT4o BetaResponseModel = "gpt-4o"`

          - `const BetaResponseModelGPT4o2024_11_20 BetaResponseModel = "gpt-4o-2024-11-20"`

          - `const BetaResponseModelGPT4o2024_08_06 BetaResponseModel = "gpt-4o-2024-08-06"`

          - `const BetaResponseModelGPT4o2024_05_13 BetaResponseModel = "gpt-4o-2024-05-13"`

          - `const BetaResponseModelGPT4oAudioPreview BetaResponseModel = "gpt-4o-audio-preview"`

          - `const BetaResponseModelGPT4oAudioPreview2024_10_01 BetaResponseModel = "gpt-4o-audio-preview-2024-10-01"`

          - `const BetaResponseModelGPT4oAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-audio-preview-2024-12-17"`

          - `const BetaResponseModelGPT4oAudioPreview2025_06_03 BetaResponseModel = "gpt-4o-audio-preview-2025-06-03"`

          - `const BetaResponseModelGPT4oMiniAudioPreview BetaResponseModel = "gpt-4o-mini-audio-preview"`

          - `const BetaResponseModelGPT4oMiniAudioPreview2024_12_17 BetaResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

          - `const BetaResponseModelGPT4oSearchPreview BetaResponseModel = "gpt-4o-search-preview"`

          - `const BetaResponseModelGPT4oMiniSearchPreview BetaResponseModel = "gpt-4o-mini-search-preview"`

          - `const BetaResponseModelGPT4oSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-search-preview-2025-03-11"`

          - `const BetaResponseModelGPT4oMiniSearchPreview2025_03_11 BetaResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

          - `const BetaResponseModelChatgpt4oLatest BetaResponseModel = "chatgpt-4o-latest"`

          - `const BetaResponseModelCodexMiniLatest BetaResponseModel = "codex-mini-latest"`

          - `const BetaResponseModelGPT4oMini BetaResponseModel = "gpt-4o-mini"`

          - `const BetaResponseModelGPT4oMini2024_07_18 BetaResponseModel = "gpt-4o-mini-2024-07-18"`

          - `const BetaResponseModelGPT4Turbo BetaResponseModel = "gpt-4-turbo"`

          - `const BetaResponseModelGPT4Turbo2024_04_09 BetaResponseModel = "gpt-4-turbo-2024-04-09"`

          - `const BetaResponseModelGPT4_0125Preview BetaResponseModel = "gpt-4-0125-preview"`

          - `const BetaResponseModelGPT4TurboPreview BetaResponseModel = "gpt-4-turbo-preview"`

          - `const BetaResponseModelGPT4_1106Preview BetaResponseModel = "gpt-4-1106-preview"`

          - `const BetaResponseModelGPT4VisionPreview BetaResponseModel = "gpt-4-vision-preview"`

          - `const BetaResponseModelGPT4 BetaResponseModel = "gpt-4"`

          - `const BetaResponseModelGPT4_0314 BetaResponseModel = "gpt-4-0314"`

          - `const BetaResponseModelGPT4_0613 BetaResponseModel = "gpt-4-0613"`

          - `const BetaResponseModelGPT4_32k BetaResponseModel = "gpt-4-32k"`

          - `const BetaResponseModelGPT4_32k0314 BetaResponseModel = "gpt-4-32k-0314"`

          - `const BetaResponseModelGPT4_32k0613 BetaResponseModel = "gpt-4-32k-0613"`

          - `const BetaResponseModelGPT3_5Turbo BetaResponseModel = "gpt-3.5-turbo"`

          - `const BetaResponseModelGPT3_5Turbo16k BetaResponseModel = "gpt-3.5-turbo-16k"`

          - `const BetaResponseModelGPT3_5Turbo0301 BetaResponseModel = "gpt-3.5-turbo-0301"`

          - `const BetaResponseModelGPT3_5Turbo0613 BetaResponseModel = "gpt-3.5-turbo-0613"`

          - `const BetaResponseModelGPT3_5Turbo1106 BetaResponseModel = "gpt-3.5-turbo-1106"`

          - `const BetaResponseModelGPT3_5Turbo0125 BetaResponseModel = "gpt-3.5-turbo-0125"`

          - `const BetaResponseModelGPT3_5Turbo16k0613 BetaResponseModel = "gpt-3.5-turbo-16k-0613"`

          - `const BetaResponseModelO1Pro BetaResponseModel = "o1-pro"`

          - `const BetaResponseModelO1Pro2025_03_19 BetaResponseModel = "o1-pro-2025-03-19"`

          - `const BetaResponseModelO3Pro BetaResponseModel = "o3-pro"`

          - `const BetaResponseModelO3Pro2025_06_10 BetaResponseModel = "o3-pro-2025-06-10"`

          - `const BetaResponseModelO3DeepResearch BetaResponseModel = "o3-deep-research"`

          - `const BetaResponseModelO3DeepResearch2025_06_26 BetaResponseModel = "o3-deep-research-2025-06-26"`

          - `const BetaResponseModelO4MiniDeepResearch BetaResponseModel = "o4-mini-deep-research"`

          - `const BetaResponseModelO4MiniDeepResearch2025_06_26 BetaResponseModel = "o4-mini-deep-research-2025-06-26"`

          - `const BetaResponseModelComputerUsePreview BetaResponseModel = "computer-use-preview"`

          - `const BetaResponseModelComputerUsePreview2025_03_11 BetaResponseModel = "computer-use-preview-2025-03-11"`

          - `const BetaResponseModelGPT5Codex BetaResponseModel = "gpt-5-codex"`

          - `const BetaResponseModelGPT5Pro BetaResponseModel = "gpt-5-pro"`

          - `const BetaResponseModelGPT5Pro2025_10_06 BetaResponseModel = "gpt-5-pro-2025-10-06"`

          - `const BetaResponseModelGPT5_1CodexMax BetaResponseModel = "gpt-5.1-codex-max"`

        - `string`

      - `Object Response`

        The object type of this resource - always set to `response`.

        - `const ResponseResponse Response = "response"`

      - `Output []BetaResponseOutputItemUnion`

        An array of content items generated by the model.

        - The length and order of items in the `output` array is dependent
          on the model's response.
        - Rather than accessing the first item in the `output` array and
          assuming it's an `assistant` message with the content generated by
          the model, you might consider using the `output_text` property where
          supported in SDKs.

        - `type BetaResponseOutputMessage struct{…}`

          An output message from the model.

        - `type BetaResponseFileSearchToolCall struct{…}`

          The results of a file search tool call. See the
          [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

        - `type BetaResponseFunctionToolCall struct{…}`

          A tool call to run a function. See the
          [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

        - `type BetaResponseFunctionToolCallOutputItem struct{…}`

          - `ID string`

            The unique ID of the function call tool output.

          - `CallID string`

            The unique ID of the function tool call generated by the model.

          - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

            The output from the function call generated by your code.
            Can be a string or an list of output content.

            - `string`

            - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

              Text, image, or file output of the function call.

              - `type BetaResponseInputText struct{…}`

                A text input to the model.

              - `type BetaResponseInputImage struct{…}`

                An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type BetaResponseInputFile struct{…}`

                A file input to the model.

          - `Status BetaResponseFunctionToolCallOutputItemStatus`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `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`.

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `Agent BetaResponseFunctionToolCallOutputItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

              - `Type Direct`

                The caller type. Always `direct`.

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                The caller type. Always `program`.

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `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.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseOutputText struct{…}`

              A text output from the model.

            - `type BetaResponseOutputItemAgentMessageContentText struct{…}`

              A text content.

              - `Text string`

              - `Type Text`

                - `const TextText Text = "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`.

                - `const SummaryTextSummaryText SummaryText = "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`.

                - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

            - `type BetaResponseOutputRefusal struct{…}`

              A refusal from the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `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`.

                - `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.

              - `Type ComputerScreenshot`

                Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

                - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

              - `PromptCacheBreakpoint BetaResponseOutputItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

            - `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`.

                - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

          - `Recipient string`

            The destination agent identity.

          - `Type AgentMessage`

            The type of the item. Always `agent_message`.

            - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

          - `Agent BetaResponseOutputItemAgentMessageAgent`

            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.

            - `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`.

            - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

          - `Agent BetaResponseOutputItemMultiAgentCallAgent`

            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.

            - `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.

          - `Output []BetaResponseOutputText`

            Text output returned by the multi-agent action.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

            - `Logprobs []BetaResponseOutputTextLogprob`

          - `Type MultiAgentCallOutput`

            The type of the multi-agent result. Always `multi_agent_call_output`.

            - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

          - `Agent BetaResponseOutputItemMultiAgentCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseFunctionWebSearch struct{…}`

          The results of a web search tool call. See the
          [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `type BetaResponseComputerToolCall struct{…}`

          A tool call to a computer use tool. See the
          [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

        - `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.

          - `Output BetaResponseComputerToolCallOutputScreenshot`

            A computer screenshot image used with the computer use tool.

          - `Status BetaResponseComputerToolCallOutputItemStatus`

            The status of the message input. One of `in_progress`, `completed`, or
            `incomplete`. Populated when input items are returned via API.

            - `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`.

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

            The safety checks reported by the API that have been acknowledged by the
            developer.

            - `ID string`

              The ID of the pending safety check.

            - `Code string`

              The type of the pending safety check.

            - `Message string`

              Details about the pending safety check.

          - `Agent BetaResponseComputerToolCallOutputItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            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](https://platform.openai.com/docs/guides/conversation-state).

        - `type BetaResponseOutputItemProgram struct{…}`

          - `ID string`

            The unique ID of the program item.

          - `CallID string`

            The stable call ID of the program item.

          - `Code string`

            The JavaScript source executed by programmatic tool calling.

          - `Fingerprint string`

            Opaque program replay fingerprint that must be round-tripped.

          - `Type Program`

            The type of the item. Always `program`.

            - `const ProgramProgram Program = "program"`

          - `Agent BetaResponseOutputItemProgramAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseOutputItemProgramOutput struct{…}`

          - `ID string`

            The unique ID of the program output item.

          - `CallID string`

            The call ID of the program item.

          - `Result string`

            The result produced by the program item.

          - `Status string`

            The terminal status of the program output item.

            - `const BetaResponseOutputItemProgramOutputStatusCompleted BetaResponseOutputItemProgramOutputStatus = "completed"`

            - `const BetaResponseOutputItemProgramOutputStatusIncomplete BetaResponseOutputItemProgramOutputStatus = "incomplete"`

          - `Type ProgramOutput`

            The type of the item. Always `program_output`.

            - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

          - `Agent BetaResponseOutputItemProgramOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseToolSearchCall struct{…}`

          - `ID string`

            The unique ID of the tool search call item.

          - `Arguments any`

            Arguments used for the tool search call.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution BetaResponseToolSearchCallExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

            - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

          - `Status BetaResponseToolSearchCallStatus`

            The status of the tool search call item that was recorded.

            - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

            - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

            - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

          - `Type ToolSearchCall`

            The type of the item. Always `tool_search_call`.

            - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

          - `Agent BetaResponseToolSearchCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseToolSearchOutputItem struct{…}`

          - `ID string`

            The unique ID of the tool search output item.

          - `CallID string`

            The unique ID of the tool search call generated by the model.

          - `Execution BetaResponseToolSearchOutputItemExecution`

            Whether tool search was executed by the server or by the client.

            - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

            - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

          - `Status BetaResponseToolSearchOutputItemStatus`

            The status of the tool search output item that was recorded.

            - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

            - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

            - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

          - `Tools []BetaToolUnion`

            The loaded tool definitions returned by tool search.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ToolSearchOutput`

            The type of the item. Always `tool_search_output`.

            - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

          - `Agent BetaResponseToolSearchOutputItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseOutputItemAdditionalTools struct{…}`

          - `ID string`

            The unique ID of the additional tools item.

          - `Role string`

            The role that provided the additional tools.

            - `const BetaResponseOutputItemAdditionalToolsRoleUnknown BetaResponseOutputItemAdditionalToolsRole = "unknown"`

            - `const BetaResponseOutputItemAdditionalToolsRoleUser BetaResponseOutputItemAdditionalToolsRole = "user"`

            - `const BetaResponseOutputItemAdditionalToolsRoleAssistant BetaResponseOutputItemAdditionalToolsRole = "assistant"`

            - `const BetaResponseOutputItemAdditionalToolsRoleSystem BetaResponseOutputItemAdditionalToolsRole = "system"`

            - `const BetaResponseOutputItemAdditionalToolsRoleCritic BetaResponseOutputItemAdditionalToolsRole = "critic"`

            - `const BetaResponseOutputItemAdditionalToolsRoleDiscriminator BetaResponseOutputItemAdditionalToolsRole = "discriminator"`

            - `const BetaResponseOutputItemAdditionalToolsRoleDeveloper BetaResponseOutputItemAdditionalToolsRole = "developer"`

            - `const BetaResponseOutputItemAdditionalToolsRoleTool BetaResponseOutputItemAdditionalToolsRole = "tool"`

          - `Tools []BetaToolUnion`

            The additional tool definitions made available at this item.

            - `type BetaFunctionTool struct{…}`

              Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `type BetaFileSearchTool struct{…}`

              A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `type BetaComputerTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaComputerUsePreviewTool struct{…}`

              A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `type BetaWebSearchTool struct{…}`

              Search the Internet for sources related to the prompt. Learn more about the
              [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaToolMcp struct{…}`

              Give the model access to additional tools via remote Model Context Protocol
              (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `type BetaToolCodeInterpreter struct{…}`

              A tool that runs Python code to help generate a response to a prompt.

            - `type BetaToolProgrammaticToolCalling struct{…}`

            - `type BetaToolImageGeneration struct{…}`

              A tool that generates images using the GPT image models.

            - `type BetaToolLocalShell struct{…}`

              A tool that allows the model to execute shell commands in a local environment.

            - `type BetaFunctionShellTool struct{…}`

              A tool that allows the model to execute shell commands.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `type BetaNamespaceTool struct{…}`

              Groups function/custom tools under a shared namespace.

            - `type BetaToolSearchTool struct{…}`

              Hosted or BYOT tool search configuration for deferred tools.

            - `type BetaWebSearchPreviewTool struct{…}`

              This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `type BetaApplyPatchTool struct{…}`

              Allows the assistant to create, delete, or update files using unified diffs.

          - `Type AdditionalTools`

            The type of the item. Always `additional_tools`.

            - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

          - `Agent BetaResponseOutputItemAdditionalToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCompactionItem struct{…}`

          A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

          - `ID string`

            The unique ID of the compaction item.

          - `EncryptedContent string`

            The encrypted content that was produced by compaction.

          - `Type Compaction`

            The type of the item. Always `compaction`.

            - `const CompactionCompaction Compaction = "compaction"`

          - `Agent BetaResponseCompactionItemAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseOutputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

            The unique ID of the image generation call.

          - `Result string`

            The generated image encoded in base64.

          - `Status string`

            The status of the image generation call.

            - `const BetaResponseOutputItemImageGenerationCallStatusInProgress BetaResponseOutputItemImageGenerationCallStatus = "in_progress"`

            - `const BetaResponseOutputItemImageGenerationCallStatusCompleted BetaResponseOutputItemImageGenerationCallStatus = "completed"`

            - `const BetaResponseOutputItemImageGenerationCallStatusGenerating BetaResponseOutputItemImageGenerationCallStatus = "generating"`

            - `const BetaResponseOutputItemImageGenerationCallStatusFailed BetaResponseOutputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            The type of the image generation call. Always `image_generation_call`.

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Agent BetaResponseOutputItemImageGenerationCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

        - `type BetaResponseOutputItemLocalShellCall struct{…}`

          A tool call to run a command on the local shell.

          - `ID string`

            The unique ID of the local shell call.

          - `Action BetaResponseOutputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

              The command to run.

            - `Env map[string, string]`

              Environment variables to set for the command.

            - `Type Exec`

              The type of the local shell action. Always `exec`.

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the command.

            - `User string`

              Optional user to run the command as.

            - `WorkingDirectory string`

              Optional working directory to run the command in.

          - `CallID string`

            The unique ID of the local shell tool call generated by the model.

          - `Status string`

            The status of the local shell call.

            - `const BetaResponseOutputItemLocalShellCallStatusInProgress BetaResponseOutputItemLocalShellCallStatus = "in_progress"`

            - `const BetaResponseOutputItemLocalShellCallStatusCompleted BetaResponseOutputItemLocalShellCallStatus = "completed"`

            - `const BetaResponseOutputItemLocalShellCallStatusIncomplete BetaResponseOutputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            The type of the local shell call. Always `local_shell_call`.

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

          - `Agent BetaResponseOutputItemLocalShellCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseOutputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

            The unique ID of the local shell tool call generated by the model.

          - `Output string`

            A JSON string of the output of the local shell tool call.

          - `Type LocalShellCallOutput`

            The type of the local shell tool call output. Always `local_shell_call_output`.

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Agent BetaResponseOutputItemLocalShellCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseOutputItemLocalShellCallOutputStatusInProgress BetaResponseOutputItemLocalShellCallOutputStatus = "in_progress"`

            - `const BetaResponseOutputItemLocalShellCallOutputStatusCompleted BetaResponseOutputItemLocalShellCallOutputStatus = "completed"`

            - `const BetaResponseOutputItemLocalShellCallOutputStatusIncomplete BetaResponseOutputItemLocalShellCallOutputStatus = "incomplete"`

        - `type BetaResponseFunctionShellToolCall struct{…}`

          A tool call that executes one or more shell commands in a managed environment.

          - `ID string`

            The unique ID of the shell tool call. Populated when this item is returned via API.

          - `Action BetaResponseFunctionShellToolCallAction`

            The shell commands and limits that describe how to run the tool call.

            - `Commands []string`

            - `MaxOutputLength int64`

              Optional maximum number of characters to return from each command.

            - `TimeoutMs int64`

              Optional timeout in milliseconds for the commands.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

            Represents the use of a local environment to perform shell actions.

            - `type BetaResponseLocalEnvironment struct{…}`

              Represents the use of a local environment to perform shell actions.

              - `Type Local`

                The environment type. Always `local`.

                - `const LocalLocal Local = "local"`

            - `type BetaResponseContainerReference struct{…}`

              Represents a container created with /v1/containers.

              - `ContainerID string`

              - `Type ContainerReference`

                The environment type. Always `container_reference`.

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `Status BetaResponseFunctionShellToolCallStatus`

            The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

            - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

            - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

          - `Type ShellCall`

            The type of the item. Always `shell_call`.

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `Agent BetaResponseFunctionShellToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionShellToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The ID of the entity that created this tool call.

        - `type BetaResponseFunctionShellToolCallOutput struct{…}`

          The output of a shell tool call that was emitted.

          - `ID string`

            The unique ID of the shell call output. Populated when this item is returned via API.

          - `CallID string`

            The unique ID of the shell tool call generated by the model.

          - `MaxOutputLength int64`

            The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

          - `Output []BetaResponseFunctionShellToolCallOutputOutput`

            An array of shell call output contents

            - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

              Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

              - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  The outcome type. Always `timeout`.

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

                Indicates that the shell commands finished and returned an exit code.

                - `ExitCode int64`

                  Exit code from the shell process.

                - `Type Exit`

                  The outcome type. Always `exit`.

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

              The standard error output that was captured.

            - `Stdout string`

              The standard output that was captured.

            - `CreatedBy string`

              The identifier of the actor that created the item.

          - `Status BetaResponseFunctionShellToolCallOutputStatus`

            The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

            - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

            - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

            - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

          - `Type ShellCallOutput`

            The type of the shell call output. Always `shell_call_output`.

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `Agent BetaResponseFunctionShellToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The identifier of the actor that created the item.

        - `type BetaResponseApplyPatchToolCall struct{…}`

          A tool call that applies file diffs by creating, deleting, or updating files.

          - `ID string`

            The unique ID of the apply patch tool call. Populated when this item is returned via API.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Operation BetaResponseApplyPatchToolCallOperationUnion`

            One of the create_file, delete_file, or update_file operations applied via apply_patch.

            - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

              Instruction describing how to create a file via the apply_patch tool.

              - `Diff string`

                Diff to apply.

              - `Path string`

                Path of the file to create.

              - `Type CreateFile`

                Create a new file with the provided diff.

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

              Instruction describing how to delete a file via the apply_patch tool.

              - `Path string`

                Path of the file to delete.

              - `Type DeleteFile`

                Delete the specified file.

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

              Instruction describing how to update a file via the apply_patch tool.

              - `Diff string`

                Diff to apply.

              - `Path string`

                Path of the file to update.

              - `Type UpdateFile`

                Update an existing file with the provided diff.

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status BetaResponseApplyPatchToolCallStatus`

            The status of the apply patch tool call. One of `in_progress` or `completed`.

            - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

            - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

          - `Type ApplyPatchCall`

            The type of the item. Always `apply_patch_call`.

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `Agent BetaResponseApplyPatchToolCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseApplyPatchToolCallCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The ID of the entity that created this tool call.

        - `type BetaResponseApplyPatchToolCallOutput struct{…}`

          The output emitted by an apply patch tool call.

          - `ID string`

            The unique ID of the apply patch tool call output. Populated when this item is returned via API.

          - `CallID string`

            The unique ID of the apply patch tool call generated by the model.

          - `Status BetaResponseApplyPatchToolCallOutputStatus`

            The status of the apply patch tool call output. One of `completed` or `failed`.

            - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

            - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            The type of the item. Always `apply_patch_call_output`.

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `Agent BetaResponseApplyPatchToolCallOutputAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

            The execution context that produced this tool call.

            - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

              - `Type Direct`

                - `const DirectDirect Direct = "direct"`

            - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

              - `CallerID string`

                The call ID of the program item that produced this tool call.

              - `Type Program`

                - `const ProgramProgram Program = "program"`

          - `CreatedBy string`

            The ID of the entity that created this tool call output.

          - `Output string`

            Optional textual output returned by the apply patch tool.

        - `type BetaResponseOutputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

            The unique ID of the tool call.

          - `Arguments string`

            A JSON string of the arguments passed to the tool.

          - `Name string`

            The name of the tool that was run.

          - `ServerLabel string`

            The label of the MCP server running the tool.

          - `Type McpCall`

            The type of the item. Always `mcp_call`.

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `Agent BetaResponseOutputItemMcpCallAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `ApprovalRequestID string`

            Unique identifier for the MCP tool call approval request.
            Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

          - `Error string`

            The error from the tool call, if any.

          - `Output string`

            The output from the tool call.

          - `Status string`

            The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

            - `const BetaResponseOutputItemMcpCallStatusInProgress BetaResponseOutputItemMcpCallStatus = "in_progress"`

            - `const BetaResponseOutputItemMcpCallStatusCompleted BetaResponseOutputItemMcpCallStatus = "completed"`

            - `const BetaResponseOutputItemMcpCallStatusIncomplete BetaResponseOutputItemMcpCallStatus = "incomplete"`

            - `const BetaResponseOutputItemMcpCallStatusCalling BetaResponseOutputItemMcpCallStatus = "calling"`

            - `const BetaResponseOutputItemMcpCallStatusFailed BetaResponseOutputItemMcpCallStatus = "failed"`

        - `type BetaResponseOutputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

            The unique ID of the list.

          - `ServerLabel string`

            The label of the MCP server.

          - `Tools []BetaResponseOutputItemMcpListToolsTool`

            The tools available on the server.

            - `InputSchema any`

              The JSON schema describing the tool's input.

            - `Name string`

              The name of the tool.

            - `Annotations any`

              Additional annotations about the tool.

            - `Description string`

              The description of the tool.

          - `Type McpListTools`

            The type of the item. Always `mcp_list_tools`.

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Agent BetaResponseOutputItemMcpListToolsAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Error string`

            Error message if the server could not list tools.

        - `type BetaResponseOutputItemMcpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

          - `ID string`

            The unique ID of the approval request.

          - `Arguments string`

            A JSON string of arguments for the tool.

          - `Name string`

            The name of the tool to run.

          - `ServerLabel string`

            The label of the MCP server making the request.

          - `Type McpApprovalRequest`

            The type of the item. Always `mcp_approval_request`.

            - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

          - `Agent BetaResponseOutputItemMcpApprovalRequestAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

        - `type BetaResponseOutputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ID string`

            The unique ID of the approval response

          - `ApprovalRequestID string`

            The ID of the approval request being answered.

          - `Approve bool`

            Whether the request was approved.

          - `Type McpApprovalResponse`

            The type of the item. Always `mcp_approval_response`.

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `Agent BetaResponseOutputItemMcpApprovalResponseAgent`

            The agent that produced this item.

            - `AgentName string`

              The canonical name of the agent that produced this item.

          - `Reason string`

            Optional reason for the decision.

        - `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.

          - `ID string`

            The unique ID of the custom tool call output item.

          - `Status string`

            The status of the item. One of `in_progress`, `completed`, or
            `incomplete`. Populated when items are returned via API.

            - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

            - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

            - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

          - `CreatedBy string`

            The identifier of the actor that created the item.

      - `ParallelToolCalls bool`

        Whether to allow the model to run tool calls in parallel.

      - `Temperature float64`

        What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        We generally recommend altering this or `top_p` but not both.

      - `ToolChoice BetaResponseToolChoiceUnion`

        How the model should select which tool (or tools) to use when generating
        a response. See the `tools` parameter to see how to specify which tools
        the model can call.

        - `type BetaToolChoiceOptions string`

          Controls which (if any) tool is called by the model.

          `none` means the model will not call any tool and instead generates a message.

          `auto` means the model can pick between generating a message or calling one or
          more tools.

          `required` means the model must call one or more tools.

          - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

          - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

          - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

        - `type BetaToolChoiceAllowed struct{…}`

          Constrains the tools available to the model to a pre-defined set.

          - `Mode BetaToolChoiceAllowedMode`

            Constrains the tools available to the model to a pre-defined set.

            `auto` allows the model to pick from among the allowed tools and generate a
            message.

            `required` requires the model to call one or more of the allowed tools.

            - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

            - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

          - `Tools []map[string, any]`

            A list of tool definitions that the model should be allowed to call.

            For the Responses API, the list of tool definitions might look like:

            ```json
            [
              { "type": "function", "name": "get_weather" },
              { "type": "mcp", "server_label": "deepwiki" },
              { "type": "image_generation" }
            ]
            ```

          - `Type AllowedTools`

            Allowed tool configuration type. Always `allowed_tools`.

            - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

        - `type BetaToolChoiceTypes struct{…}`

          Indicates that the model should use a built-in tool to generate a response.
          [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

          - `Type BetaToolChoiceTypesType`

            The type of hosted tool the model should to use. Learn more about
            [built-in tools](https://platform.openai.com/docs/guides/tools).

            Allowed values are:

            - `file_search`
            - `web_search_preview`
            - `computer`
            - `computer_use_preview`
            - `computer_use`
            - `code_interpreter`
            - `image_generation`

            - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

            - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

            - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

            - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

            - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

            - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

            - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

            - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

        - `type BetaToolChoiceFunction struct{…}`

          Use this option to force the model to call a specific function.

          - `Name string`

            The name of the function to call.

          - `Type Function`

            For function calling, the type is always `function`.

            - `const FunctionFunction Function = "function"`

        - `type BetaToolChoiceMcp struct{…}`

          Use this option to force the model to call a specific tool on a remote MCP server.

          - `ServerLabel string`

            The label of the MCP server to use.

          - `Type Mcp`

            For MCP tools, the type is always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `Name string`

            The name of the tool to call on the server.

        - `type BetaToolChoiceCustom struct{…}`

          Use this option to force the model to call a specific custom tool.

          - `Name string`

            The name of the custom tool to call.

          - `Type Custom`

            For custom tool calling, the type is always `custom`.

            - `const CustomCustom Custom = "custom"`

        - `type BetaResponseToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

          - `Type ProgrammaticToolCalling`

            The tool to call. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolChoiceApplyPatch struct{…}`

          Forces the model to call the apply_patch tool when executing a tool call.

          - `Type ApplyPatch`

            The tool to call. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

        - `type BetaToolChoiceShell struct{…}`

          Forces the model to call the shell tool when a tool call is required.

          - `Type Shell`

            The tool to call. Always `shell`.

            - `const ShellShell Shell = "shell"`

      - `Tools []BetaToolUnion`

        An array of tools the model may call while generating a response. You
        can specify which tool to use by setting the `tool_choice` parameter.

        We support the following categories of tools:

        - **Built-in tools**: Tools that are provided by OpenAI that extend the
          model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
          or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
          [built-in tools](https://platform.openai.com/docs/guides/tools).
        - **MCP Tools**: Integrations with third-party systems via custom MCP servers
          or predefined connectors such as Google Drive and SharePoint. Learn more about
          [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
        - **Function calls (custom tools)**: Functions that are defined by you,
          enabling the model to call your own code with strongly typed arguments
          and outputs. Learn more about
          [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
          custom tools to call your own code.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `TopP float64`

        An alternative to sampling with temperature, called nucleus sampling,
        where the model considers the results of the tokens with top_p probability
        mass. So 0.1 means only the tokens comprising the top 10% probability mass
        are considered.

        We generally recommend altering this or `temperature` but not both.

      - `Background bool`

        Whether to run the model response in the background.
        [Learn more](https://platform.openai.com/docs/guides/background).

      - `CompletedAt float64`

        Unix timestamp (in seconds) of when this Response was completed.
        Only present when the status is `completed`.

      - `Conversation BetaResponseConversation`

        The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.

        - `ID string`

          The unique ID of the conversation that this response was associated with.

      - `MaxOutputTokens int64`

        An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

      - `MaxToolCalls int64`

        The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

      - `Moderation BetaResponseModeration`

        Moderation results for the response input and output, if moderated completions were requested.

        - `Input BetaResponseModerationInputUnion`

          Moderation for the response input.

          - `type BetaResponseModerationInputModerationResult struct{…}`

            A moderation result produced for the response input or output.

            - `Categories map[string, bool]`

              A dictionary of moderation categories to booleans, True if the input is flagged under this category.

            - `CategoryAppliedInputTypes map[string, []string]`

              Which modalities of input are reflected by the score for each category.

              - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeText BetaResponseModerationInputModerationResultCategoryAppliedInputType = "text"`

              - `const BetaResponseModerationInputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationInputModerationResultCategoryAppliedInputType = "image"`

            - `CategoryScores map[string, float64]`

              A dictionary of moderation categories to scores.

            - `Flagged bool`

              A boolean indicating whether the content was flagged by any category.

            - `Model string`

              The moderation model that produced this result.

            - `Type ModerationResult`

              The object type, which was always `moderation_result` for successful moderation results.

              - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

          - `type BetaResponseModerationInputError struct{…}`

            An error produced while attempting moderation for the response input or output.

            - `Code string`

              The error code.

            - `Message string`

              The error message.

            - `Type Error`

              The object type, which was always `error` for moderation failures.

              - `const ErrorError Error = "error"`

        - `Output BetaResponseModerationOutputUnion`

          Moderation for the response output.

          - `type BetaResponseModerationOutputModerationResult struct{…}`

            A moderation result produced for the response input or output.

            - `Categories map[string, bool]`

              A dictionary of moderation categories to booleans, True if the input is flagged under this category.

            - `CategoryAppliedInputTypes map[string, []string]`

              Which modalities of input are reflected by the score for each category.

              - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeText BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "text"`

              - `const BetaResponseModerationOutputModerationResultCategoryAppliedInputTypeImage BetaResponseModerationOutputModerationResultCategoryAppliedInputType = "image"`

            - `CategoryScores map[string, float64]`

              A dictionary of moderation categories to scores.

            - `Flagged bool`

              A boolean indicating whether the content was flagged by any category.

            - `Model string`

              The moderation model that produced this result.

            - `Type ModerationResult`

              The object type, which was always `moderation_result` for successful moderation results.

              - `const ModerationResultModerationResult ModerationResult = "moderation_result"`

          - `type BetaResponseModerationOutputError struct{…}`

            An error produced while attempting moderation for the response input or output.

            - `Code string`

              The error code.

            - `Message string`

              The error message.

            - `Type Error`

              The object type, which was always `error` for moderation failures.

              - `const ErrorError Error = "error"`

      - `PreviousResponseID string`

        The unique ID of the previous response to the model. Use this to
        create multi-turn conversations. Learn more about
        [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

      - `Prompt BetaResponsePrompt`

        Reference to a prompt template and its variables.
        [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).

        - `ID string`

          The unique identifier of the prompt template to use.

        - `Variables map[string, BetaResponsePromptVariableUnion]`

          Optional map of values to substitute in for variables in your
          prompt. The substitution values can either be strings, or other
          Response input types like images or files.

          - `string`

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

        - `Version string`

          Optional version of the prompt template.

      - `PromptCacheKey string`

        Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

      - `PromptCacheOptions BetaResponsePromptCacheOptions`

        The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.

        - `Mode string`

          Whether implicit prompt-cache breakpoints were enabled.

          - `const BetaResponsePromptCacheOptionsModeImplicit BetaResponsePromptCacheOptionsMode = "implicit"`

          - `const BetaResponsePromptCacheOptionsModeExplicit BetaResponsePromptCacheOptionsMode = "explicit"`

        - `Ttl string`

          The minimum lifetime applied to each cache breakpoint.

          - `const BetaResponsePromptCacheOptionsTtl30m BetaResponsePromptCacheOptionsTtl = "30m"`

      - `PromptCacheRetention BetaResponsePromptCacheRetention`

        Deprecated. Use `prompt_cache_options.ttl` instead.

        The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
        This field expresses a maximum retention policy, while
        `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two
        fields are independent and do not interact.
        For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.

        For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:

        - Organizations without ZDR enabled default to `24h`.
        - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.

        - `const BetaResponsePromptCacheRetentionInMemory BetaResponsePromptCacheRetention = "in_memory"`

        - `const BetaResponsePromptCacheRetention24h BetaResponsePromptCacheRetention = "24h"`

      - `Reasoning BetaResponseReasoning`

        **gpt-5 and o-series models only**

        Configuration options for
        [reasoning models](https://platform.openai.com/docs/guides/reasoning).

        - `Context string`

          Controls which reasoning items are rendered back to the model on later turns.
          If omitted or set to `auto`, the model determines the context mode. The
          `gpt-5.6` model family defaults to `all_turns`; earlier models default to
          `current_turn`.

          When returned on a response, this is the effective reasoning context mode
          used for the response.

          - `const BetaResponseReasoningContextAuto BetaResponseReasoningContext = "auto"`

          - `const BetaResponseReasoningContextCurrentTurn BetaResponseReasoningContext = "current_turn"`

          - `const BetaResponseReasoningContextAllTurns BetaResponseReasoningContext = "all_turns"`

        - `Effort string`

          Constrains effort on reasoning for reasoning models. Currently supported
          values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
          Reducing reasoning effort can result in faster responses and fewer tokens
          used on reasoning in a response. Not all reasoning models support every
          value. See the
          [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
          for model-specific support.

          - `const BetaResponseReasoningEffortNone BetaResponseReasoningEffort = "none"`

          - `const BetaResponseReasoningEffortMinimal BetaResponseReasoningEffort = "minimal"`

          - `const BetaResponseReasoningEffortLow BetaResponseReasoningEffort = "low"`

          - `const BetaResponseReasoningEffortMedium BetaResponseReasoningEffort = "medium"`

          - `const BetaResponseReasoningEffortHigh BetaResponseReasoningEffort = "high"`

          - `const BetaResponseReasoningEffortXhigh BetaResponseReasoningEffort = "xhigh"`

          - `const BetaResponseReasoningEffortMax BetaResponseReasoningEffort = "max"`

        - `GenerateSummary string`

          **Deprecated:** use `summary` instead.

          A summary of the reasoning performed by the model. This can be
          useful for debugging and understanding the model's reasoning process.
          One of `auto`, `concise`, or `detailed`.

          - `const BetaResponseReasoningGenerateSummaryAuto BetaResponseReasoningGenerateSummary = "auto"`

          - `const BetaResponseReasoningGenerateSummaryConcise BetaResponseReasoningGenerateSummary = "concise"`

          - `const BetaResponseReasoningGenerateSummaryDetailed BetaResponseReasoningGenerateSummary = "detailed"`

        - `Mode string`

          Controls the reasoning execution mode for the request.

          When returned on a response, this is the effective execution mode.

          - `string`

          - `string`

            - `const BetaResponseReasoningModeStandard BetaResponseReasoningMode = "standard"`

            - `const BetaResponseReasoningModePro BetaResponseReasoningMode = "pro"`

        - `Summary string`

          A summary of the reasoning performed by the model. This can be
          useful for debugging and understanding the model's reasoning process.
          One of `auto`, `concise`, or `detailed`.

          `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

          - `const BetaResponseReasoningSummaryAuto BetaResponseReasoningSummary = "auto"`

          - `const BetaResponseReasoningSummaryConcise BetaResponseReasoningSummary = "concise"`

          - `const BetaResponseReasoningSummaryDetailed BetaResponseReasoningSummary = "detailed"`

      - `SafetyIdentifier string`

        A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
        The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

      - `ServiceTier BetaResponseServiceTier`

        Specifies the processing type used for serving the request.

        - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
        - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
        - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
        - When not set, the default behavior is 'auto'.

        When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

        - `const BetaResponseServiceTierAuto BetaResponseServiceTier = "auto"`

        - `const BetaResponseServiceTierDefault BetaResponseServiceTier = "default"`

        - `const BetaResponseServiceTierFlex BetaResponseServiceTier = "flex"`

        - `const BetaResponseServiceTierScale BetaResponseServiceTier = "scale"`

        - `const BetaResponseServiceTierPriority BetaResponseServiceTier = "priority"`

      - `Status BetaResponseStatus`

        The status of the response generation. One of `completed`, `failed`,
        `in_progress`, `cancelled`, `queued`, or `incomplete`.

        - `const BetaResponseStatusCompleted BetaResponseStatus = "completed"`

        - `const BetaResponseStatusFailed BetaResponseStatus = "failed"`

        - `const BetaResponseStatusInProgress BetaResponseStatus = "in_progress"`

        - `const BetaResponseStatusCancelled BetaResponseStatus = "cancelled"`

        - `const BetaResponseStatusQueued BetaResponseStatus = "queued"`

        - `const BetaResponseStatusIncomplete BetaResponseStatus = "incomplete"`

      - `Text BetaResponseTextConfig`

        Configuration options for a text response from the model. Can be plain
        text or structured JSON data. Learn more:

        - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
        - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

        - `Format BetaResponseFormatTextConfigUnion`

          An object specifying the format that the model must output.

          Configuring `{ "type": "json_schema" }` enables Structured Outputs,
          which ensures the model will match your supplied JSON schema. Learn more in the
          [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

          The default format is `{ "type": "text" }` with no additional options.

          **Not recommended for gpt-4o and newer models:**

          Setting to `{ "type": "json_object" }` enables the older JSON mode, which
          ensures the message the model generates is valid JSON. Using `json_schema`
          is preferred for models that support it.

          - `type BetaResponseFormatTextConfigText struct{…}`

            Default response format. Used to generate text responses.

            - `Type Text`

              The type of response format being defined. Always `text`.

              - `const TextText Text = "text"`

          - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

            JSON Schema response format. Used to generate structured JSON responses.
            Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

            - `Name string`

              The name of the response format. Must be a-z, A-Z, 0-9, or contain
              underscores and dashes, with a maximum length of 64.

            - `Schema map[string, any]`

              The schema for the response format, described as a JSON Schema object.
              Learn how to build JSON schemas [here](https://json-schema.org/).

            - `Type JSONSchema`

              The type of response format being defined. Always `json_schema`.

              - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

            - `Description string`

              A description of what the response format is for, used by the model to
              determine how to respond in the format.

            - `Strict bool`

              Whether to enable strict schema adherence when generating the output.
              If set to true, the model will always follow the exact schema defined
              in the `schema` field. Only a subset of JSON Schema is supported when
              `strict` is `true`. To learn more, read the [Structured Outputs
              guide](https://platform.openai.com/docs/guides/structured-outputs).

          - `type BetaResponseFormatTextConfigJSONObject struct{…}`

            JSON object response format. An older method of generating JSON responses.
            Using `json_schema` is recommended for models that support it. Note that the
            model will not generate JSON without a system or user message instructing it
            to do so.

            - `Type JSONObject`

              The type of response format being defined. Always `json_object`.

              - `const JSONObjectJSONObject JSONObject = "json_object"`

        - `Verbosity BetaResponseTextConfigVerbosity`

          Constrains the verbosity of the model's response. Lower values will result in
          more concise responses, while higher values will result in more verbose responses.
          Currently supported values are `low`, `medium`, and `high`. The default is
          `medium`.

          - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

          - `const BetaResponseTextConfigVerbosityMedium BetaResponseTextConfigVerbosity = "medium"`

          - `const BetaResponseTextConfigVerbosityHigh BetaResponseTextConfigVerbosity = "high"`

      - `TopLogprobs int64`

        An integer between 0 and 20 specifying the maximum number of most likely
        tokens to return at each token position, each with an associated log
        probability. In some cases, the number of returned tokens may be fewer than
        requested.

      - `Truncation BetaResponseTruncation`

        The truncation strategy to use for the model response.

        - `auto`: If the input to this Response exceeds
          the model's context window size, the model will truncate the
          response to fit the context window by dropping items from the beginning of the conversation.
        - `disabled` (default): If the input size will exceed the context window
          size for a model, the request will fail with a 400 error.

        - `const BetaResponseTruncationAuto BetaResponseTruncation = "auto"`

        - `const BetaResponseTruncationDisabled BetaResponseTruncation = "disabled"`

      - `Usage BetaResponseUsage`

        Represents token usage details including input tokens, output tokens,
        a breakdown of output tokens, and the total tokens used.

        - `InputTokens int64`

          The number of input tokens.

        - `InputTokensDetails BetaResponseUsageInputTokensDetails`

          A detailed breakdown of the input tokens.

          - `CacheWriteTokens int64`

            The number of input tokens that were written to the cache.

          - `CachedTokens int64`

            The number of tokens that were retrieved from the cache.
            [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).

        - `OutputTokens int64`

          The number of output tokens.

        - `OutputTokensDetails BetaResponseUsageOutputTokensDetails`

          A detailed breakdown of the output tokens.

          - `ReasoningTokens int64`

            The number of reasoning tokens.

        - `TotalTokens int64`

          The total number of tokens used.

      - `User string`

        This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
        A stable identifier for your end-users.
        Used to boost cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseCompleted`

      The type of the event. Always `response.completed`.

      - `const ResponseCompletedResponseCompleted ResponseCompleted = "response.completed"`

    - `Agent BetaResponseCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseContentPartAddedEvent struct{…}`

    Emitted when a new content part is added.

    - `ContentIndex int64`

      The index of the content part that was added.

    - `ItemID string`

      The ID of the output item that the content part was added to.

    - `OutputIndex int64`

      The index of the output item that the content part was added to.

    - `Part BetaResponseContentPartAddedEventPartUnion`

      The content part that was added.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

      - `type BetaResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type BetaResponseContentPartAddedEventPartReasoningText 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`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseContentPartAdded`

      The type of the event. Always `response.content_part.added`.

      - `const ResponseContentPartAddedResponseContentPartAdded ResponseContentPartAdded = "response.content_part.added"`

    - `Agent BetaResponseContentPartAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseContentPartDoneEvent struct{…}`

    Emitted when a content part is done.

    - `ContentIndex int64`

      The index of the content part that is done.

    - `ItemID string`

      The ID of the output item that the content part was added to.

    - `OutputIndex int64`

      The index of the output item that the content part was added to.

    - `Part BetaResponseContentPartDoneEventPartUnion`

      The content part that is done.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

      - `type BetaResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type BetaResponseContentPartDoneEventPartReasoningText 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`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseContentPartDone`

      The type of the event. Always `response.content_part.done`.

      - `const ResponseContentPartDoneResponseContentPartDone ResponseContentPartDone = "response.content_part.done"`

    - `Agent BetaResponseContentPartDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCreatedEvent struct{…}`

    An event that is emitted when a response is created.

    - `Response BetaResponse`

      The response that was created.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseCreated`

      The type of the event. Always `response.created`.

      - `const ResponseCreatedResponseCreated ResponseCreated = "response.created"`

    - `Agent BetaResponseCreatedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseErrorEvent struct{…}`

    Emitted when an error occurs.

    - `Code string`

      The error code.

    - `Message string`

      The error message.

    - `Param string`

      The error parameter.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type Error`

      The type of the event. Always `error`.

      - `const ErrorError Error = "error"`

    - `Agent BetaResponseErrorEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFileSearchCallCompletedEvent struct{…}`

    Emitted when a file search call is completed (results found).

    - `ItemID string`

      The ID of the output item that the file search call is initiated.

    - `OutputIndex int64`

      The index of the output item that the file search call is initiated.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFileSearchCallCompleted`

      The type of the event. Always `response.file_search_call.completed`.

      - `const ResponseFileSearchCallCompletedResponseFileSearchCallCompleted ResponseFileSearchCallCompleted = "response.file_search_call.completed"`

    - `Agent BetaResponseFileSearchCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFileSearchCallInProgressEvent struct{…}`

    Emitted when a file search call is initiated.

    - `ItemID string`

      The ID of the output item that the file search call is initiated.

    - `OutputIndex int64`

      The index of the output item that the file search call is initiated.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFileSearchCallInProgress`

      The type of the event. Always `response.file_search_call.in_progress`.

      - `const ResponseFileSearchCallInProgressResponseFileSearchCallInProgress ResponseFileSearchCallInProgress = "response.file_search_call.in_progress"`

    - `Agent BetaResponseFileSearchCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFileSearchCallSearchingEvent struct{…}`

    Emitted when a file search is currently searching.

    - `ItemID string`

      The ID of the output item that the file search call is initiated.

    - `OutputIndex int64`

      The index of the output item that the file search call is searching.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFileSearchCallSearching`

      The type of the event. Always `response.file_search_call.searching`.

      - `const ResponseFileSearchCallSearchingResponseFileSearchCallSearching ResponseFileSearchCallSearching = "response.file_search_call.searching"`

    - `Agent BetaResponseFileSearchCallSearchingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionCallArgumentsDeltaEvent struct{…}`

    Emitted when there is a partial function-call arguments delta.

    - `Delta string`

      The function-call arguments delta that is added.

    - `ItemID string`

      The ID of the output item that the function-call arguments delta is added to.

    - `OutputIndex int64`

      The index of the output item that the function-call arguments delta is added to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFunctionCallArgumentsDelta`

      The type of the event. Always `response.function_call_arguments.delta`.

      - `const ResponseFunctionCallArgumentsDeltaResponseFunctionCallArgumentsDelta ResponseFunctionCallArgumentsDelta = "response.function_call_arguments.delta"`

    - `Agent BetaResponseFunctionCallArgumentsDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionCallArgumentsDoneEvent struct{…}`

    Emitted when function-call arguments are finalized.

    - `Arguments string`

      The function-call arguments.

    - `ItemID string`

      The ID of the item.

    - `Name string`

      The name of the function that was called.

    - `OutputIndex int64`

      The index of the output item.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFunctionCallArgumentsDone`

      - `const ResponseFunctionCallArgumentsDoneResponseFunctionCallArgumentsDone ResponseFunctionCallArgumentsDone = "response.function_call_arguments.done"`

    - `Agent BetaResponseFunctionCallArgumentsDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInProgressEvent struct{…}`

    Emitted when the response is in progress.

    - `Response BetaResponse`

      The response that is in progress.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseInProgress`

      The type of the event. Always `response.in_progress`.

      - `const ResponseInProgressResponseInProgress ResponseInProgress = "response.in_progress"`

    - `Agent BetaResponseInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFailedEvent struct{…}`

    An event that is emitted when a response fails.

    - `Response BetaResponse`

      The response that failed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseFailed`

      The type of the event. Always `response.failed`.

      - `const ResponseFailedResponseFailed ResponseFailed = "response.failed"`

    - `Agent BetaResponseFailedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseIncompleteEvent struct{…}`

    An event that is emitted when a response finishes as incomplete.

    - `Response BetaResponse`

      The response that was incomplete.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseIncomplete`

      The type of the event. Always `response.incomplete`.

      - `const ResponseIncompleteResponseIncomplete ResponseIncomplete = "response.incomplete"`

    - `Agent BetaResponseIncompleteEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemAddedEvent struct{…}`

    Emitted when a new output item is added.

    - `Item BetaResponseOutputItemUnion`

      The output item that was added.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseFunctionToolCallOutputItem struct{…}`

      - `type BetaResponseOutputItemAgentMessage struct{…}`

      - `type BetaResponseOutputItemMultiAgentCall struct{…}`

      - `type BetaResponseOutputItemMultiAgentCallOutput struct{…}`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `type BetaResponseComputerToolCallOutputItem struct{…}`

      - `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](https://platform.openai.com/docs/guides/conversation-state).

      - `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](https://platform.openai.com/docs/api-reference/responses/compact).

      - `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.

    - `OutputIndex int64`

      The index of the output item that was added.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseOutputItemAdded`

      The type of the event. Always `response.output_item.added`.

      - `const ResponseOutputItemAddedResponseOutputItemAdded ResponseOutputItemAdded = "response.output_item.added"`

    - `Agent BetaResponseOutputItemAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputItemDoneEvent struct{…}`

    Emitted when an output item is marked done.

    - `Item BetaResponseOutputItemUnion`

      The output item that was marked done.

    - `OutputIndex int64`

      The index of the output item that was marked done.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseOutputItemDone`

      The type of the event. Always `response.output_item.done`.

      - `const ResponseOutputItemDoneResponseOutputItemDone ResponseOutputItemDone = "response.output_item.done"`

    - `Agent BetaResponseOutputItemDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningSummaryPartAddedEvent struct{…}`

    Emitted when a new reasoning summary part is added.

    - `ItemID string`

      The ID of the item this summary part is associated with.

    - `OutputIndex int64`

      The index of the output item this summary part is associated with.

    - `Part BetaResponseReasoningSummaryPartAddedEventPart`

      The summary part that was added.

      - `Text string`

        The text of the summary part.

      - `Type SummaryText`

        The type of the summary part. Always `summary_text`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Type ResponseReasoningSummaryPartAdded`

      The type of the event. Always `response.reasoning_summary_part.added`.

      - `const ResponseReasoningSummaryPartAddedResponseReasoningSummaryPartAdded ResponseReasoningSummaryPartAdded = "response.reasoning_summary_part.added"`

    - `Agent BetaResponseReasoningSummaryPartAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningSummaryPartDoneEvent struct{…}`

    Emitted when a reasoning summary part is completed.

    - `ItemID string`

      The ID of the item this summary part is associated with.

    - `OutputIndex int64`

      The index of the output item this summary part is associated with.

    - `Part BetaResponseReasoningSummaryPartDoneEventPart`

      The completed summary part.

      - `Text string`

        The text of the summary part.

      - `Type SummaryText`

        The type of the summary part. Always `summary_text`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Type ResponseReasoningSummaryPartDone`

      The type of the event. Always `response.reasoning_summary_part.done`.

      - `const ResponseReasoningSummaryPartDoneResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDone = "response.reasoning_summary_part.done"`

    - `Agent BetaResponseReasoningSummaryPartDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status BetaResponseReasoningSummaryPartDoneEventStatus`

      The completion status of the summary part. Omitted when the part completed
      normally and set to `incomplete` when generation was interrupted.

      - `const BetaResponseReasoningSummaryPartDoneEventStatusIncomplete BetaResponseReasoningSummaryPartDoneEventStatus = "incomplete"`

  - `type BetaResponseReasoningSummaryTextDeltaEvent struct{…}`

    Emitted when a delta is added to a reasoning summary text.

    - `Delta string`

      The text delta that was added to the summary.

    - `ItemID string`

      The ID of the item this summary text delta is associated with.

    - `OutputIndex int64`

      The index of the output item this summary text delta is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Type ResponseReasoningSummaryTextDelta`

      The type of the event. Always `response.reasoning_summary_text.delta`.

      - `const ResponseReasoningSummaryTextDeltaResponseReasoningSummaryTextDelta ResponseReasoningSummaryTextDelta = "response.reasoning_summary_text.delta"`

    - `Agent BetaResponseReasoningSummaryTextDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningSummaryTextDoneEvent struct{…}`

    Emitted when a reasoning summary text is completed.

    - `ItemID string`

      The ID of the item this summary text is associated with.

    - `OutputIndex int64`

      The index of the output item this summary text is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `SummaryIndex int64`

      The index of the summary part within the reasoning summary.

    - `Text string`

      The full text of the completed reasoning summary.

    - `Type ResponseReasoningSummaryTextDone`

      The type of the event. Always `response.reasoning_summary_text.done`.

      - `const ResponseReasoningSummaryTextDoneResponseReasoningSummaryTextDone ResponseReasoningSummaryTextDone = "response.reasoning_summary_text.done"`

    - `Agent BetaResponseReasoningSummaryTextDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningTextDeltaEvent struct{…}`

    Emitted when a delta is added to a reasoning text.

    - `ContentIndex int64`

      The index of the reasoning content part this delta is associated with.

    - `Delta string`

      The text delta that was added to the reasoning content.

    - `ItemID string`

      The ID of the item this reasoning text delta is associated with.

    - `OutputIndex int64`

      The index of the output item this reasoning text delta is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseReasoningTextDelta`

      The type of the event. Always `response.reasoning_text.delta`.

      - `const ResponseReasoningTextDeltaResponseReasoningTextDelta ResponseReasoningTextDelta = "response.reasoning_text.delta"`

    - `Agent BetaResponseReasoningTextDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseReasoningTextDoneEvent struct{…}`

    Emitted when a reasoning text is completed.

    - `ContentIndex int64`

      The index of the reasoning content part.

    - `ItemID string`

      The ID of the item this reasoning text is associated with.

    - `OutputIndex int64`

      The index of the output item this reasoning text is associated with.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Text string`

      The full text of the completed reasoning content.

    - `Type ResponseReasoningTextDone`

      The type of the event. Always `response.reasoning_text.done`.

      - `const ResponseReasoningTextDoneResponseReasoningTextDone ResponseReasoningTextDone = "response.reasoning_text.done"`

    - `Agent BetaResponseReasoningTextDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseRefusalDeltaEvent struct{…}`

    Emitted when there is a partial refusal text.

    - `ContentIndex int64`

      The index of the content part that the refusal text is added to.

    - `Delta string`

      The refusal text that is added.

    - `ItemID string`

      The ID of the output item that the refusal text is added to.

    - `OutputIndex int64`

      The index of the output item that the refusal text is added to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseRefusalDelta`

      The type of the event. Always `response.refusal.delta`.

      - `const ResponseRefusalDeltaResponseRefusalDelta ResponseRefusalDelta = "response.refusal.delta"`

    - `Agent BetaResponseRefusalDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseRefusalDoneEvent struct{…}`

    Emitted when refusal text is finalized.

    - `ContentIndex int64`

      The index of the content part that the refusal text is finalized.

    - `ItemID string`

      The ID of the output item that the refusal text is finalized.

    - `OutputIndex int64`

      The index of the output item that the refusal text is finalized.

    - `Refusal string`

      The refusal text that is finalized.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseRefusalDone`

      The type of the event. Always `response.refusal.done`.

      - `const ResponseRefusalDoneResponseRefusalDone ResponseRefusalDone = "response.refusal.done"`

    - `Agent BetaResponseRefusalDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseTextDeltaEvent struct{…}`

    Emitted when there is an additional text delta.

    - `ContentIndex int64`

      The index of the content part that the text delta was added to.

    - `Delta string`

      The text delta that was added.

    - `ItemID string`

      The ID of the output item that the text delta was added to.

    - `Logprobs []BetaResponseTextDeltaEventLogprob`

      The log probabilities of the tokens in the delta.

      - `Token string`

        A possible text token.

      - `Logprob float64`

        The log probability of this token.

      - `TopLogprobs []BetaResponseTextDeltaEventLogprobTopLogprob`

        The log probabilities of up to 20 of the most likely tokens.

        - `Token string`

          A possible text token.

        - `Logprob float64`

          The log probability of this token.

    - `OutputIndex int64`

      The index of the output item that the text delta was added to.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseOutputTextDelta`

      The type of the event. Always `response.output_text.delta`.

      - `const ResponseOutputTextDeltaResponseOutputTextDelta ResponseOutputTextDelta = "response.output_text.delta"`

    - `Agent BetaResponseTextDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseTextDoneEvent struct{…}`

    Emitted when text content is finalized.

    - `ContentIndex int64`

      The index of the content part that the text content is finalized.

    - `ItemID string`

      The ID of the output item that the text content is finalized.

    - `Logprobs []BetaResponseTextDoneEventLogprob`

      The log probabilities of the tokens in the delta.

      - `Token string`

        A possible text token.

      - `Logprob float64`

        The log probability of this token.

      - `TopLogprobs []BetaResponseTextDoneEventLogprobTopLogprob`

        The log probabilities of up to 20 of the most likely tokens.

        - `Token string`

          A possible text token.

        - `Logprob float64`

          The log probability of this token.

    - `OutputIndex int64`

      The index of the output item that the text content is finalized.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Text string`

      The text content that is finalized.

    - `Type ResponseOutputTextDone`

      The type of the event. Always `response.output_text.done`.

      - `const ResponseOutputTextDoneResponseOutputTextDone ResponseOutputTextDone = "response.output_text.done"`

    - `Agent BetaResponseTextDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseWebSearchCallCompletedEvent struct{…}`

    Emitted when a web search call is completed.

    - `ItemID string`

      Unique ID for the output item associated with the web search call.

    - `OutputIndex int64`

      The index of the output item that the web search call is associated with.

    - `SequenceNumber int64`

      The sequence number of the web search call being processed.

    - `Type ResponseWebSearchCallCompleted`

      The type of the event. Always `response.web_search_call.completed`.

      - `const ResponseWebSearchCallCompletedResponseWebSearchCallCompleted ResponseWebSearchCallCompleted = "response.web_search_call.completed"`

    - `Agent BetaResponseWebSearchCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseWebSearchCallInProgressEvent struct{…}`

    Emitted when a web search call is initiated.

    - `ItemID string`

      Unique ID for the output item associated with the web search call.

    - `OutputIndex int64`

      The index of the output item that the web search call is associated with.

    - `SequenceNumber int64`

      The sequence number of the web search call being processed.

    - `Type ResponseWebSearchCallInProgress`

      The type of the event. Always `response.web_search_call.in_progress`.

      - `const ResponseWebSearchCallInProgressResponseWebSearchCallInProgress ResponseWebSearchCallInProgress = "response.web_search_call.in_progress"`

    - `Agent BetaResponseWebSearchCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseWebSearchCallSearchingEvent struct{…}`

    Emitted when a web search call is executing.

    - `ItemID string`

      Unique ID for the output item associated with the web search call.

    - `OutputIndex int64`

      The index of the output item that the web search call is associated with.

    - `SequenceNumber int64`

      The sequence number of the web search call being processed.

    - `Type ResponseWebSearchCallSearching`

      The type of the event. Always `response.web_search_call.searching`.

      - `const ResponseWebSearchCallSearchingResponseWebSearchCallSearching ResponseWebSearchCallSearching = "response.web_search_call.searching"`

    - `Agent BetaResponseWebSearchCallSearchingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallCompletedEvent struct{…}`

    Emitted when an image generation tool call has completed and the final image is available.

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseImageGenerationCallCompleted`

      The type of the event. Always 'response.image_generation_call.completed'.

      - `const ResponseImageGenerationCallCompletedResponseImageGenerationCallCompleted ResponseImageGenerationCallCompleted = "response.image_generation_call.completed"`

    - `Agent BetaResponseImageGenCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallGeneratingEvent struct{…}`

    Emitted when an image generation tool call is actively generating an image (intermediate state).

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of the image generation item being processed.

    - `Type ResponseImageGenerationCallGenerating`

      The type of the event. Always 'response.image_generation_call.generating'.

      - `const ResponseImageGenerationCallGeneratingResponseImageGenerationCallGenerating ResponseImageGenerationCallGenerating = "response.image_generation_call.generating"`

    - `Agent BetaResponseImageGenCallGeneratingEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallInProgressEvent struct{…}`

    Emitted when an image generation tool call is in progress.

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of the image generation item being processed.

    - `Type ResponseImageGenerationCallInProgress`

      The type of the event. Always 'response.image_generation_call.in_progress'.

      - `const ResponseImageGenerationCallInProgressResponseImageGenerationCallInProgress ResponseImageGenerationCallInProgress = "response.image_generation_call.in_progress"`

    - `Agent BetaResponseImageGenCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseImageGenCallPartialImageEvent struct{…}`

    Emitted when a partial image is available during image generation streaming.

    - `ItemID string`

      The unique identifier of the image generation item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `PartialImageB64 string`

      Base64-encoded partial image data, suitable for rendering as an image.

    - `PartialImageIndex int64`

      0-based index for the partial image (backend is 1-based, but this is 0-based for the user).

    - `SequenceNumber int64`

      The sequence number of the image generation item being processed.

    - `Type ResponseImageGenerationCallPartialImage`

      The type of the event. Always 'response.image_generation_call.partial_image'.

      - `const ResponseImageGenerationCallPartialImageResponseImageGenerationCallPartialImage ResponseImageGenerationCallPartialImage = "response.image_generation_call.partial_image"`

    - `Agent BetaResponseImageGenCallPartialImageEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallArgumentsDeltaEvent struct{…}`

    Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

    - `Delta string`

      A JSON string containing the partial update to the arguments for the MCP tool call.

    - `ItemID string`

      The unique identifier of the MCP tool call item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallArgumentsDelta`

      The type of the event. Always 'response.mcp_call_arguments.delta'.

      - `const ResponseMcpCallArgumentsDeltaResponseMcpCallArgumentsDelta ResponseMcpCallArgumentsDelta = "response.mcp_call_arguments.delta"`

    - `Agent BetaResponseMcpCallArgumentsDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallArgumentsDoneEvent struct{…}`

    Emitted when the arguments for an MCP tool call are finalized.

    - `Arguments string`

      A JSON string containing the finalized arguments for the MCP tool call.

    - `ItemID string`

      The unique identifier of the MCP tool call item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallArgumentsDone`

      The type of the event. Always 'response.mcp_call_arguments.done'.

      - `const ResponseMcpCallArgumentsDoneResponseMcpCallArgumentsDone ResponseMcpCallArgumentsDone = "response.mcp_call_arguments.done"`

    - `Agent BetaResponseMcpCallArgumentsDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallCompletedEvent struct{…}`

    Emitted when an MCP  tool call has completed successfully.

    - `ItemID string`

      The ID of the MCP tool call item that completed.

    - `OutputIndex int64`

      The index of the output item that completed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallCompleted`

      The type of the event. Always 'response.mcp_call.completed'.

      - `const ResponseMcpCallCompletedResponseMcpCallCompleted ResponseMcpCallCompleted = "response.mcp_call.completed"`

    - `Agent BetaResponseMcpCallCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallFailedEvent struct{…}`

    Emitted when an MCP  tool call has failed.

    - `ItemID string`

      The ID of the MCP tool call item that failed.

    - `OutputIndex int64`

      The index of the output item that failed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallFailed`

      The type of the event. Always 'response.mcp_call.failed'.

      - `const ResponseMcpCallFailedResponseMcpCallFailed ResponseMcpCallFailed = "response.mcp_call.failed"`

    - `Agent BetaResponseMcpCallFailedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpCallInProgressEvent struct{…}`

    Emitted when an MCP  tool call is in progress.

    - `ItemID string`

      The unique identifier of the MCP tool call item being processed.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpCallInProgress`

      The type of the event. Always 'response.mcp_call.in_progress'.

      - `const ResponseMcpCallInProgressResponseMcpCallInProgress ResponseMcpCallInProgress = "response.mcp_call.in_progress"`

    - `Agent BetaResponseMcpCallInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpListToolsCompletedEvent struct{…}`

    Emitted when the list of available MCP tools has been successfully retrieved.

    - `ItemID string`

      The ID of the MCP tool call item that produced this output.

    - `OutputIndex int64`

      The index of the output item that was processed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpListToolsCompleted`

      The type of the event. Always 'response.mcp_list_tools.completed'.

      - `const ResponseMcpListToolsCompletedResponseMcpListToolsCompleted ResponseMcpListToolsCompleted = "response.mcp_list_tools.completed"`

    - `Agent BetaResponseMcpListToolsCompletedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpListToolsFailedEvent struct{…}`

    Emitted when the attempt to list available MCP tools has failed.

    - `ItemID string`

      The ID of the MCP tool call item that failed.

    - `OutputIndex int64`

      The index of the output item that failed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpListToolsFailed`

      The type of the event. Always 'response.mcp_list_tools.failed'.

      - `const ResponseMcpListToolsFailedResponseMcpListToolsFailed ResponseMcpListToolsFailed = "response.mcp_list_tools.failed"`

    - `Agent BetaResponseMcpListToolsFailedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseMcpListToolsInProgressEvent struct{…}`

    Emitted when the system is in the process of retrieving the list of available MCP tools.

    - `ItemID string`

      The ID of the MCP tool call item that is being processed.

    - `OutputIndex int64`

      The index of the output item that is being processed.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseMcpListToolsInProgress`

      The type of the event. Always 'response.mcp_list_tools.in_progress'.

      - `const ResponseMcpListToolsInProgressResponseMcpListToolsInProgress ResponseMcpListToolsInProgress = "response.mcp_list_tools.in_progress"`

    - `Agent BetaResponseMcpListToolsInProgressEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseOutputTextAnnotationAddedEvent struct{…}`

    Emitted when an annotation is added to output text content.

    - `Annotation any`

      The annotation object being added. (See annotation schema for details.)

    - `AnnotationIndex int64`

      The index of the annotation within the content part.

    - `ContentIndex int64`

      The index of the content part within the output item.

    - `ItemID string`

      The unique identifier of the item to which the annotation is being added.

    - `OutputIndex int64`

      The index of the output item in the response's output array.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseOutputTextAnnotationAdded`

      The type of the event. Always 'response.output_text.annotation.added'.

      - `const ResponseOutputTextAnnotationAddedResponseOutputTextAnnotationAdded ResponseOutputTextAnnotationAdded = "response.output_text.annotation.added"`

    - `Agent BetaResponseOutputTextAnnotationAddedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseQueuedEvent struct{…}`

    Emitted when a response is queued and waiting to be processed.

    - `Response BetaResponse`

      The full response object that is queued.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseQueued`

      The type of the event. Always 'response.queued'.

      - `const ResponseQueuedResponseQueued ResponseQueued = "response.queued"`

    - `Agent BetaResponseQueuedEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCustomToolCallInputDeltaEvent struct{…}`

    Event representing a delta (partial update) to the input of a custom tool call.

    - `Delta string`

      The incremental input data (delta) for the custom tool call.

    - `ItemID string`

      Unique identifier for the API item associated with this event.

    - `OutputIndex int64`

      The index of the output this delta applies to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseCustomToolCallInputDelta`

      The event type identifier.

      - `const ResponseCustomToolCallInputDeltaResponseCustomToolCallInputDelta ResponseCustomToolCallInputDelta = "response.custom_tool_call_input.delta"`

    - `Agent BetaResponseCustomToolCallInputDeltaEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCustomToolCallInputDoneEvent struct{…}`

    Event indicating that input for a custom tool call is complete.

    - `Input string`

      The complete input data for the custom tool call.

    - `ItemID string`

      Unique identifier for the API item associated with this event.

    - `OutputIndex int64`

      The index of the output this event applies to.

    - `SequenceNumber int64`

      The sequence number of this event.

    - `Type ResponseCustomToolCallInputDone`

      The event type identifier.

      - `const ResponseCustomToolCallInputDoneResponseCustomToolCallInputDone ResponseCustomToolCallInputDone = "response.custom_tool_call_input.done"`

    - `Agent BetaResponseCustomToolCallInputDoneEventAgent`

      The agent that owns this multi-agent streaming event.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseInjectCreatedEvent struct{…}`

    Emitted when all injected input items were validated and committed to the
    active response.

    - `ResponseID string`

      The ID of the response that accepted the input.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseInjectCreated`

      The event discriminator. Always `response.inject.created`.

      - `const ResponseInjectCreatedResponseInjectCreated ResponseInjectCreated = "response.inject.created"`

    - `StreamID string`

      The multiplexed WebSocket stream that emitted the event. This field is
      present only when WebSocket multiplexing is enabled separately.

  - `type BetaResponseInjectFailedEvent struct{…}`

    Emitted when injected input could not be committed to a response. The event
    returns the uncommitted raw input so the client can retry it in another
    response when appropriate.

    - `Error BetaResponseInjectFailedEventError`

      Information about why the input was not committed.

      - `Code string`

        A machine-readable error code.

        - `const BetaResponseInjectFailedEventErrorCodeResponseAlreadyCompleted BetaResponseInjectFailedEventErrorCode = "response_already_completed"`

        - `const BetaResponseInjectFailedEventErrorCodeResponseNotFound BetaResponseInjectFailedEventErrorCode = "response_not_found"`

      - `Message string`

        A human-readable description of the error.

    - `Input []BetaResponseInputItemUnion`

      The raw input items that were not committed.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

      - `type BetaResponseOutputMessage struct{…}`

        An output message from the model.

      - `type BetaResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

      - `type BetaResponseInputItemToolSearchCall struct{…}`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

      - `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](https://platform.openai.com/docs/guides/conversation-state).

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

        A tool call to run a command on the local shell.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

      - `type BetaResponseCustomToolCallOutput struct{…}`

        The output of a custom tool call from your code, being sent back to the model.

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

      - `type BetaResponseInputItemProgram struct{…}`

      - `type BetaResponseInputItemProgramOutput struct{…}`

    - `ResponseID string`

      The ID of the response that rejected the input.

    - `SequenceNumber int64`

      The sequence number for this event.

    - `Type ResponseInjectFailed`

      The event discriminator. Always `response.inject.failed`.

      - `const ResponseInjectFailedResponseInjectFailed ResponseInjectFailed = "response.inject.failed"`

    - `StreamID string`

      The multiplexed WebSocket stream that emitted the event. This field is
      present only when WebSocket multiplexing is enabled separately.

### Beta Skill Reference

- `type BetaSkillReference struct{…}`

  - `SkillID string`

    The ID of the referenced skill.

  - `Type SkillReference`

    References a skill created with the /v1/skills endpoint.

    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

  - `Version string`

    Optional skill version. Use a positive integer or 'latest'. Omit for default.

### Beta Tool

- `type BetaToolUnion interface{…}`

  A tool that can be used to generate a response.

  - `type BetaFunctionTool struct{…}`

    Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

    - `Name string`

      The name of the function to call.

    - `Parameters map[string, any]`

      A JSON schema object describing the parameters of the function.

    - `Strict bool`

      Whether strict parameter validation is enforced for this function tool.

    - `Type Function`

      The type of the function tool. Always `function`.

      - `const FunctionFunction Function = "function"`

    - `AllowedCallers []string`

      The tool invocation context(s).

      - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

      - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

    - `DeferLoading bool`

      Whether this function is deferred and loaded via tool search.

    - `Description string`

      A description of the function. Used by the model to determine whether or not to call the function.

    - `OutputSchema map[string, any]`

      A JSON schema object describing the JSON value encoded in string outputs for this function.

  - `type BetaFileSearchTool struct{…}`

    A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

    - `Type FileSearch`

      The type of the file search tool. Always `file_search`.

      - `const FileSearchFileSearch FileSearch = "file_search"`

    - `VectorStoreIDs []string`

      The IDs of the vector stores to search.

    - `Filters BetaFileSearchToolFiltersUnion`

      A filter to apply.

      - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

        A filter used to compare a specified attribute key to a given value using a defined comparison operation.

        - `Key string`

          The key to compare against the value.

        - `Type string`

          Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

          - `eq`: equals
          - `ne`: not equal
          - `gt`: greater than
          - `gte`: greater than or equal
          - `lt`: less than
          - `lte`: less than or equal
          - `in`: in
          - `nin`: not in

          - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

          - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

          - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

          - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

          - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

          - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

          - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

          - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

        - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

          The value to compare against the attribute key; supports string, number, or boolean types.

          - `string`

          - `float64`

          - `bool`

          - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

            - `string`

            - `float64`

      - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

        Combine multiple filters using `and` or `or`.

        - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

          Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

          - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

            A filter used to compare a specified attribute key to a given value using a defined comparison operation.

            - `Key string`

              The key to compare against the value.

            - `Type string`

              Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

              - `eq`: equals
              - `ne`: not equal
              - `gt`: greater than
              - `gte`: greater than or equal
              - `lt`: less than
              - `lte`: less than or equal
              - `in`: in
              - `nin`: not in

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

              - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

            - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

              The value to compare against the attribute key; supports string, number, or boolean types.

              - `string`

              - `float64`

              - `bool`

              - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                - `string`

                - `float64`

        - `Type string`

          Type of operation: `and` or `or`.

          - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

          - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

    - `MaxNumResults int64`

      The maximum number of results to return. This number should be between 1 and 50 inclusive.

    - `RankingOptions BetaFileSearchToolRankingOptions`

      Ranking options for search.

      - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

        Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

        - `EmbeddingWeight float64`

          The weight of the embedding in the reciprocal ranking fusion.

        - `TextWeight float64`

          The weight of the text in the reciprocal ranking fusion.

      - `Ranker string`

        The ranker to use for the file search.

        - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

        - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

      - `ScoreThreshold float64`

        The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

  - `type BetaComputerTool struct{…}`

    A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `Type Computer`

      The type of the computer tool. Always `computer`.

      - `const ComputerComputer Computer = "computer"`

  - `type BetaComputerUsePreviewTool struct{…}`

    A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `DisplayHeight int64`

      The height of the computer display.

    - `DisplayWidth int64`

      The width of the computer display.

    - `Environment BetaComputerUsePreviewToolEnvironment`

      The type of computer environment to control.

      - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

      - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

      - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

      - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

      - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

    - `Type ComputerUsePreview`

      The type of the computer use tool. Always `computer_use_preview`.

      - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

  - `type BetaWebSearchTool struct{…}`

    Search the Internet for sources related to the prompt. Learn more about the
    [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `Type BetaWebSearchToolType`

      The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

      - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

      - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

    - `Filters BetaWebSearchToolFilters`

      Filters for the search.

      - `AllowedDomains []string`

        Allowed domains for the search. If not provided, all domains are allowed.
        Subdomains of the provided domains are allowed as well.

        Example: `["pubmed.ncbi.nlm.nih.gov"]`

    - `SearchContextSize BetaWebSearchToolSearchContextSize`

      High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

      - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

      - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

      - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

    - `UserLocation BetaWebSearchToolUserLocation`

      The approximate location of the user.

      - `City string`

        Free text input for the city of the user, e.g. `San Francisco`.

      - `Country string`

        The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

      - `Region string`

        Free text input for the region of the user, e.g. `California`.

      - `Timezone string`

        The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

      - `Type string`

        The type of location approximation. Always `approximate`.

        - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

  - `type BetaToolMcp struct{…}`

    Give the model access to additional tools via remote Model Context Protocol
    (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

    - `ServerLabel string`

      A label for this MCP server, used to identify it in tool calls.

    - `Type Mcp`

      The type of the MCP tool. Always `mcp`.

      - `const McpMcp Mcp = "mcp"`

    - `AllowedCallers []string`

      The tool invocation context(s).

      - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

      - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

    - `AllowedTools BetaToolMcpAllowedToolsUnion`

      List of allowed tool names or a filter object.

      - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

        A string array of allowed tool names

      - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

        A filter object to specify which tools are allowed.

        - `ReadOnly bool`

          Indicates whether or not a tool modifies data or is read-only. If an
          MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
          it will match this filter.

        - `ToolNames []string`

          List of allowed tool names.

    - `Authorization string`

      An OAuth access token that can be used with a remote MCP server, either
      with a custom MCP server URL or a service connector. Your application
      must handle the OAuth authorization flow and provide the token here.

    - `ConnectorID string`

      Identifier for service connectors, like those available in ChatGPT. One of
      `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
      about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

      Currently supported `connector_id` values are:

      - Dropbox: `connector_dropbox`
      - Gmail: `connector_gmail`
      - Google Calendar: `connector_googlecalendar`
      - Google Drive: `connector_googledrive`
      - Microsoft Teams: `connector_microsoftteams`
      - Outlook Calendar: `connector_outlookcalendar`
      - Outlook Email: `connector_outlookemail`
      - SharePoint: `connector_sharepoint`

      - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

      - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

      - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

      - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

      - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

      - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

      - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

      - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

    - `DeferLoading bool`

      Whether this MCP tool is deferred and discovered via tool search.

    - `Headers map[string, string]`

      Optional HTTP headers to send to the MCP server. Use for authentication
      or other purposes.

    - `RequireApproval BetaToolMcpRequireApprovalUnion`

      Specify which of the MCP server's tools require approval.

      - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

        Specify which of the MCP server's tools require approval. Can be
        `always`, `never`, or a filter object associated with tools
        that require approval.

        - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

          A filter object to specify which tools are allowed.

          - `ReadOnly bool`

            Indicates whether or not a tool modifies data or is read-only. If an
            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
            it will match this filter.

          - `ToolNames []string`

            List of allowed tool names.

        - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

          A filter object to specify which tools are allowed.

          - `ReadOnly bool`

            Indicates whether or not a tool modifies data or is read-only. If an
            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
            it will match this filter.

          - `ToolNames []string`

            List of allowed tool names.

      - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

        Specify a single approval policy for all tools. One of `always` or
        `never`. When set to `always`, all tools will require approval. When
        set to `never`, all tools will not require approval.

        - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

        - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

    - `ServerDescription string`

      Optional description of the MCP server, used to provide more context.

    - `ServerURL string`

      The URL for the MCP server. One of `server_url`, `connector_id`, or
      `tunnel_id` must be provided.

    - `TunnelID string`

      The Secure MCP Tunnel ID to use instead of a direct server URL. One of
      `server_url`, `connector_id`, or `tunnel_id` must be provided.

  - `type BetaToolCodeInterpreter struct{…}`

    A tool that runs Python code to help generate a response to a prompt.

    - `Container BetaToolCodeInterpreterContainerUnion`

      The code interpreter container. Can be a container ID or an object that
      specifies uploaded file IDs to make available to your code, along with an
      optional `memory_limit` setting.

      - `string`

      - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

        Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

        - `Type Auto`

          Always `auto`.

          - `const AutoAuto Auto = "auto"`

        - `FileIDs []string`

          An optional list of uploaded files to make available to your code.

        - `MemoryLimit string`

          The memory limit for the code interpreter container.

          - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

          - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

          - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

          - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

        - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

          Network access policy for the container.

          - `type BetaContainerNetworkPolicyDisabled struct{…}`

            - `Type Disabled`

              Disable outbound network access. Always `disabled`.

              - `const DisabledDisabled Disabled = "disabled"`

          - `type BetaContainerNetworkPolicyAllowlist struct{…}`

            - `AllowedDomains []string`

              A list of allowed domains when type is `allowlist`.

            - `Type Allowlist`

              Allow outbound network access only to specified domains. Always `allowlist`.

              - `const AllowlistAllowlist Allowlist = "allowlist"`

            - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

              Optional domain-scoped secrets for allowlisted domains.

              - `Domain string`

                The domain associated with the secret.

              - `Name string`

                The name of the secret to inject for the domain.

              - `Value string`

                The secret value to inject for the domain.

    - `Type CodeInterpreter`

      The type of the code interpreter tool. Always `code_interpreter`.

      - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

    - `AllowedCallers []string`

      The tool invocation context(s).

      - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

      - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

  - `type BetaToolProgrammaticToolCalling struct{…}`

    - `Type ProgrammaticToolCalling`

      The type of the tool. Always `programmatic_tool_calling`.

      - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

  - `type BetaToolImageGeneration struct{…}`

    A tool that generates images using the GPT image models.

    - `Type ImageGeneration`

      The type of the image generation tool. Always `image_generation`.

      - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

    - `Action string`

      Whether to generate a new image or edit an existing image. Default: `auto`.

      - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

      - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

      - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

    - `Background string`

      Allows to set transparency for the background of the generated image(s).
      This parameter is only supported for GPT image models that support
      transparent backgrounds. Must be one of `transparent`, `opaque`, or
      `auto` (default value). When `auto` is used, the model will
      automatically determine the best background for the image.

      `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
      transparent backgrounds. Requests with `background` set to
      `transparent` will return an error for these models; use `opaque` or
      `auto` instead.

      If `transparent`, the output format needs to support transparency,
      so it should be set to either `png` (default value) or `webp`.

      - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

      - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

      - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

    - `InputFidelity string`

      Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

      - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

      - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

    - `InputImageMask BetaToolImageGenerationInputImageMask`

      Optional mask for inpainting. Contains `image_url`
      (string, optional) and `file_id` (string, optional).

      - `FileID string`

        File ID for the mask image.

      - `ImageURL string`

        Base64-encoded mask image.

    - `Model string`

      The image generation model to use. Default: `gpt-image-1`.

      - `string`

      - `string`

        - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

        - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

        - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

        - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

        - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

        - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

    - `Moderation string`

      Moderation level for the generated image. Default: `auto`.

      - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

      - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

    - `OutputCompression int64`

      Compression level for the output image. Default: 100.

    - `OutputFormat string`

      The output format of the generated image. One of `png`, `webp`, or
      `jpeg`. Default: `png`.

      - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

      - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

      - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

    - `PartialImages int64`

      Number of partial images to generate in streaming mode, from 0 (default value) to 3.

    - `Quality string`

      The quality of the generated image. One of `low`, `medium`, `high`,
      or `auto`. Default: `auto`.

      - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

      - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

      - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

      - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

    - `Size string`

      The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

      - `string`

      - `string`

        - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

        - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

        - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

        - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

  - `type BetaToolLocalShell struct{…}`

    A tool that allows the model to execute shell commands in a local environment.

    - `Type LocalShell`

      The type of the local shell tool. Always `local_shell`.

      - `const LocalShellLocalShell LocalShell = "local_shell"`

  - `type BetaFunctionShellTool struct{…}`

    A tool that allows the model to execute shell commands.

    - `Type Shell`

      The type of the shell tool. Always `shell`.

      - `const ShellShell Shell = "shell"`

    - `AllowedCallers []string`

      The tool invocation context(s).

      - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

      - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

    - `Environment BetaFunctionShellToolEnvironmentUnion`

      - `type BetaContainerAuto struct{…}`

        - `Type ContainerAuto`

          Automatically creates a container for this request

          - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

        - `FileIDs []string`

          An optional list of uploaded files to make available to your code.

        - `MemoryLimit BetaContainerAutoMemoryLimit`

          The memory limit for the container.

          - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

          - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

          - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

          - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

        - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

          Network access policy for the container.

          - `type BetaContainerNetworkPolicyDisabled struct{…}`

          - `type BetaContainerNetworkPolicyAllowlist struct{…}`

        - `Skills []BetaContainerAutoSkillUnion`

          An optional list of skills referenced by id or inline data.

          - `type BetaSkillReference struct{…}`

            - `SkillID string`

              The ID of the referenced skill.

            - `Type SkillReference`

              References a skill created with the /v1/skills endpoint.

              - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

            - `Version string`

              Optional skill version. Use a positive integer or 'latest'. Omit for default.

          - `type BetaInlineSkill struct{…}`

            - `Description string`

              The description of the skill.

            - `Name string`

              The name of the skill.

            - `Source BetaInlineSkillSource`

              Inline skill payload

              - `Data string`

                Base64-encoded skill zip bundle.

              - `MediaType ApplicationZip`

                The media type of the inline skill payload. Must be `application/zip`.

                - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

              - `Type Base64`

                The type of the inline skill source. Must be `base64`.

                - `const Base64Base64 Base64 = "base64"`

            - `Type Inline`

              Defines an inline skill for this request.

              - `const InlineInline Inline = "inline"`

      - `type BetaLocalEnvironment struct{…}`

        - `Type Local`

          Use a local computer environment.

          - `const LocalLocal Local = "local"`

        - `Skills []BetaLocalSkill`

          An optional list of skills.

          - `Description string`

            The description of the skill.

          - `Name string`

            The name of the skill.

          - `Path string`

            The path to the directory containing the skill.

      - `type BetaContainerReference struct{…}`

        - `ContainerID string`

          The ID of the referenced container.

        - `Type ContainerReference`

          References a container created with the /v1/containers endpoint

          - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

  - `type BetaCustomTool struct{…}`

    A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `Name string`

      The name of the custom tool, used to identify it in tool calls.

    - `Type Custom`

      The type of the custom tool. Always `custom`.

      - `const CustomCustom Custom = "custom"`

    - `AllowedCallers []string`

      The tool invocation context(s).

      - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

      - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

    - `DeferLoading bool`

      Whether this tool should be deferred and discovered via tool search.

    - `Description string`

      Optional description of the custom tool, used to provide more context.

    - `Format BetaCustomToolFormatUnion`

      The input format for the custom tool. Default is unconstrained text.

      - `type BetaCustomToolFormatText struct{…}`

        Unconstrained free-form text.

        - `Type Text`

          Unconstrained text format. Always `text`.

          - `const TextText Text = "text"`

      - `type BetaCustomToolFormatGrammar struct{…}`

        A grammar defined by the user.

        - `Definition string`

          The grammar definition.

        - `Syntax string`

          The syntax of the grammar definition. One of `lark` or `regex`.

          - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

          - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

        - `Type Grammar`

          Grammar format. Always `grammar`.

          - `const GrammarGrammar Grammar = "grammar"`

  - `type BetaNamespaceTool struct{…}`

    Groups function/custom tools under a shared namespace.

    - `Description string`

      A description of the namespace shown to the model.

    - `Name string`

      The namespace name used in tool calls (for example, `crm`).

    - `Tools []BetaNamespaceToolToolUnion`

      The function/custom tools available inside this namespace.

      - `type BetaNamespaceToolToolFunction struct{…}`

        - `Name string`

        - `Type Function`

          - `const FunctionFunction Function = "function"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

          - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this function should be deferred and discovered via tool search.

        - `Description string`

        - `OutputSchema map[string, any]`

          A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

        - `Parameters any`

        - `Strict bool`

          Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `Type Namespace`

      The type of the tool. Always `namespace`.

      - `const NamespaceNamespace Namespace = "namespace"`

  - `type BetaToolSearchTool struct{…}`

    Hosted or BYOT tool search configuration for deferred tools.

    - `Type ToolSearch`

      The type of the tool. Always `tool_search`.

      - `const ToolSearchToolSearch ToolSearch = "tool_search"`

    - `Description string`

      Description shown to the model for a client-executed tool search tool.

    - `Execution BetaToolSearchToolExecution`

      Whether tool search is executed by the server or by the client.

      - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

      - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

    - `Parameters any`

      Parameter schema for a client-executed tool search tool.

  - `type BetaWebSearchPreviewTool struct{…}`

    This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `Type BetaWebSearchPreviewToolType`

      The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

      - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

      - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

    - `SearchContentTypes []string`

      - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

      - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

    - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

      High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

      - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

      - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

      - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

    - `UserLocation BetaWebSearchPreviewToolUserLocation`

      The user's location.

      - `Type Approximate`

        The type of location approximation. Always `approximate`.

        - `const ApproximateApproximate Approximate = "approximate"`

      - `City string`

        Free text input for the city of the user, e.g. `San Francisco`.

      - `Country string`

        The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

      - `Region string`

        Free text input for the region of the user, e.g. `California`.

      - `Timezone string`

        The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

  - `type BetaApplyPatchTool struct{…}`

    Allows the assistant to create, delete, or update files using unified diffs.

    - `Type ApplyPatch`

      The type of the tool. Always `apply_patch`.

      - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `AllowedCallers []string`

      The tool invocation context(s).

      - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

      - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

### Beta Tool Choice Allowed

- `type BetaToolChoiceAllowed struct{…}`

  Constrains the tools available to the model to a pre-defined set.

  - `Mode BetaToolChoiceAllowedMode`

    Constrains the tools available to the model to a pre-defined set.

    `auto` allows the model to pick from among the allowed tools and generate a
    message.

    `required` requires the model to call one or more of the allowed tools.

    - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

    - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

  - `Tools []map[string, any]`

    A list of tool definitions that the model should be allowed to call.

    For the Responses API, the list of tool definitions might look like:

    ```json
    [
      { "type": "function", "name": "get_weather" },
      { "type": "mcp", "server_label": "deepwiki" },
      { "type": "image_generation" }
    ]
    ```

  - `Type AllowedTools`

    Allowed tool configuration type. Always `allowed_tools`.

    - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

### Beta Tool Choice Apply Patch

- `type BetaToolChoiceApplyPatch struct{…}`

  Forces the model to call the apply_patch tool when executing a tool call.

  - `Type ApplyPatch`

    The tool to call. Always `apply_patch`.

    - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

### Beta Tool Choice Custom

- `type BetaToolChoiceCustom struct{…}`

  Use this option to force the model to call a specific custom tool.

  - `Name string`

    The name of the custom tool to call.

  - `Type Custom`

    For custom tool calling, the type is always `custom`.

    - `const CustomCustom Custom = "custom"`

### Beta Tool Choice Function

- `type BetaToolChoiceFunction struct{…}`

  Use this option to force the model to call a specific function.

  - `Name string`

    The name of the function to call.

  - `Type Function`

    For function calling, the type is always `function`.

    - `const FunctionFunction Function = "function"`

### Beta Tool Choice Mcp

- `type BetaToolChoiceMcp struct{…}`

  Use this option to force the model to call a specific tool on a remote MCP server.

  - `ServerLabel string`

    The label of the MCP server to use.

  - `Type Mcp`

    For MCP tools, the type is always `mcp`.

    - `const McpMcp Mcp = "mcp"`

  - `Name string`

    The name of the tool to call on the server.

### Beta Tool Choice Options

- `type BetaToolChoiceOptions string`

  Controls which (if any) tool is called by the model.

  `none` means the model will not call any tool and instead generates a message.

  `auto` means the model can pick between generating a message or calling one or
  more tools.

  `required` means the model must call one or more tools.

  - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

  - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

  - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

### Beta Tool Choice Shell

- `type BetaToolChoiceShell struct{…}`

  Forces the model to call the shell tool when a tool call is required.

  - `Type Shell`

    The tool to call. Always `shell`.

    - `const ShellShell Shell = "shell"`

### Beta Tool Choice Types

- `type BetaToolChoiceTypes struct{…}`

  Indicates that the model should use a built-in tool to generate a response.
  [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

  - `Type BetaToolChoiceTypesType`

    The type of hosted tool the model should to use. Learn more about
    [built-in tools](https://platform.openai.com/docs/guides/tools).

    Allowed values are:

    - `file_search`
    - `web_search_preview`
    - `computer`
    - `computer_use_preview`
    - `computer_use`
    - `code_interpreter`
    - `image_generation`

    - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

    - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

    - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

    - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

    - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

    - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

    - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

    - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

### Beta Tool Search Tool

- `type BetaToolSearchTool struct{…}`

  Hosted or BYOT tool search configuration for deferred tools.

  - `Type ToolSearch`

    The type of the tool. Always `tool_search`.

    - `const ToolSearchToolSearch ToolSearch = "tool_search"`

  - `Description string`

    Description shown to the model for a client-executed tool search tool.

  - `Execution BetaToolSearchToolExecution`

    Whether tool search is executed by the server or by the client.

    - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

    - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

  - `Parameters any`

    Parameter schema for a client-executed tool search tool.

### Beta Web Search Preview Tool

- `type BetaWebSearchPreviewTool struct{…}`

  This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

  - `Type BetaWebSearchPreviewToolType`

    The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

    - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

    - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

  - `SearchContentTypes []string`

    - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

    - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

  - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

    High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

    - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

    - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

    - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

  - `UserLocation BetaWebSearchPreviewToolUserLocation`

    The user's location.

    - `Type Approximate`

      The type of location approximation. Always `approximate`.

      - `const ApproximateApproximate Approximate = "approximate"`

    - `City string`

      Free text input for the city of the user, e.g. `San Francisco`.

    - `Country string`

      The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

    - `Region string`

      Free text input for the region of the user, e.g. `California`.

    - `Timezone string`

      The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

### Beta Web Search Tool

- `type BetaWebSearchTool struct{…}`

  Search the Internet for sources related to the prompt. Learn more about the
  [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

  - `Type BetaWebSearchToolType`

    The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

    - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

    - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

  - `Filters BetaWebSearchToolFilters`

    Filters for the search.

    - `AllowedDomains []string`

      Allowed domains for the search. If not provided, all domains are allowed.
      Subdomains of the provided domains are allowed as well.

      Example: `["pubmed.ncbi.nlm.nih.gov"]`

  - `SearchContextSize BetaWebSearchToolSearchContextSize`

    High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

    - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

    - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

    - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

  - `UserLocation BetaWebSearchToolUserLocation`

    The approximate location of the user.

    - `City string`

      Free text input for the city of the user, e.g. `San Francisco`.

    - `Country string`

      The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

    - `Region string`

      Free text input for the region of the user, e.g. `California`.

    - `Timezone string`

      The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

    - `Type string`

      The type of location approximation. Always `approximate`.

      - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

# Input Items

## List input items

`client.Beta.Responses.InputItems.List(ctx, responseID, params) (*CursorPage[BetaResponseItemUnion], error)`

**get** `/responses/{response_id}/input_items?beta=true`

Returns a list of input items for a given response.

### Parameters

- `responseID string`

- `params BetaResponseInputItemListParams`

  - `After param.Field[string]`

    Query param: An item ID to list items after, used in pagination.

  - `Include param.Field[[]BetaResponseIncludable]`

    Query param: Additional fields to include in the response. See the `include`
    parameter for Response creation above for more information.

    - `const BetaResponseIncludableFileSearchCallResults BetaResponseIncludable = "file_search_call.results"`

    - `const BetaResponseIncludableWebSearchCallResults BetaResponseIncludable = "web_search_call.results"`

    - `const BetaResponseIncludableWebSearchCallActionSources BetaResponseIncludable = "web_search_call.action.sources"`

    - `const BetaResponseIncludableMessageInputImageImageURL BetaResponseIncludable = "message.input_image.image_url"`

    - `const BetaResponseIncludableComputerCallOutputOutputImageURL BetaResponseIncludable = "computer_call_output.output.image_url"`

    - `const BetaResponseIncludableCodeInterpreterCallOutputs BetaResponseIncludable = "code_interpreter_call.outputs"`

    - `const BetaResponseIncludableReasoningEncryptedContent BetaResponseIncludable = "reasoning.encrypted_content"`

    - `const BetaResponseIncludableMessageOutputTextLogprobs BetaResponseIncludable = "message.output_text.logprobs"`

  - `Limit param.Field[int64]`

    Query param: A limit on the number of objects to be returned. Limit can range between
    1 and 100, and the default is 20.

  - `Order param.Field[BetaResponseInputItemListParamsOrder]`

    Query param: The order to return the input items in. Default is `desc`.

    - `asc`: Return the input items in ascending order.
    - `desc`: Return the input items in descending order.

    - `const BetaResponseInputItemListParamsOrderAsc BetaResponseInputItemListParamsOrder = "asc"`

    - `const BetaResponseInputItemListParamsOrderDesc BetaResponseInputItemListParamsOrder = "desc"`

  - `Betas param.Field[[]string]`

    Header param: Optional beta features to enable for this request.

    - `const BetaResponseInputItemListParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseInputItemListParamsOpenAIBeta = "responses_multi_agent=v1"`

### Returns

- `type BetaResponseItemUnion interface{…}`

  Content item used to generate a response.

  - `type BetaResponseInputMessageItem struct{…}`

    - `ID string`

      The unique ID of the message input.

    - `Content BetaResponseInputMessageContentList`

      A list of one or many input items to the model, containing different content
      types.

      - `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`.

          - `const InputTextInputText InputText = "input_text"`

        - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `Detail BetaResponseInputImageDetail`

          The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

          - `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`.

          - `const InputImageInputImage InputImage = "input_image"`

        - `FileID string`

          The ID of the file to be sent to the model.

        - `ImageURL string`

          The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

        - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

        - `Type InputFile`

          The type of the input item. Always `input_file`.

          - `const InputFileInputFile InputFile = "input_file"`

        - `Detail BetaResponseInputFileDetail`

          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`.

          - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

          - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

          - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

        - `FileData string`

          The content of the file to be sent to the model.

        - `FileID string`

          The ID of the file to be sent to the model.

        - `FileURL string`

          The URL of the file to be sent to the model.

        - `Filename string`

          The name of the file to be sent to the model.

        - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

    - `Role BetaResponseInputMessageItemRole`

      The role of the message input. One of `user`, `system`, or `developer`.

      - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"`

      - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"`

      - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"`

    - `Type Message`

      The type of the message input. Always set to `message`.

      - `const MessageMessage Message = "message"`

    - `Agent BetaResponseInputMessageItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status BetaResponseInputMessageItemStatus`

      The status of item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"`

      - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"`

      - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"`

  - `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.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

          - `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`.

              - `const FileCitationFileCitation FileCitation = "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`.

              - `const URLCitationURLCitation URLCitation = "url_citation"`

            - `URL string`

              The URL of the web resource.

          - `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`.

              - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

              - `const FilePathFilePath FilePath = "file_path"`

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

          - `const OutputTextOutputText OutputText = "output_text"`

        - `Logprobs []BetaResponseOutputTextLogprob`

          - `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`.

          - `const RefusalRefusal Refusal = "refusal"`

    - `Role Assistant`

      The role of the output message. Always `assistant`.

      - `const AssistantAssistant Assistant = "assistant"`

    - `Status BetaResponseOutputMessageStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

      - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

      - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

    - `Type Message`

      The type of the output message. Always `message`.

      - `const MessageMessage Message = "message"`

    - `Agent BetaResponseOutputMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Phase BetaResponseOutputMessagePhase`

      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.

      - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

      - `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`.

      - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

    - `Agent BetaResponseFileSearchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Results []BetaResponseFileSearchToolCallResult`

      The results of the file search tool call.

      - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

        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.

        - `string`

        - `float64`

        - `bool`

      - `FileID string`

        The unique ID of the file.

      - `Filename string`

        The name of the file.

      - `Score float64`

        The relevance score of the file - a value between 0 and 1.

      - `Text string`

        The text that was retrieved from the file.

  - `type BetaResponseComputerToolCall struct{…}`

    A tool call to a computer use tool. See the
    [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

        The type of the pending safety check.

      - `Message string`

        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.

      - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

      - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

      - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

    - `Type BetaResponseComputerToolCallType`

      The type of the computer call. Always `computer_call`.

      - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

    - `Action BetaComputerActionUnion`

      A click action.

      - `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`.

          - `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`.

          - `const ClickClick Click = "click"`

        - `X int64`

          The x-coordinate where the click occurred.

        - `Y int64`

          The y-coordinate where the click occurred.

        - `Keys []string`

          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`.

          - `const DoubleClickDoubleClick DoubleClick = "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`.

          - `const DragDrag Drag = "drag"`

        - `Keys []string`

          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`.

          - `const KeypressKeypress Keypress = "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`.

          - `const MoveMove Move = "move"`

        - `X int64`

          The x-coordinate to move to.

        - `Y int64`

          The y-coordinate to move to.

        - `Keys []string`

          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`.

          - `const ScreenshotScreenshot Screenshot = "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`.

          - `const ScrollScroll Scroll = "scroll"`

        - `X int64`

          The x-coordinate where the scroll occurred.

        - `Y int64`

          The y-coordinate where the scroll occurred.

        - `Keys []string`

          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`.

          - `const TypeType Type = "type"`

      - `type BetaComputerActionWait struct{…}`

        A wait action.

        - `Type Wait`

          Specifies the event type. For a wait action, this property is always set to `wait`.

          - `const WaitWait Wait = "wait"`

    - `Actions BetaComputerActionList`

      Flattened batched actions for `computer_use`. Each action includes an
      `type` discriminator and action-specific fields.

      - `type BetaComputerActionClick struct{…}`

        A click action.

      - `type BetaComputerActionDoubleClick struct{…}`

        A double click action.

      - `type BetaComputerActionDrag struct{…}`

        A drag action.

      - `type BetaComputerActionKeypress struct{…}`

        A collection of keypresses the model would like to perform.

      - `type BetaComputerActionMove struct{…}`

        A mouse move action.

      - `type BetaComputerActionScreenshot struct{…}`

        A screenshot action.

      - `type BetaComputerActionScroll struct{…}`

        A scroll action.

      - `type BetaComputerActionType struct{…}`

        An action to type in text.

      - `type BetaComputerActionWait struct{…}`

        A wait action.

    - `Agent BetaResponseComputerToolCallAgent`

      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.

    - `Output BetaResponseComputerToolCallOutputScreenshot`

      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`.

        - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

      - `FileID string`

        The identifier of an uploaded file that contains the screenshot.

      - `ImageURL string`

        The URL of the screenshot image.

    - `Status BetaResponseComputerToolCallOutputItemStatus`

      The status of the message input. One of `in_progress`, `completed`, or
      `incomplete`. Populated when input items are returned via API.

      - `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`.

      - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

    - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

      The safety checks reported by the API that have been acknowledged by the
      developer.

      - `ID string`

        The ID of the pending safety check.

      - `Code string`

        The type of the pending safety check.

      - `Message string`

        Details about the pending safety check.

    - `Agent BetaResponseComputerToolCallOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseFunctionWebSearch struct{…}`

    The results of a web search tool call. See the
    [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

    - `ID string`

      The unique ID of the web search tool call.

    - `Action BetaResponseFunctionWebSearchActionUnion`

      An object describing the specific action taken in this web search call.
      Includes details on how the model used the web (search, open_page, find_in_page).

      - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

        Action type "search" - Performs a web search query.

        - `Type Search`

          The action type.

          - `const SearchSearch Search = "search"`

        - `Queries []string`

          The search queries.

        - `Query string`

          The search query.

        - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

          The sources used in the search.

          - `Type URL`

            The type of source. Always `url`.

            - `const URLURL URL = "url"`

          - `URL string`

            The URL of the source.

      - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

        Action type "open_page" - Opens a specific URL from search results.

        - `Type OpenPage`

          The action type.

          - `const OpenPageOpenPage OpenPage = "open_page"`

        - `URL string`

          The URL opened by the model.

      - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

        Action type "find_in_page": Searches for a pattern within a loaded page.

        - `Pattern string`

          The pattern or text to search for within the page.

        - `Type FindInPage`

          The action type.

          - `const FindInPageFindInPage FindInPage = "find_in_page"`

        - `URL string`

          The URL of the page searched for the pattern.

    - `Status BetaResponseFunctionWebSearchStatus`

      The status of the web search tool call.

      - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

      - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

      - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

      - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

    - `Type WebSearchCall`

      The type of the web search tool call. Always `web_search_call`.

      - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

    - `Agent BetaResponseFunctionWebSearchAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseFunctionToolCallItem struct{…}`

    A tool call to run a function. See the
    [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

    - `ID string`

      The unique ID of the function tool call.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseFunctionToolCallItemStatusInProgress BetaResponseFunctionToolCallItemStatus = "in_progress"`

      - `const BetaResponseFunctionToolCallItemStatusCompleted BetaResponseFunctionToolCallItemStatus = "completed"`

      - `const BetaResponseFunctionToolCallItemStatusIncomplete BetaResponseFunctionToolCallItemStatus = "incomplete"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseFunctionToolCallOutputItem struct{…}`

    - `ID string`

      The unique ID of the function call tool output.

    - `CallID string`

      The unique ID of the function tool call generated by the model.

    - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

      The output from the function call generated by your code.
      Can be a string or an list of output content.

      - `string`

      - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

        Text, image, or file output of the function call.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

    - `Status BetaResponseFunctionToolCallOutputItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `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`.

      - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

    - `Agent BetaResponseFunctionToolCallOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

        - `Type Direct`

          The caller type. Always `direct`.

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          The caller type. Always `program`.

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseItemAgentMessage struct{…}`

    - `ID string`

      The unique ID of the agent message.

    - `Author string`

      The sending agent identity.

    - `Content []BetaResponseItemAgentMessageContentUnion`

      Encrypted content sent between agents.

      - `type BetaResponseInputText struct{…}`

        A text input to the model.

      - `type BetaResponseOutputText struct{…}`

        A text output from the model.

      - `type BetaResponseItemAgentMessageContentText struct{…}`

        A text content.

        - `Text string`

        - `Type Text`

          - `const TextText Text = "text"`

      - `type BetaResponseItemAgentMessageContentSummaryText 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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `type BetaResponseItemAgentMessageContentReasoningText 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`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `type BetaResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type BetaResponseInputImage struct{…}`

        An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `type BetaResponseItemAgentMessageContentComputerScreenshot 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`.

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailLow BetaResponseItemAgentMessageContentComputerScreenshotDetail = "low"`

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailHigh BetaResponseItemAgentMessageContentComputerScreenshotDetail = "high"`

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailAuto BetaResponseItemAgentMessageContentComputerScreenshotDetail = "auto"`

          - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailOriginal BetaResponseItemAgentMessageContentComputerScreenshotDetail = "original"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

        - `Type ComputerScreenshot`

          Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `PromptCacheBreakpoint BetaResponseItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

          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`.

            - `const ExplicitExplicit Explicit = "explicit"`

      - `type BetaResponseInputFile struct{…}`

        A file input to the model.

      - `type BetaResponseItemAgentMessageContentEncryptedContent 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`.

          - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

    - `Recipient string`

      The destination agent identity.

    - `Type AgentMessage`

      The type of the item. Always `agent_message`.

      - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

    - `Agent BetaResponseItemAgentMessageAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemMultiAgentCall struct{…}`

    - `ID string`

      The unique ID of the multi-agent call item.

    - `Action string`

      The multi-agent action to execute.

      - `const BetaResponseItemMultiAgentCallActionSpawnAgent BetaResponseItemMultiAgentCallAction = "spawn_agent"`

      - `const BetaResponseItemMultiAgentCallActionInterruptAgent BetaResponseItemMultiAgentCallAction = "interrupt_agent"`

      - `const BetaResponseItemMultiAgentCallActionListAgents BetaResponseItemMultiAgentCallAction = "list_agents"`

      - `const BetaResponseItemMultiAgentCallActionSendMessage BetaResponseItemMultiAgentCallAction = "send_message"`

      - `const BetaResponseItemMultiAgentCallActionFollowupTask BetaResponseItemMultiAgentCallAction = "followup_task"`

      - `const BetaResponseItemMultiAgentCallActionWaitAgent BetaResponseItemMultiAgentCallAction = "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`.

      - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

    - `Agent BetaResponseItemMultiAgentCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemMultiAgentCallOutput struct{…}`

    - `ID string`

      The unique ID of the multi-agent call output item.

    - `Action string`

      The multi-agent action that produced this result.

      - `const BetaResponseItemMultiAgentCallOutputActionSpawnAgent BetaResponseItemMultiAgentCallOutputAction = "spawn_agent"`

      - `const BetaResponseItemMultiAgentCallOutputActionInterruptAgent BetaResponseItemMultiAgentCallOutputAction = "interrupt_agent"`

      - `const BetaResponseItemMultiAgentCallOutputActionListAgents BetaResponseItemMultiAgentCallOutputAction = "list_agents"`

      - `const BetaResponseItemMultiAgentCallOutputActionSendMessage BetaResponseItemMultiAgentCallOutputAction = "send_message"`

      - `const BetaResponseItemMultiAgentCallOutputActionFollowupTask BetaResponseItemMultiAgentCallOutputAction = "followup_task"`

      - `const BetaResponseItemMultiAgentCallOutputActionWaitAgent BetaResponseItemMultiAgentCallOutputAction = "wait_agent"`

    - `CallID string`

      The unique ID of the multi-agent call.

    - `Output []BetaResponseOutputText`

      Text output returned by the multi-agent action.

      - `Annotations []BetaResponseOutputTextAnnotationUnion`

        The annotations of the text output.

      - `Text string`

        The text output from the model.

      - `Type OutputText`

        The type of the output text. Always `output_text`.

      - `Logprobs []BetaResponseOutputTextLogprob`

    - `Type MultiAgentCallOutput`

      The type of the multi-agent result. Always `multi_agent_call_output`.

      - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

    - `Agent BetaResponseItemMultiAgentCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseToolSearchCall struct{…}`

    - `ID string`

      The unique ID of the tool search call item.

    - `Arguments any`

      Arguments used for the tool search call.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchCallExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

      - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

    - `Status BetaResponseToolSearchCallStatus`

      The status of the tool search call item that was recorded.

      - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

      - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

      - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

    - `Type ToolSearchCall`

      The type of the item. Always `tool_search_call`.

      - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

    - `Agent BetaResponseToolSearchCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseToolSearchOutputItem struct{…}`

    - `ID string`

      The unique ID of the tool search output item.

    - `CallID string`

      The unique ID of the tool search call generated by the model.

    - `Execution BetaResponseToolSearchOutputItemExecution`

      Whether tool search was executed by the server or by the client.

      - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

      - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

    - `Status BetaResponseToolSearchOutputItemStatus`

      The status of the tool search output item that was recorded.

      - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

      - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

      - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

    - `Tools []BetaToolUnion`

      The loaded tool definitions returned by tool search.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `Name string`

          The name of the function to call.

        - `Parameters map[string, any]`

          A JSON schema object describing the parameters of the function.

        - `Strict bool`

          Whether strict parameter validation is enforced for this function tool.

        - `Type Function`

          The type of the function tool. Always `function`.

          - `const FunctionFunction Function = "function"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

          - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this function is deferred and loaded via tool search.

        - `Description string`

          A description of the function. Used by the model to determine whether or not to call the function.

        - `OutputSchema map[string, any]`

          A JSON schema object describing the JSON value encoded in string outputs for this function.

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `Type FileSearch`

          The type of the file search tool. Always `file_search`.

          - `const FileSearchFileSearch FileSearch = "file_search"`

        - `VectorStoreIDs []string`

          The IDs of the vector stores to search.

        - `Filters BetaFileSearchToolFiltersUnion`

          A filter to apply.

          - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

            A filter used to compare a specified attribute key to a given value using a defined comparison operation.

            - `Key string`

              The key to compare against the value.

            - `Type string`

              Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

              - `eq`: equals
              - `ne`: not equal
              - `gt`: greater than
              - `gte`: greater than or equal
              - `lt`: less than
              - `lte`: less than or equal
              - `in`: in
              - `nin`: not in

              - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

              - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

            - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

              The value to compare against the attribute key; supports string, number, or boolean types.

              - `string`

              - `float64`

              - `bool`

              - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                - `string`

                - `float64`

          - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

            Combine multiple filters using `and` or `or`.

            - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

              Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

              - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                  - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

            - `Type string`

              Type of operation: `and` or `or`.

              - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

              - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

        - `MaxNumResults int64`

          The maximum number of results to return. This number should be between 1 and 50 inclusive.

        - `RankingOptions BetaFileSearchToolRankingOptions`

          Ranking options for search.

          - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

            Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

            - `EmbeddingWeight float64`

              The weight of the embedding in the reciprocal ranking fusion.

            - `TextWeight float64`

              The weight of the text in the reciprocal ranking fusion.

          - `Ranker string`

            The ranker to use for the file search.

            - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

            - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

          - `ScoreThreshold float64`

            The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `Type Computer`

          The type of the computer tool. Always `computer`.

          - `const ComputerComputer Computer = "computer"`

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `DisplayHeight int64`

          The height of the computer display.

        - `DisplayWidth int64`

          The width of the computer display.

        - `Environment BetaComputerUsePreviewToolEnvironment`

          The type of computer environment to control.

          - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

          - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

          - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

          - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

          - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

        - `Type ComputerUsePreview`

          The type of the computer use tool. Always `computer_use_preview`.

          - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchToolType`

          The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

          - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

          - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

        - `Filters BetaWebSearchToolFilters`

          Filters for the search.

          - `AllowedDomains []string`

            Allowed domains for the search. If not provided, all domains are allowed.
            Subdomains of the provided domains are allowed as well.

            Example: `["pubmed.ncbi.nlm.nih.gov"]`

        - `SearchContextSize BetaWebSearchToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

          - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

          - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchToolUserLocation`

          The approximate location of the user.

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `Type string`

            The type of location approximation. Always `approximate`.

            - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `ServerLabel string`

          A label for this MCP server, used to identify it in tool calls.

        - `Type Mcp`

          The type of the MCP tool. Always `mcp`.

          - `const McpMcp Mcp = "mcp"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

          - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

        - `AllowedTools BetaToolMcpAllowedToolsUnion`

          List of allowed tool names or a filter object.

          - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

            A string array of allowed tool names

          - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

              Indicates whether or not a tool modifies data or is read-only. If an
              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
              it will match this filter.

            - `ToolNames []string`

              List of allowed tool names.

        - `Authorization string`

          An OAuth access token that can be used with a remote MCP server, either
          with a custom MCP server URL or a service connector. Your application
          must handle the OAuth authorization flow and provide the token here.

        - `ConnectorID string`

          Identifier for service connectors, like those available in ChatGPT. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
          about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

          Currently supported `connector_id` values are:

          - Dropbox: `connector_dropbox`
          - Gmail: `connector_gmail`
          - Google Calendar: `connector_googlecalendar`
          - Google Drive: `connector_googledrive`
          - Microsoft Teams: `connector_microsoftteams`
          - Outlook Calendar: `connector_outlookcalendar`
          - Outlook Email: `connector_outlookemail`
          - SharePoint: `connector_sharepoint`

          - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

          - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

          - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

          - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

          - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

          - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

          - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

          - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

        - `DeferLoading bool`

          Whether this MCP tool is deferred and discovered via tool search.

        - `Headers map[string, string]`

          Optional HTTP headers to send to the MCP server. Use for authentication
          or other purposes.

        - `RequireApproval BetaToolMcpRequireApprovalUnion`

          Specify which of the MCP server's tools require approval.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

            Specify which of the MCP server's tools require approval. Can be
            `always`, `never`, or a filter object associated with tools
            that require approval.

            - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

            - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

            Specify a single approval policy for all tools. One of `always` or
            `never`. When set to `always`, all tools will require approval. When
            set to `never`, all tools will not require approval.

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

            - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

        - `ServerDescription string`

          Optional description of the MCP server, used to provide more context.

        - `ServerURL string`

          The URL for the MCP server. One of `server_url`, `connector_id`, or
          `tunnel_id` must be provided.

        - `TunnelID string`

          The Secure MCP Tunnel ID to use instead of a direct server URL. One of
          `server_url`, `connector_id`, or `tunnel_id` must be provided.

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

        - `Container BetaToolCodeInterpreterContainerUnion`

          The code interpreter container. Can be a container ID or an object that
          specifies uploaded file IDs to make available to your code, along with an
          optional `memory_limit` setting.

          - `string`

          - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

            Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

            - `Type Auto`

              Always `auto`.

              - `const AutoAuto Auto = "auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit string`

              The memory limit for the code interpreter container.

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

              - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `Type Disabled`

                  Disable outbound network access. Always `disabled`.

                  - `const DisabledDisabled Disabled = "disabled"`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `AllowedDomains []string`

                  A list of allowed domains when type is `allowlist`.

                - `Type Allowlist`

                  Allow outbound network access only to specified domains. Always `allowlist`.

                  - `const AllowlistAllowlist Allowlist = "allowlist"`

                - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                  Optional domain-scoped secrets for allowlisted domains.

                  - `Domain string`

                    The domain associated with the secret.

                  - `Name string`

                    The name of the secret to inject for the domain.

                  - `Value string`

                    The secret value to inject for the domain.

        - `Type CodeInterpreter`

          The type of the code interpreter tool. Always `code_interpreter`.

          - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

          - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

      - `type BetaToolProgrammaticToolCalling struct{…}`

        - `Type ProgrammaticToolCalling`

          The type of the tool. Always `programmatic_tool_calling`.

          - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

        - `Type ImageGeneration`

          The type of the image generation tool. Always `image_generation`.

          - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

        - `Action string`

          Whether to generate a new image or edit an existing image. Default: `auto`.

          - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

          - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

          - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

        - `Background string`

          Allows to set transparency for the background of the generated image(s).
          This parameter is only supported for GPT image models that support
          transparent backgrounds. Must be one of `transparent`, `opaque`, or
          `auto` (default value). When `auto` is used, the model will
          automatically determine the best background for the image.

          `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
          transparent backgrounds. Requests with `background` set to
          `transparent` will return an error for these models; use `opaque` or
          `auto` instead.

          If `transparent`, the output format needs to support transparency,
          so it should be set to either `png` (default value) or `webp`.

          - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

          - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

          - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

        - `InputFidelity string`

          Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

          - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

          - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

        - `InputImageMask BetaToolImageGenerationInputImageMask`

          Optional mask for inpainting. Contains `image_url`
          (string, optional) and `file_id` (string, optional).

          - `FileID string`

            File ID for the mask image.

          - `ImageURL string`

            Base64-encoded mask image.

        - `Model string`

          The image generation model to use. Default: `gpt-image-1`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

            - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

            - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

            - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

            - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

            - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

        - `Moderation string`

          Moderation level for the generated image. Default: `auto`.

          - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

          - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

        - `OutputCompression int64`

          Compression level for the output image. Default: 100.

        - `OutputFormat string`

          The output format of the generated image. One of `png`, `webp`, or
          `jpeg`. Default: `png`.

          - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

          - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

          - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

        - `PartialImages int64`

          Number of partial images to generate in streaming mode, from 0 (default value) to 3.

        - `Quality string`

          The quality of the generated image. One of `low`, `medium`, `high`,
          or `auto`. Default: `auto`.

          - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

          - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

          - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

          - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

        - `Size string`

          The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

          - `string`

          - `string`

            - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

            - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

            - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

            - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

        - `Type LocalShell`

          The type of the local shell tool. Always `local_shell`.

          - `const LocalShellLocalShell LocalShell = "local_shell"`

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

        - `Type Shell`

          The type of the shell tool. Always `shell`.

          - `const ShellShell Shell = "shell"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

          - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

        - `Environment BetaFunctionShellToolEnvironmentUnion`

          - `type BetaContainerAuto struct{…}`

            - `Type ContainerAuto`

              Automatically creates a container for this request

              - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

            - `FileIDs []string`

              An optional list of uploaded files to make available to your code.

            - `MemoryLimit BetaContainerAutoMemoryLimit`

              The memory limit for the container.

              - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

              - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

              - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

              - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

            - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

              Network access policy for the container.

              - `type BetaContainerNetworkPolicyDisabled struct{…}`

              - `type BetaContainerNetworkPolicyAllowlist struct{…}`

            - `Skills []BetaContainerAutoSkillUnion`

              An optional list of skills referenced by id or inline data.

              - `type BetaSkillReference struct{…}`

                - `SkillID string`

                  The ID of the referenced skill.

                - `Type SkillReference`

                  References a skill created with the /v1/skills endpoint.

                  - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                - `Version string`

                  Optional skill version. Use a positive integer or 'latest'. Omit for default.

              - `type BetaInlineSkill struct{…}`

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Source BetaInlineSkillSource`

                  Inline skill payload

                  - `Data string`

                    Base64-encoded skill zip bundle.

                  - `MediaType ApplicationZip`

                    The media type of the inline skill payload. Must be `application/zip`.

                    - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                  - `Type Base64`

                    The type of the inline skill source. Must be `base64`.

                    - `const Base64Base64 Base64 = "base64"`

                - `Type Inline`

                  Defines an inline skill for this request.

                  - `const InlineInline Inline = "inline"`

          - `type BetaLocalEnvironment struct{…}`

            - `Type Local`

              Use a local computer environment.

              - `const LocalLocal Local = "local"`

            - `Skills []BetaLocalSkill`

              An optional list of skills.

              - `Description string`

                The description of the skill.

              - `Name string`

                The name of the skill.

              - `Path string`

                The path to the directory containing the skill.

          - `type BetaContainerReference struct{…}`

            - `ContainerID string`

              The ID of the referenced container.

            - `Type ContainerReference`

              References a container created with the /v1/containers endpoint

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Name string`

          The name of the custom tool, used to identify it in tool calls.

        - `Type Custom`

          The type of the custom tool. Always `custom`.

          - `const CustomCustom Custom = "custom"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

          - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

        - `DeferLoading bool`

          Whether this tool should be deferred and discovered via tool search.

        - `Description string`

          Optional description of the custom tool, used to provide more context.

        - `Format BetaCustomToolFormatUnion`

          The input format for the custom tool. Default is unconstrained text.

          - `type BetaCustomToolFormatText struct{…}`

            Unconstrained free-form text.

            - `Type Text`

              Unconstrained text format. Always `text`.

              - `const TextText Text = "text"`

          - `type BetaCustomToolFormatGrammar struct{…}`

            A grammar defined by the user.

            - `Definition string`

              The grammar definition.

            - `Syntax string`

              The syntax of the grammar definition. One of `lark` or `regex`.

              - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

              - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

            - `Type Grammar`

              Grammar format. Always `grammar`.

              - `const GrammarGrammar Grammar = "grammar"`

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

        - `Description string`

          A description of the namespace shown to the model.

        - `Name string`

          The namespace name used in tool calls (for example, `crm`).

        - `Tools []BetaNamespaceToolToolUnion`

          The function/custom tools available inside this namespace.

          - `type BetaNamespaceToolToolFunction struct{…}`

            - `Name string`

            - `Type Function`

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

              - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function should be deferred and discovered via tool search.

            - `Description string`

            - `OutputSchema map[string, any]`

              A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

            - `Parameters any`

            - `Strict bool`

              Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `Type Namespace`

          The type of the tool. Always `namespace`.

          - `const NamespaceNamespace Namespace = "namespace"`

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

        - `Type ToolSearch`

          The type of the tool. Always `tool_search`.

          - `const ToolSearchToolSearch ToolSearch = "tool_search"`

        - `Description string`

          Description shown to the model for a client-executed tool search tool.

        - `Execution BetaToolSearchToolExecution`

          Whether tool search is executed by the server or by the client.

          - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

          - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

        - `Parameters any`

          Parameter schema for a client-executed tool search tool.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `Type BetaWebSearchPreviewToolType`

          The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

          - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

        - `SearchContentTypes []string`

          - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

          - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

        - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

          High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

          - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

          - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

          - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

        - `UserLocation BetaWebSearchPreviewToolUserLocation`

          The user's location.

          - `Type Approximate`

            The type of location approximation. Always `approximate`.

            - `const ApproximateApproximate Approximate = "approximate"`

          - `City string`

            Free text input for the city of the user, e.g. `San Francisco`.

          - `Country string`

            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

          - `Region string`

            Free text input for the region of the user, e.g. `California`.

          - `Timezone string`

            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

        - `Type ApplyPatch`

          The type of the tool. Always `apply_patch`.

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

        - `AllowedCallers []string`

          The tool invocation context(s).

          - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

          - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

    - `Type ToolSearchOutput`

      The type of the item. Always `tool_search_output`.

      - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

    - `Agent BetaResponseToolSearchOutputItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseItemAdditionalTools struct{…}`

    - `ID string`

      The unique ID of the additional tools item.

    - `Role string`

      The role that provided the additional tools.

      - `const BetaResponseItemAdditionalToolsRoleUnknown BetaResponseItemAdditionalToolsRole = "unknown"`

      - `const BetaResponseItemAdditionalToolsRoleUser BetaResponseItemAdditionalToolsRole = "user"`

      - `const BetaResponseItemAdditionalToolsRoleAssistant BetaResponseItemAdditionalToolsRole = "assistant"`

      - `const BetaResponseItemAdditionalToolsRoleSystem BetaResponseItemAdditionalToolsRole = "system"`

      - `const BetaResponseItemAdditionalToolsRoleCritic BetaResponseItemAdditionalToolsRole = "critic"`

      - `const BetaResponseItemAdditionalToolsRoleDiscriminator BetaResponseItemAdditionalToolsRole = "discriminator"`

      - `const BetaResponseItemAdditionalToolsRoleDeveloper BetaResponseItemAdditionalToolsRole = "developer"`

      - `const BetaResponseItemAdditionalToolsRoleTool BetaResponseItemAdditionalToolsRole = "tool"`

    - `Tools []BetaToolUnion`

      The additional tool definitions made available at this item.

      - `type BetaFunctionTool struct{…}`

        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

      - `type BetaFileSearchTool struct{…}`

        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

      - `type BetaComputerTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaComputerUsePreviewTool struct{…}`

        A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

      - `type BetaWebSearchTool struct{…}`

        Search the Internet for sources related to the prompt. Learn more about the
        [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaToolMcp struct{…}`

        Give the model access to additional tools via remote Model Context Protocol
        (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

      - `type BetaToolCodeInterpreter struct{…}`

        A tool that runs Python code to help generate a response to a prompt.

      - `type BetaToolProgrammaticToolCalling struct{…}`

      - `type BetaToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

      - `type BetaToolLocalShell struct{…}`

        A tool that allows the model to execute shell commands in a local environment.

      - `type BetaFunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

      - `type BetaCustomTool struct{…}`

        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

      - `type BetaNamespaceTool struct{…}`

        Groups function/custom tools under a shared namespace.

      - `type BetaToolSearchTool struct{…}`

        Hosted or BYOT tool search configuration for deferred tools.

      - `type BetaWebSearchPreviewTool struct{…}`

        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

      - `type BetaApplyPatchTool struct{…}`

        Allows the assistant to create, delete, or update files using unified diffs.

    - `Type AdditionalTools`

      The type of the item. Always `additional_tools`.

      - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

    - `Agent BetaResponseItemAdditionalToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

    - `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`.

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `Type Reasoning`

      The type of the object. Always `reasoning`.

      - `const ReasoningReasoning Reasoning = "reasoning"`

    - `Agent BetaResponseReasoningItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Content []BetaResponseReasoningItemContent`

      Reasoning text content.

      - `Text string`

        The reasoning text from the model.

      - `Type ReasoningText`

        The type of the reasoning text. Always `reasoning_text`.

        - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `EncryptedContent string`

      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.

    - `Status BetaResponseReasoningItemStatus`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

      - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

      - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

  - `type BetaResponseItemProgram struct{…}`

    - `ID string`

      The unique ID of the program item.

    - `CallID string`

      The stable call ID of the program item.

    - `Code string`

      The JavaScript source executed by programmatic tool calling.

    - `Fingerprint string`

      Opaque program replay fingerprint that must be round-tripped.

    - `Type Program`

      The type of the item. Always `program`.

      - `const ProgramProgram Program = "program"`

    - `Agent BetaResponseItemProgramAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemProgramOutput struct{…}`

    - `ID string`

      The unique ID of the program output item.

    - `CallID string`

      The call ID of the program item.

    - `Result string`

      The result produced by the program item.

    - `Status string`

      The terminal status of the program output item.

      - `const BetaResponseItemProgramOutputStatusCompleted BetaResponseItemProgramOutputStatus = "completed"`

      - `const BetaResponseItemProgramOutputStatusIncomplete BetaResponseItemProgramOutputStatus = "incomplete"`

    - `Type ProgramOutput`

      The type of the item. Always `program_output`.

      - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

    - `Agent BetaResponseItemProgramOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCompactionItem struct{…}`

    A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

    - `ID string`

      The unique ID of the compaction item.

    - `EncryptedContent string`

      The encrypted content that was produced by compaction.

    - `Type Compaction`

      The type of the item. Always `compaction`.

      - `const CompactionCompaction Compaction = "compaction"`

    - `Agent BetaResponseCompactionItemAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseItemImageGenerationCall struct{…}`

    An image generation request made by the model.

    - `ID string`

      The unique ID of the image generation call.

    - `Result string`

      The generated image encoded in base64.

    - `Status string`

      The status of the image generation call.

      - `const BetaResponseItemImageGenerationCallStatusInProgress BetaResponseItemImageGenerationCallStatus = "in_progress"`

      - `const BetaResponseItemImageGenerationCallStatusCompleted BetaResponseItemImageGenerationCallStatus = "completed"`

      - `const BetaResponseItemImageGenerationCallStatusGenerating BetaResponseItemImageGenerationCallStatus = "generating"`

      - `const BetaResponseItemImageGenerationCallStatusFailed BetaResponseItemImageGenerationCallStatus = "failed"`

    - `Type ImageGenerationCall`

      The type of the image generation call. Always `image_generation_call`.

      - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

    - `Agent BetaResponseItemImageGenerationCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseCodeInterpreterToolCall struct{…}`

    A tool call to run code.

    - `ID string`

      The unique ID of the code interpreter tool call.

    - `Code string`

      The code to run, or null if not available.

    - `ContainerID string`

      The ID of the container used to run the code.

    - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

      The outputs generated by the code interpreter, such as logs or images.
      Can be null if no outputs are available.

      - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

        The logs output from the code interpreter.

        - `Logs string`

          The logs output from the code interpreter.

        - `Type Logs`

          The type of the output. Always `logs`.

          - `const LogsLogs Logs = "logs"`

      - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

        The image output from the code interpreter.

        - `Type Image`

          The type of the output. Always `image`.

          - `const ImageImage Image = "image"`

        - `URL string`

          The URL of the image output from the code interpreter.

    - `Status BetaResponseCodeInterpreterToolCallStatus`

      The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

      - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

      - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

      - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

      - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

      - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

    - `Type CodeInterpreterCall`

      The type of the code interpreter tool call. Always `code_interpreter_call`.

      - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

    - `Agent BetaResponseCodeInterpreterToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemLocalShellCall struct{…}`

    A tool call to run a command on the local shell.

    - `ID string`

      The unique ID of the local shell call.

    - `Action BetaResponseItemLocalShellCallAction`

      Execute a shell command on the server.

      - `Command []string`

        The command to run.

      - `Env map[string, string]`

        Environment variables to set for the command.

      - `Type Exec`

        The type of the local shell action. Always `exec`.

        - `const ExecExec Exec = "exec"`

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the command.

      - `User string`

        Optional user to run the command as.

      - `WorkingDirectory string`

        Optional working directory to run the command in.

    - `CallID string`

      The unique ID of the local shell tool call generated by the model.

    - `Status string`

      The status of the local shell call.

      - `const BetaResponseItemLocalShellCallStatusInProgress BetaResponseItemLocalShellCallStatus = "in_progress"`

      - `const BetaResponseItemLocalShellCallStatusCompleted BetaResponseItemLocalShellCallStatus = "completed"`

      - `const BetaResponseItemLocalShellCallStatusIncomplete BetaResponseItemLocalShellCallStatus = "incomplete"`

    - `Type LocalShellCall`

      The type of the local shell call. Always `local_shell_call`.

      - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

    - `Agent BetaResponseItemLocalShellCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemLocalShellCallOutput struct{…}`

    The output of a local shell tool call.

    - `ID string`

      The unique ID of the local shell tool call generated by the model.

    - `Output string`

      A JSON string of the output of the local shell tool call.

    - `Type LocalShellCallOutput`

      The type of the local shell tool call output. Always `local_shell_call_output`.

      - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

    - `Agent BetaResponseItemLocalShellCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseItemLocalShellCallOutputStatusInProgress BetaResponseItemLocalShellCallOutputStatus = "in_progress"`

      - `const BetaResponseItemLocalShellCallOutputStatusCompleted BetaResponseItemLocalShellCallOutputStatus = "completed"`

      - `const BetaResponseItemLocalShellCallOutputStatusIncomplete BetaResponseItemLocalShellCallOutputStatus = "incomplete"`

  - `type BetaResponseFunctionShellToolCall struct{…}`

    A tool call that executes one or more shell commands in a managed environment.

    - `ID string`

      The unique ID of the shell tool call. Populated when this item is returned via API.

    - `Action BetaResponseFunctionShellToolCallAction`

      The shell commands and limits that describe how to run the tool call.

      - `Commands []string`

      - `MaxOutputLength int64`

        Optional maximum number of characters to return from each command.

      - `TimeoutMs int64`

        Optional timeout in milliseconds for the commands.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

      Represents the use of a local environment to perform shell actions.

      - `type BetaResponseLocalEnvironment struct{…}`

        Represents the use of a local environment to perform shell actions.

        - `Type Local`

          The environment type. Always `local`.

          - `const LocalLocal Local = "local"`

      - `type BetaResponseContainerReference struct{…}`

        Represents a container created with /v1/containers.

        - `ContainerID string`

        - `Type ContainerReference`

          The environment type. Always `container_reference`.

          - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

    - `Status BetaResponseFunctionShellToolCallStatus`

      The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

      - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

      - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

    - `Type ShellCall`

      The type of the item. Always `shell_call`.

      - `const ShellCallShellCall ShellCall = "shell_call"`

    - `Agent BetaResponseFunctionShellToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionShellToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call.

  - `type BetaResponseFunctionShellToolCallOutput struct{…}`

    The output of a shell tool call that was emitted.

    - `ID string`

      The unique ID of the shell call output. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the shell tool call generated by the model.

    - `MaxOutputLength int64`

      The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

    - `Output []BetaResponseFunctionShellToolCallOutputOutput`

      An array of shell call output contents

      - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

        Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

        - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

          Indicates that the shell call exceeded its configured time limit.

          - `Type Timeout`

            The outcome type. Always `timeout`.

            - `const TimeoutTimeout Timeout = "timeout"`

        - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

          Indicates that the shell commands finished and returned an exit code.

          - `ExitCode int64`

            Exit code from the shell process.

          - `Type Exit`

            The outcome type. Always `exit`.

            - `const ExitExit Exit = "exit"`

      - `Stderr string`

        The standard error output that was captured.

      - `Stdout string`

        The standard output that was captured.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `Status BetaResponseFunctionShellToolCallOutputStatus`

      The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

      - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

      - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

      - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

    - `Type ShellCallOutput`

      The type of the shell call output. Always `shell_call_output`.

      - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

    - `Agent BetaResponseFunctionShellToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseApplyPatchToolCall struct{…}`

    A tool call that applies file diffs by creating, deleting, or updating files.

    - `ID string`

      The unique ID of the apply patch tool call. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Operation BetaResponseApplyPatchToolCallOperationUnion`

      One of the create_file, delete_file, or update_file operations applied via apply_patch.

      - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

        Instruction describing how to create a file via the apply_patch tool.

        - `Diff string`

          Diff to apply.

        - `Path string`

          Path of the file to create.

        - `Type CreateFile`

          Create a new file with the provided diff.

          - `const CreateFileCreateFile CreateFile = "create_file"`

      - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

        Instruction describing how to delete a file via the apply_patch tool.

        - `Path string`

          Path of the file to delete.

        - `Type DeleteFile`

          Delete the specified file.

          - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

      - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

        Instruction describing how to update a file via the apply_patch tool.

        - `Diff string`

          Diff to apply.

        - `Path string`

          Path of the file to update.

        - `Type UpdateFile`

          Update an existing file with the provided diff.

          - `const UpdateFileUpdateFile UpdateFile = "update_file"`

    - `Status BetaResponseApplyPatchToolCallStatus`

      The status of the apply patch tool call. One of `in_progress` or `completed`.

      - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

      - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

    - `Type ApplyPatchCall`

      The type of the item. Always `apply_patch_call`.

      - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

    - `Agent BetaResponseApplyPatchToolCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseApplyPatchToolCallCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call.

  - `type BetaResponseApplyPatchToolCallOutput struct{…}`

    The output emitted by an apply patch tool call.

    - `ID string`

      The unique ID of the apply patch tool call output. Populated when this item is returned via API.

    - `CallID string`

      The unique ID of the apply patch tool call generated by the model.

    - `Status BetaResponseApplyPatchToolCallOutputStatus`

      The status of the apply patch tool call output. One of `completed` or `failed`.

      - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

      - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

    - `Type ApplyPatchCallOutput`

      The type of the item. Always `apply_patch_call_output`.

      - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

    - `Agent BetaResponseApplyPatchToolCallOutputAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

      The execution context that produced this tool call.

      - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

        - `Type Direct`

          - `const DirectDirect Direct = "direct"`

      - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

        - `CallerID string`

          The call ID of the program item that produced this tool call.

        - `Type Program`

          - `const ProgramProgram Program = "program"`

    - `CreatedBy string`

      The ID of the entity that created this tool call output.

    - `Output string`

      Optional textual output returned by the apply patch tool.

  - `type BetaResponseItemMcpListTools struct{…}`

    A list of tools available on an MCP server.

    - `ID string`

      The unique ID of the list.

    - `ServerLabel string`

      The label of the MCP server.

    - `Tools []BetaResponseItemMcpListToolsTool`

      The tools available on the server.

      - `InputSchema any`

        The JSON schema describing the tool's input.

      - `Name string`

        The name of the tool.

      - `Annotations any`

        Additional annotations about the tool.

      - `Description string`

        The description of the tool.

    - `Type McpListTools`

      The type of the item. Always `mcp_list_tools`.

      - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

    - `Agent BetaResponseItemMcpListToolsAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Error string`

      Error message if the server could not list tools.

  - `type BetaResponseItemMcpApprovalRequest struct{…}`

    A request for human approval of a tool invocation.

    - `ID string`

      The unique ID of the approval request.

    - `Arguments string`

      A JSON string of arguments for the tool.

    - `Name string`

      The name of the tool to run.

    - `ServerLabel string`

      The label of the MCP server making the request.

    - `Type McpApprovalRequest`

      The type of the item. Always `mcp_approval_request`.

      - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

    - `Agent BetaResponseItemMcpApprovalRequestAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

  - `type BetaResponseItemMcpApprovalResponse struct{…}`

    A response to an MCP approval request.

    - `ID string`

      The unique ID of the approval response

    - `ApprovalRequestID string`

      The ID of the approval request being answered.

    - `Approve bool`

      Whether the request was approved.

    - `Type McpApprovalResponse`

      The type of the item. Always `mcp_approval_response`.

      - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

    - `Agent BetaResponseItemMcpApprovalResponseAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `Reason string`

      Optional reason for the decision.

  - `type BetaResponseItemMcpCall struct{…}`

    An invocation of a tool on an MCP server.

    - `ID string`

      The unique ID of the tool call.

    - `Arguments string`

      A JSON string of the arguments passed to the tool.

    - `Name string`

      The name of the tool that was run.

    - `ServerLabel string`

      The label of the MCP server running the tool.

    - `Type McpCall`

      The type of the item. Always `mcp_call`.

      - `const McpCallMcpCall McpCall = "mcp_call"`

    - `Agent BetaResponseItemMcpCallAgent`

      The agent that produced this item.

      - `AgentName string`

        The canonical name of the agent that produced this item.

    - `ApprovalRequestID string`

      Unique identifier for the MCP tool call approval request.
      Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

    - `Error string`

      The error from the tool call, if any.

    - `Output string`

      The output from the tool call.

    - `Status string`

      The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

      - `const BetaResponseItemMcpCallStatusInProgress BetaResponseItemMcpCallStatus = "in_progress"`

      - `const BetaResponseItemMcpCallStatusCompleted BetaResponseItemMcpCallStatus = "completed"`

      - `const BetaResponseItemMcpCallStatusIncomplete BetaResponseItemMcpCallStatus = "incomplete"`

      - `const BetaResponseItemMcpCallStatusCalling BetaResponseItemMcpCallStatus = "calling"`

      - `const BetaResponseItemMcpCallStatusFailed BetaResponseItemMcpCallStatus = "failed"`

  - `type BetaResponseCustomToolCallItem struct{…}`

    A call to a custom tool created by the model.

    - `ID string`

      The unique ID of the custom tool call item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseCustomToolCallItemStatusInProgress BetaResponseCustomToolCallItemStatus = "in_progress"`

      - `const BetaResponseCustomToolCallItemStatusCompleted BetaResponseCustomToolCallItemStatus = "completed"`

      - `const BetaResponseCustomToolCallItemStatusIncomplete BetaResponseCustomToolCallItemStatus = "incomplete"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

  - `type BetaResponseCustomToolCallOutputItem struct{…}`

    The output of a custom tool call from your code, being sent back to the model.

    - `ID string`

      The unique ID of the custom tool call output item.

    - `Status string`

      The status of the item. One of `in_progress`, `completed`, or
      `incomplete`. Populated when items are returned via API.

      - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

      - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

      - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

    - `CreatedBy string`

      The identifier of the actor that created the item.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Responses.InputItems.List(
    context.TODO(),
    "response_id",
    openai.BetaResponseInputItemListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "content": [
        {
          "text": "text",
          "type": "input_text",
          "prompt_cache_breakpoint": {
            "mode": "explicit"
          }
        }
      ],
      "role": "user",
      "type": "message",
      "agent": {
        "agent_name": "agent_name"
      },
      "status": "in_progress"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
```

## Domain Types

### Beta Response Item List

- `type BetaResponseItemList struct{…}`

  A list of Response items.

  - `Data []BetaResponseItemUnion`

    A list of items used to generate this response.

    - `type BetaResponseInputMessageItem struct{…}`

      - `ID string`

        The unique ID of the message input.

      - `Content BetaResponseInputMessageContentList`

        A list of one or many input items to the model, containing different content
        types.

        - `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`.

            - `const InputTextInputText InputText = "input_text"`

          - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `Detail BetaResponseInputImageDetail`

            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

            - `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`.

            - `const InputImageInputImage InputImage = "input_image"`

          - `FileID string`

            The ID of the file to be sent to the model.

          - `ImageURL string`

            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

          - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

          - `Type InputFile`

            The type of the input item. Always `input_file`.

            - `const InputFileInputFile InputFile = "input_file"`

          - `Detail BetaResponseInputFileDetail`

            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`.

            - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

            - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

            - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

          - `FileData string`

            The content of the file to be sent to the model.

          - `FileID string`

            The ID of the file to be sent to the model.

          - `FileURL string`

            The URL of the file to be sent to the model.

          - `Filename string`

            The name of the file to be sent to the model.

          - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

      - `Role BetaResponseInputMessageItemRole`

        The role of the message input. One of `user`, `system`, or `developer`.

        - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"`

        - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"`

        - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"`

      - `Type Message`

        The type of the message input. Always set to `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseInputMessageItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status BetaResponseInputMessageItemStatus`

        The status of item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"`

        - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"`

        - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"`

    - `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.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []BetaResponseOutputTextAnnotationUnion`

            The annotations of the text output.

            - `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`.

                - `const FileCitationFileCitation FileCitation = "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`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the web resource.

            - `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`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

            The text output from the model.

          - `Type OutputText`

            The type of the output text. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []BetaResponseOutputTextLogprob`

            - `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`.

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        The role of the output message. Always `assistant`.

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status BetaResponseOutputMessageStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

        - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

        - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        The type of the output message. Always `message`.

        - `const MessageMessage Message = "message"`

      - `Agent BetaResponseOutputMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Phase BetaResponseOutputMessagePhase`

        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.

        - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

        - `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`.

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Agent BetaResponseFileSearchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Results []BetaResponseFileSearchToolCallResult`

        The results of the file search tool call.

        - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

          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.

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

          The unique ID of the file.

        - `Filename string`

          The name of the file.

        - `Score float64`

          The relevance score of the file - a value between 0 and 1.

        - `Text string`

          The text that was retrieved from the file.

    - `type BetaResponseComputerToolCall struct{…}`

      A tool call to a computer use tool. See the
      [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

          The type of the pending safety check.

        - `Message string`

          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.

        - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

        - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

        - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

      - `Type BetaResponseComputerToolCallType`

        The type of the computer call. Always `computer_call`.

        - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

      - `Action BetaComputerActionUnion`

        A click action.

        - `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`.

            - `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`.

            - `const ClickClick Click = "click"`

          - `X int64`

            The x-coordinate where the click occurred.

          - `Y int64`

            The y-coordinate where the click occurred.

          - `Keys []string`

            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`.

            - `const DoubleClickDoubleClick DoubleClick = "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`.

            - `const DragDrag Drag = "drag"`

          - `Keys []string`

            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`.

            - `const KeypressKeypress Keypress = "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`.

            - `const MoveMove Move = "move"`

          - `X int64`

            The x-coordinate to move to.

          - `Y int64`

            The y-coordinate to move to.

          - `Keys []string`

            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`.

            - `const ScreenshotScreenshot Screenshot = "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`.

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

            The x-coordinate where the scroll occurred.

          - `Y int64`

            The y-coordinate where the scroll occurred.

          - `Keys []string`

            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`.

            - `const TypeType Type = "type"`

        - `type BetaComputerActionWait struct{…}`

          A wait action.

          - `Type Wait`

            Specifies the event type. For a wait action, this property is always set to `wait`.

            - `const WaitWait Wait = "wait"`

      - `Actions BetaComputerActionList`

        Flattened batched actions for `computer_use`. Each action includes an
        `type` discriminator and action-specific fields.

        - `type BetaComputerActionClick struct{…}`

          A click action.

        - `type BetaComputerActionDoubleClick struct{…}`

          A double click action.

        - `type BetaComputerActionDrag struct{…}`

          A drag action.

        - `type BetaComputerActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

        - `type BetaComputerActionMove struct{…}`

          A mouse move action.

        - `type BetaComputerActionScreenshot struct{…}`

          A screenshot action.

        - `type BetaComputerActionScroll struct{…}`

          A scroll action.

        - `type BetaComputerActionType struct{…}`

          An action to type in text.

        - `type BetaComputerActionWait struct{…}`

          A wait action.

      - `Agent BetaResponseComputerToolCallAgent`

        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.

      - `Output BetaResponseComputerToolCallOutputScreenshot`

        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`.

          - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

        - `FileID string`

          The identifier of an uploaded file that contains the screenshot.

        - `ImageURL string`

          The URL of the screenshot image.

      - `Status BetaResponseComputerToolCallOutputItemStatus`

        The status of the message input. One of `in_progress`, `completed`, or
        `incomplete`. Populated when input items are returned via API.

        - `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`.

        - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

      - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck`

        The safety checks reported by the API that have been acknowledged by the
        developer.

        - `ID string`

          The ID of the pending safety check.

        - `Code string`

          The type of the pending safety check.

        - `Message string`

          Details about the pending safety check.

      - `Agent BetaResponseComputerToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseFunctionWebSearch struct{…}`

      The results of a web search tool call. See the
      [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

      - `ID string`

        The unique ID of the web search tool call.

      - `Action BetaResponseFunctionWebSearchActionUnion`

        An object describing the specific action taken in this web search call.
        Includes details on how the model used the web (search, open_page, find_in_page).

        - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

          Action type "search" - Performs a web search query.

          - `Type Search`

            The action type.

            - `const SearchSearch Search = "search"`

          - `Queries []string`

            The search queries.

          - `Query string`

            The search query.

          - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

            The sources used in the search.

            - `Type URL`

              The type of source. Always `url`.

              - `const URLURL URL = "url"`

            - `URL string`

              The URL of the source.

        - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

          Action type "open_page" - Opens a specific URL from search results.

          - `Type OpenPage`

            The action type.

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

            The URL opened by the model.

        - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

          Action type "find_in_page": Searches for a pattern within a loaded page.

          - `Pattern string`

            The pattern or text to search for within the page.

          - `Type FindInPage`

            The action type.

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

            The URL of the page searched for the pattern.

      - `Status BetaResponseFunctionWebSearchStatus`

        The status of the web search tool call.

        - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

        - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

        - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

        - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        The type of the web search tool call. Always `web_search_call`.

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `Agent BetaResponseFunctionWebSearchAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseFunctionToolCallItem struct{…}`

      A tool call to run a function. See the
      [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.

      - `ID string`

        The unique ID of the function tool call.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseFunctionToolCallItemStatusInProgress BetaResponseFunctionToolCallItemStatus = "in_progress"`

        - `const BetaResponseFunctionToolCallItemStatusCompleted BetaResponseFunctionToolCallItemStatus = "completed"`

        - `const BetaResponseFunctionToolCallItemStatusIncomplete BetaResponseFunctionToolCallItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseFunctionToolCallOutputItem struct{…}`

      - `ID string`

        The unique ID of the function call tool output.

      - `CallID string`

        The unique ID of the function tool call generated by the model.

      - `Output BetaResponseFunctionToolCallOutputItemOutputUnion`

        The output from the function call generated by your code.
        Can be a string or an list of output content.

        - `string`

        - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion`

          Text, image, or file output of the function call.

          - `type BetaResponseInputText struct{…}`

            A text input to the model.

          - `type BetaResponseInputImage struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type BetaResponseInputFile struct{…}`

            A file input to the model.

      - `Status BetaResponseFunctionToolCallOutputItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `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`.

        - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

      - `Agent BetaResponseFunctionToolCallOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}`

          - `Type Direct`

            The caller type. Always `direct`.

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            The caller type. Always `program`.

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseItemAgentMessage struct{…}`

      - `ID string`

        The unique ID of the agent message.

      - `Author string`

        The sending agent identity.

      - `Content []BetaResponseItemAgentMessageContentUnion`

        Encrypted content sent between agents.

        - `type BetaResponseInputText struct{…}`

          A text input to the model.

        - `type BetaResponseOutputText struct{…}`

          A text output from the model.

        - `type BetaResponseItemAgentMessageContentText struct{…}`

          A text content.

          - `Text string`

          - `Type Text`

            - `const TextText Text = "text"`

        - `type BetaResponseItemAgentMessageContentSummaryText 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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `type BetaResponseItemAgentMessageContentReasoningText 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`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `type BetaResponseOutputRefusal struct{…}`

          A refusal from the model.

        - `type BetaResponseInputImage struct{…}`

          An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type BetaResponseItemAgentMessageContentComputerScreenshot 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`.

            - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailLow BetaResponseItemAgentMessageContentComputerScreenshotDetail = "low"`

            - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailHigh BetaResponseItemAgentMessageContentComputerScreenshotDetail = "high"`

            - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailAuto BetaResponseItemAgentMessageContentComputerScreenshotDetail = "auto"`

            - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailOriginal BetaResponseItemAgentMessageContentComputerScreenshotDetail = "original"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

          - `Type ComputerScreenshot`

            Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `PromptCacheBreakpoint BetaResponseItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint`

            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`.

              - `const ExplicitExplicit Explicit = "explicit"`

        - `type BetaResponseInputFile struct{…}`

          A file input to the model.

        - `type BetaResponseItemAgentMessageContentEncryptedContent 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`.

            - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

      - `Recipient string`

        The destination agent identity.

      - `Type AgentMessage`

        The type of the item. Always `agent_message`.

        - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

      - `Agent BetaResponseItemAgentMessageAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseItemMultiAgentCall struct{…}`

      - `ID string`

        The unique ID of the multi-agent call item.

      - `Action string`

        The multi-agent action to execute.

        - `const BetaResponseItemMultiAgentCallActionSpawnAgent BetaResponseItemMultiAgentCallAction = "spawn_agent"`

        - `const BetaResponseItemMultiAgentCallActionInterruptAgent BetaResponseItemMultiAgentCallAction = "interrupt_agent"`

        - `const BetaResponseItemMultiAgentCallActionListAgents BetaResponseItemMultiAgentCallAction = "list_agents"`

        - `const BetaResponseItemMultiAgentCallActionSendMessage BetaResponseItemMultiAgentCallAction = "send_message"`

        - `const BetaResponseItemMultiAgentCallActionFollowupTask BetaResponseItemMultiAgentCallAction = "followup_task"`

        - `const BetaResponseItemMultiAgentCallActionWaitAgent BetaResponseItemMultiAgentCallAction = "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`.

        - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

      - `Agent BetaResponseItemMultiAgentCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseItemMultiAgentCallOutput struct{…}`

      - `ID string`

        The unique ID of the multi-agent call output item.

      - `Action string`

        The multi-agent action that produced this result.

        - `const BetaResponseItemMultiAgentCallOutputActionSpawnAgent BetaResponseItemMultiAgentCallOutputAction = "spawn_agent"`

        - `const BetaResponseItemMultiAgentCallOutputActionInterruptAgent BetaResponseItemMultiAgentCallOutputAction = "interrupt_agent"`

        - `const BetaResponseItemMultiAgentCallOutputActionListAgents BetaResponseItemMultiAgentCallOutputAction = "list_agents"`

        - `const BetaResponseItemMultiAgentCallOutputActionSendMessage BetaResponseItemMultiAgentCallOutputAction = "send_message"`

        - `const BetaResponseItemMultiAgentCallOutputActionFollowupTask BetaResponseItemMultiAgentCallOutputAction = "followup_task"`

        - `const BetaResponseItemMultiAgentCallOutputActionWaitAgent BetaResponseItemMultiAgentCallOutputAction = "wait_agent"`

      - `CallID string`

        The unique ID of the multi-agent call.

      - `Output []BetaResponseOutputText`

        Text output returned by the multi-agent action.

        - `Annotations []BetaResponseOutputTextAnnotationUnion`

          The annotations of the text output.

        - `Text string`

          The text output from the model.

        - `Type OutputText`

          The type of the output text. Always `output_text`.

        - `Logprobs []BetaResponseOutputTextLogprob`

      - `Type MultiAgentCallOutput`

        The type of the multi-agent result. Always `multi_agent_call_output`.

        - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

      - `Agent BetaResponseItemMultiAgentCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseToolSearchCall struct{…}`

      - `ID string`

        The unique ID of the tool search call item.

      - `Arguments any`

        Arguments used for the tool search call.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchCallExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"`

        - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"`

      - `Status BetaResponseToolSearchCallStatus`

        The status of the tool search call item that was recorded.

        - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"`

        - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"`

        - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"`

      - `Type ToolSearchCall`

        The type of the item. Always `tool_search_call`.

        - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

      - `Agent BetaResponseToolSearchCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseToolSearchOutputItem struct{…}`

      - `ID string`

        The unique ID of the tool search output item.

      - `CallID string`

        The unique ID of the tool search call generated by the model.

      - `Execution BetaResponseToolSearchOutputItemExecution`

        Whether tool search was executed by the server or by the client.

        - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"`

        - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"`

      - `Status BetaResponseToolSearchOutputItemStatus`

        The status of the tool search output item that was recorded.

        - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"`

        - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"`

        - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"`

      - `Tools []BetaToolUnion`

        The loaded tool definitions returned by tool search.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `Name string`

            The name of the function to call.

          - `Parameters map[string, any]`

            A JSON schema object describing the parameters of the function.

          - `Strict bool`

            Whether strict parameter validation is enforced for this function tool.

          - `Type Function`

            The type of the function tool. Always `function`.

            - `const FunctionFunction Function = "function"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

            - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this function is deferred and loaded via tool search.

          - `Description string`

            A description of the function. Used by the model to determine whether or not to call the function.

          - `OutputSchema map[string, any]`

            A JSON schema object describing the JSON value encoded in string outputs for this function.

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `Type FileSearch`

            The type of the file search tool. Always `file_search`.

            - `const FileSearchFileSearch FileSearch = "file_search"`

          - `VectorStoreIDs []string`

            The IDs of the vector stores to search.

          - `Filters BetaFileSearchToolFiltersUnion`

            A filter to apply.

            - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

              A filter used to compare a specified attribute key to a given value using a defined comparison operation.

              - `Key string`

                The key to compare against the value.

              - `Type string`

                Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                - `eq`: equals
                - `ne`: not equal
                - `gt`: greater than
                - `gte`: greater than or equal
                - `lt`: less than
                - `lte`: less than or equal
                - `in`: in
                - `nin`: not in

                - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

              - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                The value to compare against the attribute key; supports string, number, or boolean types.

                - `string`

                - `float64`

                - `bool`

                - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

            - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

              Combine multiple filters using `and` or `or`.

              - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                  A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                  - `Key string`

                    The key to compare against the value.

                  - `Type string`

                    Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                    - `eq`: equals
                    - `ne`: not equal
                    - `gt`: greater than
                    - `gte`: greater than or equal
                    - `lt`: less than
                    - `lte`: less than or equal
                    - `in`: in
                    - `nin`: not in

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                    - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                  - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                    - `string`

                    - `float64`

                    - `bool`

                    - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                      - `string`

                      - `float64`

              - `Type string`

                Type of operation: `and` or `or`.

                - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

          - `MaxNumResults int64`

            The maximum number of results to return. This number should be between 1 and 50 inclusive.

          - `RankingOptions BetaFileSearchToolRankingOptions`

            Ranking options for search.

            - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

              - `EmbeddingWeight float64`

                The weight of the embedding in the reciprocal ranking fusion.

              - `TextWeight float64`

                The weight of the text in the reciprocal ranking fusion.

            - `Ranker string`

              The ranker to use for the file search.

              - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

              - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

            - `ScoreThreshold float64`

              The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `Type Computer`

            The type of the computer tool. Always `computer`.

            - `const ComputerComputer Computer = "computer"`

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `DisplayHeight int64`

            The height of the computer display.

          - `DisplayWidth int64`

            The width of the computer display.

          - `Environment BetaComputerUsePreviewToolEnvironment`

            The type of computer environment to control.

            - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

            - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

            - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

            - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

            - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

          - `Type ComputerUsePreview`

            The type of the computer use tool. Always `computer_use_preview`.

            - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchToolType`

            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

            - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

            - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

          - `Filters BetaWebSearchToolFilters`

            Filters for the search.

            - `AllowedDomains []string`

              Allowed domains for the search. If not provided, all domains are allowed.
              Subdomains of the provided domains are allowed as well.

              Example: `["pubmed.ncbi.nlm.nih.gov"]`

          - `SearchContextSize BetaWebSearchToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

            - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

            - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchToolUserLocation`

            The approximate location of the user.

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

            - `Type string`

              The type of location approximation. Always `approximate`.

              - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `ServerLabel string`

            A label for this MCP server, used to identify it in tool calls.

          - `Type Mcp`

            The type of the MCP tool. Always `mcp`.

            - `const McpMcp Mcp = "mcp"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

            - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

          - `AllowedTools BetaToolMcpAllowedToolsUnion`

            List of allowed tool names or a filter object.

            - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

              A string array of allowed tool names

            - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

                Indicates whether or not a tool modifies data or is read-only. If an
                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                it will match this filter.

              - `ToolNames []string`

                List of allowed tool names.

          - `Authorization string`

            An OAuth access token that can be used with a remote MCP server, either
            with a custom MCP server URL or a service connector. Your application
            must handle the OAuth authorization flow and provide the token here.

          - `ConnectorID string`

            Identifier for service connectors, like those available in ChatGPT. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
            about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

            Currently supported `connector_id` values are:

            - Dropbox: `connector_dropbox`
            - Gmail: `connector_gmail`
            - Google Calendar: `connector_googlecalendar`
            - Google Drive: `connector_googledrive`
            - Microsoft Teams: `connector_microsoftteams`
            - Outlook Calendar: `connector_outlookcalendar`
            - Outlook Email: `connector_outlookemail`
            - SharePoint: `connector_sharepoint`

            - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

            - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

            - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

            - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

            - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

            - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

            - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

            - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

          - `DeferLoading bool`

            Whether this MCP tool is deferred and discovered via tool search.

          - `Headers map[string, string]`

            Optional HTTP headers to send to the MCP server. Use for authentication
            or other purposes.

          - `RequireApproval BetaToolMcpRequireApprovalUnion`

            Specify which of the MCP server's tools require approval.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

              Specify which of the MCP server's tools require approval. Can be
              `always`, `never`, or a filter object associated with tools
              that require approval.

              - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

              - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

              Specify a single approval policy for all tools. One of `always` or
              `never`. When set to `always`, all tools will require approval. When
              set to `never`, all tools will not require approval.

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

              - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

          - `ServerDescription string`

            Optional description of the MCP server, used to provide more context.

          - `ServerURL string`

            The URL for the MCP server. One of `server_url`, `connector_id`, or
            `tunnel_id` must be provided.

          - `TunnelID string`

            The Secure MCP Tunnel ID to use instead of a direct server URL. One of
            `server_url`, `connector_id`, or `tunnel_id` must be provided.

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

          - `Container BetaToolCodeInterpreterContainerUnion`

            The code interpreter container. Can be a container ID or an object that
            specifies uploaded file IDs to make available to your code, along with an
            optional `memory_limit` setting.

            - `string`

            - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

              - `Type Auto`

                Always `auto`.

                - `const AutoAuto Auto = "auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit string`

                The memory limit for the code interpreter container.

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `Type Disabled`

                    Disable outbound network access. Always `disabled`.

                    - `const DisabledDisabled Disabled = "disabled"`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                  - `AllowedDomains []string`

                    A list of allowed domains when type is `allowlist`.

                  - `Type Allowlist`

                    Allow outbound network access only to specified domains. Always `allowlist`.

                    - `const AllowlistAllowlist Allowlist = "allowlist"`

                  - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                    Optional domain-scoped secrets for allowlisted domains.

                    - `Domain string`

                      The domain associated with the secret.

                    - `Name string`

                      The name of the secret to inject for the domain.

                    - `Value string`

                      The secret value to inject for the domain.

          - `Type CodeInterpreter`

            The type of the code interpreter tool. Always `code_interpreter`.

            - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

            - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

        - `type BetaToolProgrammaticToolCalling struct{…}`

          - `Type ProgrammaticToolCalling`

            The type of the tool. Always `programmatic_tool_calling`.

            - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

          - `Type ImageGeneration`

            The type of the image generation tool. Always `image_generation`.

            - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

          - `Action string`

            Whether to generate a new image or edit an existing image. Default: `auto`.

            - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

            - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

            - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

          - `Background string`

            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for GPT image models that support
            transparent backgrounds. Must be one of `transparent`, `opaque`, or
            `auto` (default value). When `auto` is used, the model will
            automatically determine the best background for the image.

            `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
            transparent backgrounds. Requests with `background` set to
            `transparent` will return an error for these models; use `opaque` or
            `auto` instead.

            If `transparent`, the output format needs to support transparency,
            so it should be set to either `png` (default value) or `webp`.

            - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

            - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

            - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

          - `InputFidelity string`

            Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

            - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

            - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

          - `InputImageMask BetaToolImageGenerationInputImageMask`

            Optional mask for inpainting. Contains `image_url`
            (string, optional) and `file_id` (string, optional).

            - `FileID string`

              File ID for the mask image.

            - `ImageURL string`

              Base64-encoded mask image.

          - `Model string`

            The image generation model to use. Default: `gpt-image-1`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

              - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

              - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

              - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

              - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

              - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

          - `Moderation string`

            Moderation level for the generated image. Default: `auto`.

            - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

            - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

          - `OutputCompression int64`

            Compression level for the output image. Default: 100.

          - `OutputFormat string`

            The output format of the generated image. One of `png`, `webp`, or
            `jpeg`. Default: `png`.

            - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

            - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

            - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

          - `PartialImages int64`

            Number of partial images to generate in streaming mode, from 0 (default value) to 3.

          - `Quality string`

            The quality of the generated image. One of `low`, `medium`, `high`,
            or `auto`. Default: `auto`.

            - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

            - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

            - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

            - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

          - `Size string`

            The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

            - `string`

            - `string`

              - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

              - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

              - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

              - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

          - `Type LocalShell`

            The type of the local shell tool. Always `local_shell`.

            - `const LocalShellLocalShell LocalShell = "local_shell"`

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

          - `Type Shell`

            The type of the shell tool. Always `shell`.

            - `const ShellShell Shell = "shell"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

            - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

          - `Environment BetaFunctionShellToolEnvironmentUnion`

            - `type BetaContainerAuto struct{…}`

              - `Type ContainerAuto`

                Automatically creates a container for this request

                - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

              - `FileIDs []string`

                An optional list of uploaded files to make available to your code.

              - `MemoryLimit BetaContainerAutoMemoryLimit`

                The memory limit for the container.

                - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

              - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                Network access policy for the container.

                - `type BetaContainerNetworkPolicyDisabled struct{…}`

                - `type BetaContainerNetworkPolicyAllowlist struct{…}`

              - `Skills []BetaContainerAutoSkillUnion`

                An optional list of skills referenced by id or inline data.

                - `type BetaSkillReference struct{…}`

                  - `SkillID string`

                    The ID of the referenced skill.

                  - `Type SkillReference`

                    References a skill created with the /v1/skills endpoint.

                    - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                  - `Version string`

                    Optional skill version. Use a positive integer or 'latest'. Omit for default.

                - `type BetaInlineSkill struct{…}`

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Source BetaInlineSkillSource`

                    Inline skill payload

                    - `Data string`

                      Base64-encoded skill zip bundle.

                    - `MediaType ApplicationZip`

                      The media type of the inline skill payload. Must be `application/zip`.

                      - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                    - `Type Base64`

                      The type of the inline skill source. Must be `base64`.

                      - `const Base64Base64 Base64 = "base64"`

                  - `Type Inline`

                    Defines an inline skill for this request.

                    - `const InlineInline Inline = "inline"`

            - `type BetaLocalEnvironment struct{…}`

              - `Type Local`

                Use a local computer environment.

                - `const LocalLocal Local = "local"`

              - `Skills []BetaLocalSkill`

                An optional list of skills.

                - `Description string`

                  The description of the skill.

                - `Name string`

                  The name of the skill.

                - `Path string`

                  The path to the directory containing the skill.

            - `type BetaContainerReference struct{…}`

              - `ContainerID string`

                The ID of the referenced container.

              - `Type ContainerReference`

                References a container created with the /v1/containers endpoint

                - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Name string`

            The name of the custom tool, used to identify it in tool calls.

          - `Type Custom`

            The type of the custom tool. Always `custom`.

            - `const CustomCustom Custom = "custom"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

            - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

          - `DeferLoading bool`

            Whether this tool should be deferred and discovered via tool search.

          - `Description string`

            Optional description of the custom tool, used to provide more context.

          - `Format BetaCustomToolFormatUnion`

            The input format for the custom tool. Default is unconstrained text.

            - `type BetaCustomToolFormatText struct{…}`

              Unconstrained free-form text.

              - `Type Text`

                Unconstrained text format. Always `text`.

                - `const TextText Text = "text"`

            - `type BetaCustomToolFormatGrammar struct{…}`

              A grammar defined by the user.

              - `Definition string`

                The grammar definition.

              - `Syntax string`

                The syntax of the grammar definition. One of `lark` or `regex`.

                - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

              - `Type Grammar`

                Grammar format. Always `grammar`.

                - `const GrammarGrammar Grammar = "grammar"`

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

          - `Description string`

            A description of the namespace shown to the model.

          - `Name string`

            The namespace name used in tool calls (for example, `crm`).

          - `Tools []BetaNamespaceToolToolUnion`

            The function/custom tools available inside this namespace.

            - `type BetaNamespaceToolToolFunction struct{…}`

              - `Name string`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

              - `AllowedCallers []string`

                The tool invocation context(s).

                - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

              - `DeferLoading bool`

                Whether this function should be deferred and discovered via tool search.

              - `Description string`

              - `OutputSchema map[string, any]`

                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

              - `Parameters any`

              - `Strict bool`

                Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

            - `type BetaCustomTool struct{…}`

              A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `Type Namespace`

            The type of the tool. Always `namespace`.

            - `const NamespaceNamespace Namespace = "namespace"`

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

          - `Type ToolSearch`

            The type of the tool. Always `tool_search`.

            - `const ToolSearchToolSearch ToolSearch = "tool_search"`

          - `Description string`

            Description shown to the model for a client-executed tool search tool.

          - `Execution BetaToolSearchToolExecution`

            Whether tool search is executed by the server or by the client.

            - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

            - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

          - `Parameters any`

            Parameter schema for a client-executed tool search tool.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `Type BetaWebSearchPreviewToolType`

            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

            - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

          - `SearchContentTypes []string`

            - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

            - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

          - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

            High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

            - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

            - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

            - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

          - `UserLocation BetaWebSearchPreviewToolUserLocation`

            The user's location.

            - `Type Approximate`

              The type of location approximation. Always `approximate`.

              - `const ApproximateApproximate Approximate = "approximate"`

            - `City string`

              Free text input for the city of the user, e.g. `San Francisco`.

            - `Country string`

              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

            - `Region string`

              Free text input for the region of the user, e.g. `California`.

            - `Timezone string`

              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

          - `Type ApplyPatch`

            The type of the tool. Always `apply_patch`.

            - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

          - `AllowedCallers []string`

            The tool invocation context(s).

            - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

            - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

      - `Type ToolSearchOutput`

        The type of the item. Always `tool_search_output`.

        - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

      - `Agent BetaResponseToolSearchOutputItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseItemAdditionalTools struct{…}`

      - `ID string`

        The unique ID of the additional tools item.

      - `Role string`

        The role that provided the additional tools.

        - `const BetaResponseItemAdditionalToolsRoleUnknown BetaResponseItemAdditionalToolsRole = "unknown"`

        - `const BetaResponseItemAdditionalToolsRoleUser BetaResponseItemAdditionalToolsRole = "user"`

        - `const BetaResponseItemAdditionalToolsRoleAssistant BetaResponseItemAdditionalToolsRole = "assistant"`

        - `const BetaResponseItemAdditionalToolsRoleSystem BetaResponseItemAdditionalToolsRole = "system"`

        - `const BetaResponseItemAdditionalToolsRoleCritic BetaResponseItemAdditionalToolsRole = "critic"`

        - `const BetaResponseItemAdditionalToolsRoleDiscriminator BetaResponseItemAdditionalToolsRole = "discriminator"`

        - `const BetaResponseItemAdditionalToolsRoleDeveloper BetaResponseItemAdditionalToolsRole = "developer"`

        - `const BetaResponseItemAdditionalToolsRoleTool BetaResponseItemAdditionalToolsRole = "tool"`

      - `Tools []BetaToolUnion`

        The additional tool definitions made available at this item.

        - `type BetaFunctionTool struct{…}`

          Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

        - `type BetaFileSearchTool struct{…}`

          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

        - `type BetaComputerTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaComputerUsePreviewTool struct{…}`

          A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

        - `type BetaWebSearchTool struct{…}`

          Search the Internet for sources related to the prompt. Learn more about the
          [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaToolMcp struct{…}`

          Give the model access to additional tools via remote Model Context Protocol
          (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

        - `type BetaToolCodeInterpreter struct{…}`

          A tool that runs Python code to help generate a response to a prompt.

        - `type BetaToolProgrammaticToolCalling struct{…}`

        - `type BetaToolImageGeneration struct{…}`

          A tool that generates images using the GPT image models.

        - `type BetaToolLocalShell struct{…}`

          A tool that allows the model to execute shell commands in a local environment.

        - `type BetaFunctionShellTool struct{…}`

          A tool that allows the model to execute shell commands.

        - `type BetaCustomTool struct{…}`

          A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

        - `type BetaNamespaceTool struct{…}`

          Groups function/custom tools under a shared namespace.

        - `type BetaToolSearchTool struct{…}`

          Hosted or BYOT tool search configuration for deferred tools.

        - `type BetaWebSearchPreviewTool struct{…}`

          This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

        - `type BetaApplyPatchTool struct{…}`

          Allows the assistant to create, delete, or update files using unified diffs.

      - `Type AdditionalTools`

        The type of the item. Always `additional_tools`.

        - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

      - `Agent BetaResponseItemAdditionalToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

      - `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`.

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        The type of the object. Always `reasoning`.

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Agent BetaResponseReasoningItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Content []BetaResponseReasoningItemContent`

        Reasoning text content.

        - `Text string`

          The reasoning text from the model.

        - `Type ReasoningText`

          The type of the reasoning text. Always `reasoning_text`.

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

        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.

      - `Status BetaResponseReasoningItemStatus`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

        - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

        - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

    - `type BetaResponseItemProgram struct{…}`

      - `ID string`

        The unique ID of the program item.

      - `CallID string`

        The stable call ID of the program item.

      - `Code string`

        The JavaScript source executed by programmatic tool calling.

      - `Fingerprint string`

        Opaque program replay fingerprint that must be round-tripped.

      - `Type Program`

        The type of the item. Always `program`.

        - `const ProgramProgram Program = "program"`

      - `Agent BetaResponseItemProgramAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseItemProgramOutput struct{…}`

      - `ID string`

        The unique ID of the program output item.

      - `CallID string`

        The call ID of the program item.

      - `Result string`

        The result produced by the program item.

      - `Status string`

        The terminal status of the program output item.

        - `const BetaResponseItemProgramOutputStatusCompleted BetaResponseItemProgramOutputStatus = "completed"`

        - `const BetaResponseItemProgramOutputStatusIncomplete BetaResponseItemProgramOutputStatus = "incomplete"`

      - `Type ProgramOutput`

        The type of the item. Always `program_output`.

        - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

      - `Agent BetaResponseItemProgramOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCompactionItem struct{…}`

      A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

      - `ID string`

        The unique ID of the compaction item.

      - `EncryptedContent string`

        The encrypted content that was produced by compaction.

      - `Type Compaction`

        The type of the item. Always `compaction`.

        - `const CompactionCompaction Compaction = "compaction"`

      - `Agent BetaResponseCompactionItemAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

        The unique ID of the image generation call.

      - `Result string`

        The generated image encoded in base64.

      - `Status string`

        The status of the image generation call.

        - `const BetaResponseItemImageGenerationCallStatusInProgress BetaResponseItemImageGenerationCallStatus = "in_progress"`

        - `const BetaResponseItemImageGenerationCallStatusCompleted BetaResponseItemImageGenerationCallStatus = "completed"`

        - `const BetaResponseItemImageGenerationCallStatusGenerating BetaResponseItemImageGenerationCallStatus = "generating"`

        - `const BetaResponseItemImageGenerationCallStatusFailed BetaResponseItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        The type of the image generation call. Always `image_generation_call`.

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Agent BetaResponseItemImageGenerationCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

        The unique ID of the code interpreter tool call.

      - `Code string`

        The code to run, or null if not available.

      - `ContainerID string`

        The ID of the container used to run the code.

      - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

        The outputs generated by the code interpreter, such as logs or images.
        Can be null if no outputs are available.

        - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

            The logs output from the code interpreter.

          - `Type Logs`

            The type of the output. Always `logs`.

            - `const LogsLogs Logs = "logs"`

        - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            The type of the output. Always `image`.

            - `const ImageImage Image = "image"`

          - `URL string`

            The URL of the image output from the code interpreter.

      - `Status BetaResponseCodeInterpreterToolCallStatus`

        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

        - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

        - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        The type of the code interpreter tool call. Always `code_interpreter_call`.

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Agent BetaResponseCodeInterpreterToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseItemLocalShellCall struct{…}`

      A tool call to run a command on the local shell.

      - `ID string`

        The unique ID of the local shell call.

      - `Action BetaResponseItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

          The command to run.

        - `Env map[string, string]`

          Environment variables to set for the command.

        - `Type Exec`

          The type of the local shell action. Always `exec`.

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the command.

        - `User string`

          Optional user to run the command as.

        - `WorkingDirectory string`

          Optional working directory to run the command in.

      - `CallID string`

        The unique ID of the local shell tool call generated by the model.

      - `Status string`

        The status of the local shell call.

        - `const BetaResponseItemLocalShellCallStatusInProgress BetaResponseItemLocalShellCallStatus = "in_progress"`

        - `const BetaResponseItemLocalShellCallStatusCompleted BetaResponseItemLocalShellCallStatus = "completed"`

        - `const BetaResponseItemLocalShellCallStatusIncomplete BetaResponseItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        The type of the local shell call. Always `local_shell_call`.

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `Agent BetaResponseItemLocalShellCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseItemLocalShellCallOutput struct{…}`

      The output of a local shell tool call.

      - `ID string`

        The unique ID of the local shell tool call generated by the model.

      - `Output string`

        A JSON string of the output of the local shell tool call.

      - `Type LocalShellCallOutput`

        The type of the local shell tool call output. Always `local_shell_call_output`.

        - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

      - `Agent BetaResponseItemLocalShellCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseItemLocalShellCallOutputStatusInProgress BetaResponseItemLocalShellCallOutputStatus = "in_progress"`

        - `const BetaResponseItemLocalShellCallOutputStatusCompleted BetaResponseItemLocalShellCallOutputStatus = "completed"`

        - `const BetaResponseItemLocalShellCallOutputStatusIncomplete BetaResponseItemLocalShellCallOutputStatus = "incomplete"`

    - `type BetaResponseFunctionShellToolCall struct{…}`

      A tool call that executes one or more shell commands in a managed environment.

      - `ID string`

        The unique ID of the shell tool call. Populated when this item is returned via API.

      - `Action BetaResponseFunctionShellToolCallAction`

        The shell commands and limits that describe how to run the tool call.

        - `Commands []string`

        - `MaxOutputLength int64`

          Optional maximum number of characters to return from each command.

        - `TimeoutMs int64`

          Optional timeout in milliseconds for the commands.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type BetaResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            The environment type. Always `local`.

            - `const LocalLocal Local = "local"`

        - `type BetaResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            The environment type. Always `container_reference`.

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `Status BetaResponseFunctionShellToolCallStatus`

        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        The type of the item. Always `shell_call`.

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `Agent BetaResponseFunctionShellToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

        The unique ID of the shell call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the shell tool call generated by the model.

      - `MaxOutputLength int64`

        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

      - `Output []BetaResponseFunctionShellToolCallOutputOutput`

        An array of shell call output contents

        - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              The outcome type. Always `timeout`.

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}`

            Indicates that the shell commands finished and returned an exit code.

            - `ExitCode int64`

              Exit code from the shell process.

            - `Type Exit`

              The outcome type. Always `exit`.

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

          The standard error output that was captured.

        - `Stdout string`

          The standard output that was captured.

        - `CreatedBy string`

          The identifier of the actor that created the item.

      - `Status BetaResponseFunctionShellToolCallOutputStatus`

        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.

        - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        The type of the shell call output. Always `shell_call_output`.

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `Agent BetaResponseFunctionShellToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseApplyPatchToolCall struct{…}`

      A tool call that applies file diffs by creating, deleting, or updating files.

      - `ID string`

        The unique ID of the apply patch tool call. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Operation BetaResponseApplyPatchToolCallOperationUnion`

        One of the create_file, delete_file, or update_file operations applied via apply_patch.

        - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to create.

          - `Type CreateFile`

            Create a new file with the provided diff.

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

            Path of the file to delete.

          - `Type DeleteFile`

            Delete the specified file.

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

            Diff to apply.

          - `Path string`

            Path of the file to update.

          - `Type UpdateFile`

            Update an existing file with the provided diff.

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status BetaResponseApplyPatchToolCallStatus`

        The status of the apply patch tool call. One of `in_progress` or `completed`.

        - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"`

        - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        The type of the item. Always `apply_patch_call`.

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `Agent BetaResponseApplyPatchToolCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call.

    - `type BetaResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

        The unique ID of the apply patch tool call output. Populated when this item is returned via API.

      - `CallID string`

        The unique ID of the apply patch tool call generated by the model.

      - `Status BetaResponseApplyPatchToolCallOutputStatus`

        The status of the apply patch tool call output. One of `completed` or `failed`.

        - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        The type of the item. Always `apply_patch_call_output`.

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `Agent BetaResponseApplyPatchToolCallOutputAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion`

        The execution context that produced this tool call.

        - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}`

          - `Type Direct`

            - `const DirectDirect Direct = "direct"`

        - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}`

          - `CallerID string`

            The call ID of the program item that produced this tool call.

          - `Type Program`

            - `const ProgramProgram Program = "program"`

      - `CreatedBy string`

        The ID of the entity that created this tool call output.

      - `Output string`

        Optional textual output returned by the apply patch tool.

    - `type BetaResponseItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

        The unique ID of the list.

      - `ServerLabel string`

        The label of the MCP server.

      - `Tools []BetaResponseItemMcpListToolsTool`

        The tools available on the server.

        - `InputSchema any`

          The JSON schema describing the tool's input.

        - `Name string`

          The name of the tool.

        - `Annotations any`

          Additional annotations about the tool.

        - `Description string`

          The description of the tool.

      - `Type McpListTools`

        The type of the item. Always `mcp_list_tools`.

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Agent BetaResponseItemMcpListToolsAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Error string`

        Error message if the server could not list tools.

    - `type BetaResponseItemMcpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

        The unique ID of the approval request.

      - `Arguments string`

        A JSON string of arguments for the tool.

      - `Name string`

        The name of the tool to run.

      - `ServerLabel string`

        The label of the MCP server making the request.

      - `Type McpApprovalRequest`

        The type of the item. Always `mcp_approval_request`.

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `Agent BetaResponseItemMcpApprovalRequestAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

    - `type BetaResponseItemMcpApprovalResponse struct{…}`

      A response to an MCP approval request.

      - `ID string`

        The unique ID of the approval response

      - `ApprovalRequestID string`

        The ID of the approval request being answered.

      - `Approve bool`

        Whether the request was approved.

      - `Type McpApprovalResponse`

        The type of the item. Always `mcp_approval_response`.

        - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

      - `Agent BetaResponseItemMcpApprovalResponseAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `Reason string`

        Optional reason for the decision.

    - `type BetaResponseItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

        The unique ID of the tool call.

      - `Arguments string`

        A JSON string of the arguments passed to the tool.

      - `Name string`

        The name of the tool that was run.

      - `ServerLabel string`

        The label of the MCP server running the tool.

      - `Type McpCall`

        The type of the item. Always `mcp_call`.

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `Agent BetaResponseItemMcpCallAgent`

        The agent that produced this item.

        - `AgentName string`

          The canonical name of the agent that produced this item.

      - `ApprovalRequestID string`

        Unique identifier for the MCP tool call approval request.
        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

      - `Error string`

        The error from the tool call, if any.

      - `Output string`

        The output from the tool call.

      - `Status string`

        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

        - `const BetaResponseItemMcpCallStatusInProgress BetaResponseItemMcpCallStatus = "in_progress"`

        - `const BetaResponseItemMcpCallStatusCompleted BetaResponseItemMcpCallStatus = "completed"`

        - `const BetaResponseItemMcpCallStatusIncomplete BetaResponseItemMcpCallStatus = "incomplete"`

        - `const BetaResponseItemMcpCallStatusCalling BetaResponseItemMcpCallStatus = "calling"`

        - `const BetaResponseItemMcpCallStatusFailed BetaResponseItemMcpCallStatus = "failed"`

    - `type BetaResponseCustomToolCallItem struct{…}`

      A call to a custom tool created by the model.

      - `ID string`

        The unique ID of the custom tool call item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseCustomToolCallItemStatusInProgress BetaResponseCustomToolCallItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallItemStatusCompleted BetaResponseCustomToolCallItemStatus = "completed"`

        - `const BetaResponseCustomToolCallItemStatusIncomplete BetaResponseCustomToolCallItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

    - `type BetaResponseCustomToolCallOutputItem struct{…}`

      The output of a custom tool call from your code, being sent back to the model.

      - `ID string`

        The unique ID of the custom tool call output item.

      - `Status string`

        The status of the item. One of `in_progress`, `completed`, or
        `incomplete`. Populated when items are returned via API.

        - `const BetaResponseCustomToolCallOutputItemStatusInProgress BetaResponseCustomToolCallOutputItemStatus = "in_progress"`

        - `const BetaResponseCustomToolCallOutputItemStatusCompleted BetaResponseCustomToolCallOutputItemStatus = "completed"`

        - `const BetaResponseCustomToolCallOutputItemStatusIncomplete BetaResponseCustomToolCallOutputItemStatus = "incomplete"`

      - `CreatedBy string`

        The identifier of the actor that created the item.

  - `FirstID string`

    The ID of the first item in the list.

  - `HasMore bool`

    Whether there are more items available.

  - `LastID string`

    The ID of the last item in the list.

  - `Object List`

    The type of object returned, must be `list`.

    - `const ListList List = "list"`

# Input Tokens

## Get input token counts

`client.Beta.Responses.InputTokens.Count(ctx, params) (*BetaResponseInputTokenCountResponse, error)`

**post** `/responses/input_tokens?beta=true`

Returns input token counts of the request.

Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count.

### Parameters

- `params BetaResponseInputTokenCountParams`

  - `Conversation param.Field[BetaResponseInputTokenCountParamsConversationUnion]`

    Body param: The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.
    Input items and output items from this response are automatically added to this conversation after this response completes.

    - `string`

    - `type BetaResponseConversationParamResp struct{…}`

      The conversation that this response belongs to.

      - `ID string`

        The unique ID of the conversation.

  - `Input param.Field[BetaResponseInputTokenCountParamsInputUnion]`

    Body param: Text, image, or file inputs to the model, used to generate a response

    - `string`

    - `type BetaResponseInputTokenCountParamsInputArray []BetaResponseInputItemUnion`

      A list of one or many input items to the model, containing different content types.

      - `type BetaEasyInputMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role. Messages with the
        `assistant` role are presumed to have been generated by the model in previous
        interactions.

        - `Content BetaEasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail BetaResponseInputImageDetail`

                The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                - `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`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

                The ID of the file to be sent to the model.

              - `ImageURL string`

                The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

              - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileDetail`

                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`.

                - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"`

                - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"`

                - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"`

              - `FileData string`

                The content of the file to be sent to the model.

              - `FileID string`

                The ID of the file to be sent to the model.

              - `FileURL string`

                The URL of the file to be sent to the model.

              - `Filename string`

                The name of the file to be sent to the model.

              - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Role BetaEasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"`

          - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"`

          - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"`

          - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"`

        - `Phase BetaEasyInputMessagePhase`

          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.

          - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"`

          - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"`

        - `Type BetaEasyInputMessageType`

          The type of the message input. Always `message`.

          - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"`

      - `type BetaResponseInputItemMessage struct{…}`

        A message input to the model with a role indicating instruction following
        hierarchy. Instructions given with the `developer` or `system` role take
        precedence over instructions given with the `user` role.

        - `Content BetaResponseInputMessageContentList`

          A list of one or many input items to the model, containing different content
          types.

        - `Role string`

          The role of the message input. One of `user`, `system`, or `developer`.

          - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"`

          - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"`

          - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"`

        - `Agent BetaResponseInputItemMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of item. One of `in_progress`, `completed`, or
          `incomplete`. Populated when items are returned via API.

          - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"`

          - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"`

          - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"`

      - `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.

          - `type BetaResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []BetaResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `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`.

                  - `const FileCitationFileCitation FileCitation = "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`.

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

                  The URL of the web resource.

              - `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`.

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "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`.

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

              The text output from the model.

            - `Type OutputText`

              The type of the output text. Always `output_text`.

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []BetaResponseOutputTextLogprob`

              - `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`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          The role of the output message. Always `assistant`.

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status BetaResponseOutputMessageStatus`

          The status of the message input. One of `in_progress`, `completed`, or
          `incomplete`. Populated when input items are returned via API.

          - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"`

          - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"`

          - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Agent BetaResponseOutputMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Phase BetaResponseOutputMessagePhase`

          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.

          - `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](https://platform.openai.com/docs/guides/tools-file-search) 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`,

          - `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`.

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Agent BetaResponseFileSearchToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Results []BetaResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]`

            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.

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

            The unique ID of the file.

          - `Filename string`

            The name of the file.

          - `Score float64`

            The relevance score of the file - a value between 0 and 1.

          - `Text string`

            The text that was retrieved from the file.

      - `type BetaResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) 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 string`

            The type of the pending safety check.

          - `Message string`

            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.

          - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"`

          - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"`

          - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"`

        - `Type BetaResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"`

        - `Action BetaComputerActionUnion`

          A click action.

          - `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`.

              - `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`.

              - `const ClickClick Click = "click"`

            - `X int64`

              The x-coordinate where the click occurred.

            - `Y int64`

              The y-coordinate where the click occurred.

            - `Keys []string`

              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`.

              - `const DoubleClickDoubleClick DoubleClick = "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`.

              - `const DragDrag Drag = "drag"`

            - `Keys []string`

              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`.

              - `const KeypressKeypress Keypress = "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`.

              - `const MoveMove Move = "move"`

            - `X int64`

              The x-coordinate to move to.

            - `Y int64`

              The y-coordinate to move to.

            - `Keys []string`

              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`.

              - `const ScreenshotScreenshot Screenshot = "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`.

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

              The x-coordinate where the scroll occurred.

            - `Y int64`

              The y-coordinate where the scroll occurred.

            - `Keys []string`

              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`.

              - `const TypeType Type = "type"`

          - `type BetaComputerActionWait struct{…}`

            A wait action.

            - `Type Wait`

              Specifies the event type. For a wait action, this property is always set to `wait`.

              - `const WaitWait Wait = "wait"`

        - `Actions BetaComputerActionList`

          Flattened batched actions for `computer_use`. Each action includes an
          `type` discriminator and action-specific fields.

          - `type BetaComputerActionClick struct{…}`

            A click action.

          - `type BetaComputerActionDoubleClick struct{…}`

            A double click action.

          - `type BetaComputerActionDrag struct{…}`

            A drag action.

          - `type BetaComputerActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

          - `type BetaComputerActionMove struct{…}`

            A mouse move action.

          - `type BetaComputerActionScreenshot struct{…}`

            A screenshot action.

          - `type BetaComputerActionScroll struct{…}`

            A scroll action.

          - `type BetaComputerActionType struct{…}`

            An action to type in text.

          - `type BetaComputerActionWait struct{…}`

            A wait action.

        - `Agent BetaResponseComputerToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

          The ID of the computer tool call that produced the output.

        - `Output BetaResponseComputerToolCallOutputScreenshot`

          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`.

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

            The identifier of an uploaded file that contains the screenshot.

          - `ImageURL string`

            The URL of the screenshot image.

        - `Type ComputerCallOutput`

          The type of the computer tool call output. Always `computer_call_output`.

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

          The ID of the computer tool call output.

        - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

          The safety checks reported by the API that have been acknowledged by the developer.

          - `ID string`

            The ID of the pending safety check.

          - `Code string`

            The type of the pending safety check.

          - `Message string`

            Details about the pending safety check.

        - `Agent BetaResponseInputItemComputerCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.

          - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"`

          - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type BetaResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action BetaResponseFunctionWebSearchActionUnion`

          An object describing the specific action taken in this web search call.
          Includes details on how the model used the web (search, open_page, find_in_page).

          - `type BetaResponseFunctionWebSearchActionSearch struct{…}`

            Action type "search" - Performs a web search query.

            - `Type Search`

              The action type.

              - `const SearchSearch Search = "search"`

            - `Queries []string`

              The search queries.

            - `Query string`

              The search query.

            - `Sources []BetaResponseFunctionWebSearchActionSearchSource`

              The sources used in the search.

              - `Type URL`

                The type of source. Always `url`.

                - `const URLURL URL = "url"`

              - `URL string`

                The URL of the source.

          - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}`

            Action type "open_page" - Opens a specific URL from search results.

            - `Type OpenPage`

              The action type.

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

              The URL opened by the model.

          - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}`

            Action type "find_in_page": Searches for a pattern within a loaded page.

            - `Pattern string`

              The pattern or text to search for within the page.

            - `Type FindInPage`

              The action type.

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

              The URL of the page searched for the pattern.

        - `Status BetaResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"`

          - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"`

          - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"`

          - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          The type of the web search tool call. Always `web_search_call`.

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

        - `Agent BetaResponseFunctionWebSearchAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](https://platform.openai.com/docs/guides/function-calling) 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`.

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

          The unique ID of the function tool call.

        - `Agent BetaResponseFunctionToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseFunctionToolCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the function to run.

        - `Status BetaResponseFunctionToolCallStatus`

          The status of the item. One of `in_progress`, `completed`, or
          `incomplete`. Populated when items are returned via API.

          - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"`

          - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"`

          - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"`

      - `type BetaResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

          The unique ID of the function tool call generated by the model.

        - `Output BetaResponseInputItemFunctionCallOutputOutputUnion`

          Text, image, or file output of the function tool call.

          - `string`

          - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type BetaResponseInputTextContent 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`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail BetaResponseInputImageContentDetail`

                The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"`

                - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"`

                - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"`

                - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"`

              - `FileID string`

                The ID of the file to be sent to the model.

              - `ImageURL string`

                The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

              - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

            - `type BetaResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail BetaResponseInputFileContentDetail`

                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`.

                - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"`

                - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"`

                - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

              - `FileID string`

                The ID of the file to be sent to the model.

              - `FileURL string`

                The URL of the file to be sent to the model.

              - `Filename string`

                The name of the file to be sent to the model.

              - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint`

                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`.

                  - `const ExplicitExplicit Explicit = "explicit"`

        - `Type FunctionCallOutput`

          The type of the function tool call output. Always `function_call_output`.

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

          The unique ID of the function tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemFunctionCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.

          - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemAgentMessage struct{…}`

        A message routed between agents.

        - `Author string`

          The sending agent identity.

        - `Content []BetaResponseInputItemAgentMessageContentUnion`

          Plaintext, image, or encrypted content sent between agents.

          - `type BetaResponseInputTextContent struct{…}`

            A text input to the model.

          - `type BetaResponseInputImageContent struct{…}`

            An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

          - `type BetaResponseInputItemAgentMessageContentEncryptedContent 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`.

              - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"`

        - `Recipient string`

          The destination agent identity.

        - `Type AgentMessage`

          The item type. Always `agent_message`.

          - `const AgentMessageAgentMessage AgentMessage = "agent_message"`

        - `ID string`

          The unique ID of this agent message item.

        - `Agent BetaResponseInputItemAgentMessageAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCall struct{…}`

        - `Action string`

          The multi-agent action that was executed.

          - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"`

        - `Arguments string`

          The action arguments as a JSON string.

        - `CallID string`

          The unique ID linking this call to its output.

        - `Type MultiAgentCall`

          The item type. Always `multi_agent_call`.

          - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"`

        - `ID string`

          The unique ID of this multi-agent call.

        - `Agent BetaResponseInputItemMultiAgentCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMultiAgentCallOutput struct{…}`

        - `Action string`

          The multi-agent action that produced this result.

          - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"`

          - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"`

        - `CallID string`

          The unique ID of the multi-agent call.

        - `Output []BetaResponseInputItemMultiAgentCallOutputOutput`

          Text output returned by the multi-agent action.

          - `Text string`

            The text content.

          - `Type OutputText`

            The content type. Always `output_text`.

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Annotations []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationUnion`

            Citations associated with the text content.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationFileCitation struct{…}`

              - `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 citation type. Always `file_citation`.

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationURLCitation struct{…}`

              - `EndIndex int64`

                The index of the last character of the citation in the message.

              - `StartIndex int64`

                The index of the first character of the citation in the message.

              - `Title string`

                The title of the cited resource.

              - `Type URLCitation`

                The citation type. Always `url_citation`.

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

                The URL of the cited resource.

            - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationContainerFileCitation struct{…}`

              - `ContainerID string`

                The ID of the container.

              - `EndIndex int64`

                The index of the last character of the citation in the message.

              - `FileID string`

                The ID of the container file.

              - `Filename string`

                The filename of the container file cited.

              - `StartIndex int64`

                The index of the first character of the citation in the message.

              - `Type ContainerFileCitation`

                The citation type. Always `container_file_citation`.

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `Type MultiAgentCallOutput`

          The item type. Always `multi_agent_call_output`.

          - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"`

        - `ID string`

          The unique ID of this multi-agent call output.

        - `Agent BetaResponseInputItemMultiAgentCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemToolSearchCall struct{…}`

        - `Arguments any`

          The arguments supplied to the tool search call.

        - `Type ToolSearchCall`

          The item type. Always `tool_search_call`.

          - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"`

        - `ID string`

          The unique ID of this tool search call.

        - `Agent BetaResponseInputItemToolSearchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

          The unique ID of the tool search call generated by the model.

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"`

          - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"`

          - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type BetaResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []BetaToolUnion`

          The loaded tool definitions returned by the tool search output.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

            - `Name string`

              The name of the function to call.

            - `Parameters map[string, any]`

              A JSON schema object describing the parameters of the function.

            - `Strict bool`

              Whether strict parameter validation is enforced for this function tool.

            - `Type Function`

              The type of the function tool. Always `function`.

              - `const FunctionFunction Function = "function"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"`

              - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this function is deferred and loaded via tool search.

            - `Description string`

              A description of the function. Used by the model to determine whether or not to call the function.

            - `OutputSchema map[string, any]`

              A JSON schema object describing the JSON value encoded in string outputs for this function.

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

            - `Type FileSearch`

              The type of the file search tool. Always `file_search`.

              - `const FileSearchFileSearch FileSearch = "file_search"`

            - `VectorStoreIDs []string`

              The IDs of the vector stores to search.

            - `Filters BetaFileSearchToolFiltersUnion`

              A filter to apply.

              - `type BetaFileSearchToolFiltersComparisonFilter struct{…}`

                A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                - `Key string`

                  The key to compare against the value.

                - `Type string`

                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                  - `eq`: equals
                  - `ne`: not equal
                  - `gt`: greater than
                  - `gte`: greater than or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `in`: in
                  - `nin`: not in

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"`

                  - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"`

                - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type BetaFileSearchToolFiltersCompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}`

                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.

                    - `Key string`

                      The key to compare against the value.

                    - `Type string`

                      Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.

                      - `eq`: equals
                      - `ne`: not equal
                      - `gt`: greater than
                      - `gte`: greater than or equal
                      - `lt`: less than
                      - `lte`: less than or equal
                      - `in`: in
                      - `nin`: not in

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"`

                      - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"`

                    - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion`

                      The value to compare against the attribute key; supports string, number, or boolean types.

                      - `string`

                      - `float64`

                      - `bool`

                      - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                        - `string`

                        - `float64`

                - `Type string`

                  Type of operation: `and` or `or`.

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"`

                  - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions BetaFileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch`

                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

                - `EmbeddingWeight float64`

                  The weight of the embedding in the reciprocal ranking fusion.

                - `TextWeight float64`

                  The weight of the text in the reciprocal ranking fusion.

              - `Ranker string`

                The ranker to use for the file search.

                - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"`

                - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"`

              - `ScoreThreshold float64`

                The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment BetaComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"`

              - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"`

              - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"`

              - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"`

              - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"`

            - `Filters BetaWebSearchToolFilters`

              Filters for the search.

              - `AllowedDomains []string`

                Allowed domains for the search. If not provided, all domains are allowed.
                Subdomains of the provided domains are allowed as well.

                Example: `["pubmed.ncbi.nlm.nih.gov"]`

            - `SearchContextSize BetaWebSearchToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"`

              - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"`

              - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchToolUserLocation`

              The approximate location of the user.

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

              - `Type string`

                The type of location approximation. Always `approximate`.

                - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"`

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

            - `ServerLabel string`

              A label for this MCP server, used to identify it in tool calls.

            - `Type Mcp`

              The type of the MCP tool. Always `mcp`.

              - `const McpMcp Mcp = "mcp"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"`

              - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools BetaToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type BetaToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}`

                A filter object to specify which tools are allowed.

                - `ReadOnly bool`

                  Indicates whether or not a tool modifies data or is read-only. If an
                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                  it will match this filter.

                - `ToolNames []string`

                  List of allowed tool names.

            - `Authorization string`

              An OAuth access token that can be used with a remote MCP server, either
              with a custom MCP server URL or a service connector. Your application
              must handle the OAuth authorization flow and provide the token here.

            - `ConnectorID string`

              Identifier for service connectors, like those available in ChatGPT. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
              about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).

              Currently supported `connector_id` values are:

              - Dropbox: `connector_dropbox`
              - Gmail: `connector_gmail`
              - Google Calendar: `connector_googlecalendar`
              - Google Drive: `connector_googledrive`
              - Microsoft Teams: `connector_microsoftteams`
              - Outlook Calendar: `connector_outlookcalendar`
              - Outlook Email: `connector_outlookemail`
              - SharePoint: `connector_sharepoint`

              - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"`

              - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"`

              - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"`

              - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"`

              - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"`

              - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"`

              - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"`

              - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"`

            - `DeferLoading bool`

              Whether this MCP tool is deferred and discovered via tool search.

            - `Headers map[string, string]`

              Optional HTTP headers to send to the MCP server. Use for authentication
              or other purposes.

            - `RequireApproval BetaToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}`

                Specify which of the MCP server's tools require approval. Can be
                `always`, `never`, or a filter object associated with tools
                that require approval.

                - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

                - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  A filter object to specify which tools are allowed.

                  - `ReadOnly bool`

                    Indicates whether or not a tool modifies data or is read-only. If an
                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
                    it will match this filter.

                  - `ToolNames []string`

                    List of allowed tool names.

              - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string`

                Specify a single approval policy for all tools. One of `always` or
                `never`. When set to `always`, all tools will require approval. When
                set to `never`, all tools will not require approval.

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"`

            - `ServerDescription string`

              Optional description of the MCP server, used to provide more context.

            - `ServerURL string`

              The URL for the MCP server. One of `server_url`, `connector_id`, or
              `tunnel_id` must be provided.

            - `TunnelID string`

              The Secure MCP Tunnel ID to use instead of a direct server URL. One of
              `server_url`, `connector_id`, or `tunnel_id` must be provided.

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container BetaToolCodeInterpreterContainerUnion`

              The code interpreter container. Can be a container ID or an object that
              specifies uploaded file IDs to make available to your code, along with an
              optional `memory_limit` setting.

              - `string`

              - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.

                - `Type Auto`

                  Always `auto`.

                  - `const AutoAuto Auto = "auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      - `Domain string`

                        The domain associated with the secret.

                      - `Name string`

                        The name of the secret to inject for the domain.

                      - `Value string`

                        The secret value to inject for the domain.

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"`

              - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type BetaToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

            - `Type ImageGeneration`

              The type of the image generation tool. Always `image_generation`.

              - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

            - `Action string`

              Whether to generate a new image or edit an existing image. Default: `auto`.

              - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"`

              - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"`

              - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s).
              This parameter is only supported for GPT image models that support
              transparent backgrounds. Must be one of `transparent`, `opaque`, or
              `auto` (default value). When `auto` is used, the model will
              automatically determine the best background for the image.

              `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
              transparent backgrounds. Requests with `background` set to
              `transparent` will return an error for these models; use `opaque` or
              `auto` instead.

              If `transparent`, the output format needs to support transparency,
              so it should be set to either `png` (default value) or `webp`.

              - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"`

              - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"`

              - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.

              - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"`

              - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"`

            - `InputImageMask BetaToolImageGenerationInputImageMask`

              Optional mask for inpainting. Contains `image_url`
              (string, optional) and `file_id` (string, optional).

              - `FileID string`

                File ID for the mask image.

              - `ImageURL string`

                Base64-encoded mask image.

            - `Model string`

              The image generation model to use. Default: `gpt-image-1`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"`

                - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"`

                - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"`

                - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"`

                - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"`

              - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"`

              - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"`

              - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

            - `Quality string`

              The quality of the generated image. One of `low`, `medium`, `high`,
              or `auto`. Default: `auto`.

              - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"`

              - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"`

              - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"`

              - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.

              - `string`

              - `string`

                - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"`

                - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"`

                - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"`

                - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"`

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

            - `Type LocalShell`

              The type of the local shell tool. Always `local_shell`.

              - `const LocalShellLocalShell LocalShell = "local_shell"`

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

            - `Type Shell`

              The type of the shell tool. Always `shell`.

              - `const ShellShell Shell = "shell"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"`

              - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"`

            - `Environment BetaFunctionShellToolEnvironmentUnion`

              - `type BetaContainerAuto struct{…}`

                - `Type ContainerAuto`

                  Automatically creates a container for this request

                  - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

                - `FileIDs []string`

                  An optional list of uploaded files to make available to your code.

                - `MemoryLimit BetaContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"`

                  - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"`

                  - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"`

                  - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type BetaContainerNetworkPolicyDisabled struct{…}`

                  - `type BetaContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []BetaContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  - `type BetaSkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                    - `Type SkillReference`

                      References a skill created with the /v1/skills endpoint.

                      - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                    - `Version string`

                      Optional skill version. Use a positive integer or 'latest'. Omit for default.

                  - `type BetaInlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source BetaInlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                      - `MediaType ApplicationZip`

                        The media type of the inline skill payload. Must be `application/zip`.

                        - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"`

                      - `Type Base64`

                        The type of the inline skill source. Must be `base64`.

                        - `const Base64Base64 Base64 = "base64"`

                    - `Type Inline`

                      Defines an inline skill for this request.

                      - `const InlineInline Inline = "inline"`

              - `type BetaLocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []BetaLocalSkill`

                  An optional list of skills.

                  - `Description string`

                    The description of the skill.

                  - `Name string`

                    The name of the skill.

                  - `Path string`

                    The path to the directory containing the skill.

              - `type BetaContainerReference struct{…}`

                - `ContainerID string`

                  The ID of the referenced container.

                - `Type ContainerReference`

                  References a container created with the /v1/containers endpoint

                  - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Name string`

              The name of the custom tool, used to identify it in tool calls.

            - `Type Custom`

              The type of the custom tool. Always `custom`.

              - `const CustomCustom Custom = "custom"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"`

              - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"`

            - `DeferLoading bool`

              Whether this tool should be deferred and discovered via tool search.

            - `Description string`

              Optional description of the custom tool, used to provide more context.

            - `Format BetaCustomToolFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type BetaCustomToolFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type BetaCustomToolFormatGrammar struct{…}`

                A grammar defined by the user.

                - `Definition string`

                  The grammar definition.

                - `Syntax string`

                  The syntax of the grammar definition. One of `lark` or `regex`.

                  - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"`

                  - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

            - `Description string`

              A description of the namespace shown to the model.

            - `Name string`

              The namespace name used in tool calls (for example, `crm`).

            - `Tools []BetaNamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              - `type BetaNamespaceToolToolFunction struct{…}`

                - `Name string`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `DeferLoading bool`

                  Whether this function should be deferred and discovered via tool search.

                - `Description string`

                - `OutputSchema map[string, any]`

                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

                - `Parameters any`

                - `Strict bool`

                  Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

              - `type BetaCustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

            - `Type ToolSearch`

              The type of the tool. Always `tool_search`.

              - `const ToolSearchToolSearch ToolSearch = "tool_search"`

            - `Description string`

              Description shown to the model for a client-executed tool search tool.

            - `Execution BetaToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"`

              - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

            - `Type BetaWebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"`

              - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"`

              - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize`

              High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.

              - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"`

              - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"`

              - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation BetaWebSearchPreviewToolUserLocation`

              The user's location.

              - `Type Approximate`

                The type of location approximation. Always `approximate`.

                - `const ApproximateApproximate Approximate = "approximate"`

              - `City string`

                Free text input for the city of the user, e.g. `San Francisco`.

              - `Country string`

                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.

              - `Region string`

                Free text input for the region of the user, e.g. `California`.

              - `Timezone string`

                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

            - `Type ApplyPatch`

              The type of the tool. Always `apply_patch`.

              - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"`

              - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"`

        - `Type ToolSearchOutput`

          The item type. Always `tool_search_output`.

          - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"`

        - `ID string`

          The unique ID of this tool search output.

        - `Agent BetaResponseToolSearchOutputItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `CallID string`

          The unique ID of the tool search call generated by the model.

        - `Execution BetaResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"`

          - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"`

        - `Status BetaResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"`

          - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type BetaResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []BetaToolUnion`

          A list of additional tools made available at this item.

          - `type BetaFunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

          - `type BetaFileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

          - `type BetaComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

          - `type BetaWebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

          - `type BetaToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

          - `type BetaToolProgrammaticToolCalling struct{…}`

          - `type BetaToolImageGeneration struct{…}`

            A tool that generates images using the GPT image models.

          - `type BetaToolLocalShell struct{…}`

            A tool that allows the model to execute shell commands in a local environment.

          - `type BetaFunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type BetaCustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

          - `type BetaNamespaceTool struct{…}`

            Groups function/custom tools under a shared namespace.

          - `type BetaToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type BetaWebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

          - `type BetaApplyPatchTool struct{…}`

            Allows the assistant to create, delete, or update files using unified diffs.

        - `Type AdditionalTools`

          The item type. Always `additional_tools`.

          - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"`

        - `ID string`

          The unique ID of this additional tools item.

        - `Agent BetaResponseInputItemAdditionalToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this 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](https://platform.openai.com/docs/guides/conversation-state).

        - `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`.

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          The type of the object. Always `reasoning`.

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Agent BetaResponseReasoningItemAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Content []BetaResponseReasoningItemContent`

          Reasoning text content.

          - `Text string`

            The reasoning text from the model.

          - `Type ReasoningText`

            The type of the reasoning text. Always `reasoning_text`.

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

          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.

        - `Status BetaResponseReasoningItemStatus`

          The status of the item. One of `in_progress`, `completed`, or
          `incomplete`. Populated when items are returned via API.

          - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"`

          - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"`

          - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"`

      - `type BetaResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

        - `Agent BetaResponseCompactionItemParamAgentResp`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

          The unique ID of the image generation call.

        - `Result string`

          The generated image encoded in base64.

        - `Status string`

          The status of the image generation call.

          - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"`

          - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"`

          - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Agent BetaResponseInputItemImageGenerationCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

          The unique ID of the code interpreter tool call.

        - `Code string`

          The code to run, or null if not available.

        - `ContainerID string`

          The ID of the container used to run the code.

        - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

              The logs output from the code interpreter.

            - `Type Logs`

              The type of the output. Always `logs`.

              - `const LogsLogs Logs = "logs"`

          - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              The type of the output. Always `image`.

              - `const ImageImage Image = "image"`

            - `URL string`

              The URL of the image output from the code interpreter.

        - `Status BetaResponseCodeInterpreterToolCallStatus`

          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.

          - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"`

          - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          The type of the code interpreter tool call. Always `code_interpreter_call`.

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Agent BetaResponseCodeInterpreterToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCall struct{…}`

        A tool call to run a command on the local shell.

        - `ID string`

          The unique ID of the local shell call.

        - `Action BetaResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

            The command to run.

          - `Env map[string, string]`

            Environment variables to set for the command.

          - `Type Exec`

            The type of the local shell action. Always `exec`.

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

            Optional timeout in milliseconds for the command.

          - `User string`

            Optional user to run the command as.

          - `WorkingDirectory string`

            Optional working directory to run the command in.

        - `CallID string`

          The unique ID of the local shell tool call generated by the model.

        - `Status string`

          The status of the local shell call.

          - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `Agent BetaResponseInputItemLocalShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

          The unique ID of the local shell tool call generated by the model.

        - `Output string`

          A JSON string of the output of the local shell tool call.

        - `Type LocalShellCallOutput`

          The type of the local shell tool call output. Always `local_shell_call_output`.

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Agent BetaResponseInputItemLocalShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action BetaResponseInputItemShellCallAction`

          The shell commands and limits that describe how to run the tool call.

          - `Commands []string`

            Ordered shell commands for the execution environment to run.

          - `MaxOutputLength int64`

            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.

          - `TimeoutMs int64`

            Maximum wall-clock time in milliseconds to allow the shell commands to run.

        - `CallID string`

          The unique ID of the shell tool call generated by the model.

        - `Type ShellCall`

          The type of the item. Always `shell_call`.

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

          The unique ID of the shell tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment BetaResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type BetaLocalEnvironment struct{…}`

          - `type BetaContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"`

          - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"`

      - `type BetaResponseInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

          The unique ID of the shell tool call generated by the model.

        - `Output []BetaResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}`

              Indicates that the shell commands finished and returned an exit code.

              - `ExitCode int64`

                The exit code returned by the shell process.

              - `Type Exit`

                The outcome type. Always `exit`.

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

            Captured stderr output for the shell call.

          - `Stdout string`

            Captured stdout output for the shell call.

        - `Type ShellCallOutput`

          The type of the item. Always `shell_call_output`.

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

          The unique ID of the shell tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemShellCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `MaxOutputLength int64`

          The maximum number of UTF-8 characters captured for this shell call's combined output.

        - `Status string`

          The status of the shell call output.

          - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"`

          - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type BetaResponseInputItemApplyPatchCall struct{…}`

        A tool call representing a request to create, delete, or update files using diff patches.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Operation BetaResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

            - `Path string`

              Path of the file to create relative to the workspace root.

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

              Path of the file to delete relative to the workspace root.

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

            - `Path string`

              Path of the file to update relative to the workspace root.

            - `Type UpdateFile`

              The operation type. Always `update_file`.

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          The status of the apply patch tool call. One of `in_progress` or `completed`.

          - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          The type of the item. Always `apply_patch_call`.

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

          The unique ID of the apply patch tool call. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

          The unique ID of the apply patch tool call generated by the model.

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          The type of the item. Always `apply_patch_call_output`.

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

          The unique ID of the apply patch tool call output. Populated when this item is returned via API.

        - `Agent BetaResponseInputItemApplyPatchCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Output string`

          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).

      - `type BetaResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

          The unique ID of the list.

        - `ServerLabel string`

          The label of the MCP server.

        - `Tools []BetaResponseInputItemMcpListToolsTool`

          The tools available on the server.

          - `InputSchema any`

            The JSON schema describing the tool's input.

          - `Name string`

            The name of the tool.

          - `Annotations any`

            Additional annotations about the tool.

          - `Description string`

            The description of the tool.

        - `Type McpListTools`

          The type of the item. Always `mcp_list_tools`.

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Agent BetaResponseInputItemMcpListToolsAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Error string`

          Error message if the server could not list tools.

      - `type BetaResponseInputItemMcpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

          The unique ID of the approval request.

        - `Arguments string`

          A JSON string of arguments for the tool.

        - `Name string`

          The name of the tool to run.

        - `ServerLabel string`

          The label of the MCP server making the request.

        - `Type McpApprovalRequest`

          The type of the item. Always `mcp_approval_request`.

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

        - `Agent BetaResponseInputItemMcpApprovalRequestAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

          The ID of the approval request being answered.

        - `Approve bool`

          Whether the request was approved.

        - `Type McpApprovalResponse`

          The type of the item. Always `mcp_approval_response`.

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

          The unique ID of the approval response

        - `Agent BetaResponseInputItemMcpApprovalResponseAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Reason string`

          Optional reason for the decision.

      - `type BetaResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

          The unique ID of the tool call.

        - `Arguments string`

          A JSON string of the arguments passed to the tool.

        - `Name string`

          The name of the tool that was run.

        - `ServerLabel string`

          The label of the MCP server running the tool.

        - `Type McpCall`

          The type of the item. Always `mcp_call`.

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `Agent BetaResponseInputItemMcpCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `ApprovalRequestID string`

          Unique identifier for the MCP tool call approval request.
          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.

        - `Error string`

          The error from the tool call, if any.

        - `Output string`

          The output from the tool call.

        - `Status string`

          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.

          - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"`

          - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"`

          - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"`

          - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"`

          - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"`

      - `type BetaResponseCustomToolCallOutput struct{…}`

        The output of a custom tool call from your code, being sent back to the model.

        - `CallID string`

          The call ID, used to map this custom tool call output to a custom tool call.

        - `Output BetaResponseCustomToolCallOutputOutputUnion`

          The output from the custom tool call generated by your code.
          Can be a string or an list of output content.

          - `string`

          - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type BetaResponseInputText struct{…}`

              A text input to the model.

            - `type BetaResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type BetaResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          The type of the custom tool call output. Always `custom_tool_call_output`.

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

          The unique ID of the custom tool call output in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type BetaResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

          An identifier used to map this custom tool call to a tool call output.

        - `Input string`

          The input for the custom tool call generated by the model.

        - `Name string`

          The name of the custom tool being called.

        - `Type CustomToolCall`

          The type of the custom tool call. Always `custom_tool_call`.

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

          The unique ID of the custom tool call in the OpenAI platform.

        - `Agent BetaResponseCustomToolCallAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Caller BetaResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type BetaResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type BetaResponseCustomToolCallCallerProgram struct{…}`

            - `CallerID string`

              The call ID of the program item that produced this tool call.

            - `Type Program`

              - `const ProgramProgram Program = "program"`

        - `Namespace string`

          The namespace of the custom tool being called.

      - `type BetaResponseInputItemCompactionTrigger struct{…}`

        Compacts the current context. Must be the final input item.

        - `Type CompactionTrigger`

          The type of the item. Always `compaction_trigger`.

          - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"`

        - `Agent BetaResponseInputItemCompactionTriggerAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Agent BetaResponseInputItemItemReferenceAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"`

      - `type BetaResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

        - `Agent BetaResponseInputItemProgramAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

      - `type BetaResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

        - `Result string`

          The result produced by the program item.

        - `Status string`

          The terminal status of the program output.

          - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"`

          - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

        - `Agent BetaResponseInputItemProgramOutputAgent`

          The agent that produced this item.

          - `AgentName string`

            The canonical name of the agent that produced this item.

  - `Instructions param.Field[string]`

    Body param: A system (or developer) message inserted into the model's context.
    When used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

  - `Model param.Field[string]`

    Body param: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models.

  - `ParallelToolCalls param.Field[bool]`

    Body param: Whether to allow the model to run tool calls in parallel.

  - `Personality param.Field[BetaResponseInputTokenCountParamsPersonality]`

    Body param: A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters.

    - `string`

    - `type BetaResponseInputTokenCountParamsPersonality string`

      A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters.

      - `const BetaResponseInputTokenCountParamsPersonalityFriendly BetaResponseInputTokenCountParamsPersonality = "friendly"`

      - `const BetaResponseInputTokenCountParamsPersonalityPragmatic BetaResponseInputTokenCountParamsPersonality = "pragmatic"`

  - `PreviousResponseID param.Field[string]`

    Body param: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.

  - `Reasoning param.Field[BetaResponseInputTokenCountParamsReasoning]`

    Body param: **gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).

    - `Context string`

      Controls which reasoning items are rendered back to the model on later turns.
      If omitted or set to `auto`, the model determines the context mode. The
      `gpt-5.6` model family defaults to `all_turns`; earlier models default to
      `current_turn`.

      When returned on a response, this is the effective reasoning context mode
      used for the response.

      - `const BetaResponseInputTokenCountParamsReasoningContextAuto BetaResponseInputTokenCountParamsReasoningContext = "auto"`

      - `const BetaResponseInputTokenCountParamsReasoningContextCurrentTurn BetaResponseInputTokenCountParamsReasoningContext = "current_turn"`

      - `const BetaResponseInputTokenCountParamsReasoningContextAllTurns BetaResponseInputTokenCountParamsReasoningContext = "all_turns"`

    - `Effort string`

      Constrains effort on reasoning for reasoning models. Currently supported
      values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
      Reducing reasoning effort can result in faster responses and fewer tokens
      used on reasoning in a response. Not all reasoning models support every
      value. See the
      [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
      for model-specific support.

      - `const BetaResponseInputTokenCountParamsReasoningEffortNone BetaResponseInputTokenCountParamsReasoningEffort = "none"`

      - `const BetaResponseInputTokenCountParamsReasoningEffortMinimal BetaResponseInputTokenCountParamsReasoningEffort = "minimal"`

      - `const BetaResponseInputTokenCountParamsReasoningEffortLow BetaResponseInputTokenCountParamsReasoningEffort = "low"`

      - `const BetaResponseInputTokenCountParamsReasoningEffortMedium BetaResponseInputTokenCountParamsReasoningEffort = "medium"`

      - `const BetaResponseInputTokenCountParamsReasoningEffortHigh BetaResponseInputTokenCountParamsReasoningEffort = "high"`

      - `const BetaResponseInputTokenCountParamsReasoningEffortXhigh BetaResponseInputTokenCountParamsReasoningEffort = "xhigh"`

      - `const BetaResponseInputTokenCountParamsReasoningEffortMax BetaResponseInputTokenCountParamsReasoningEffort = "max"`

    - `GenerateSummary string`

      **Deprecated:** use `summary` instead.

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      - `const BetaResponseInputTokenCountParamsReasoningGenerateSummaryAuto BetaResponseInputTokenCountParamsReasoningGenerateSummary = "auto"`

      - `const BetaResponseInputTokenCountParamsReasoningGenerateSummaryConcise BetaResponseInputTokenCountParamsReasoningGenerateSummary = "concise"`

      - `const BetaResponseInputTokenCountParamsReasoningGenerateSummaryDetailed BetaResponseInputTokenCountParamsReasoningGenerateSummary = "detailed"`

    - `Mode string`

      Controls the reasoning execution mode for the request.

      When returned on a response, this is the effective execution mode.

      - `string`

      - `string`

        - `const BetaResponseInputTokenCountParamsReasoningModeStandard BetaResponseInputTokenCountParamsReasoningMode = "standard"`

        - `const BetaResponseInputTokenCountParamsReasoningModePro BetaResponseInputTokenCountParamsReasoningMode = "pro"`

    - `Summary string`

      A summary of the reasoning performed by the model. This can be
      useful for debugging and understanding the model's reasoning process.
      One of `auto`, `concise`, or `detailed`.

      `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.

      - `const BetaResponseInputTokenCountParamsReasoningSummaryAuto BetaResponseInputTokenCountParamsReasoningSummary = "auto"`

      - `const BetaResponseInputTokenCountParamsReasoningSummaryConcise BetaResponseInputTokenCountParamsReasoningSummary = "concise"`

      - `const BetaResponseInputTokenCountParamsReasoningSummaryDetailed BetaResponseInputTokenCountParamsReasoningSummary = "detailed"`

  - `Text param.Field[BetaResponseInputTokenCountParamsText]`

    Body param: Configuration options for a text response from the model. Can be plain
    text or structured JSON data. Learn more:

    - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
    - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

    - `Format BetaResponseFormatTextConfigUnion`

      An object specifying the format that the model must output.

      Configuring `{ "type": "json_schema" }` enables Structured Outputs,
      which ensures the model will match your supplied JSON schema. Learn more in the
      [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

      The default format is `{ "type": "text" }` with no additional options.

      **Not recommended for gpt-4o and newer models:**

      Setting to `{ "type": "json_object" }` enables the older JSON mode, which
      ensures the message the model generates is valid JSON. Using `json_schema`
      is preferred for models that support it.

      - `type BetaResponseFormatTextConfigText struct{…}`

        Default response format. Used to generate text responses.

        - `Type Text`

          The type of response format being defined. Always `text`.

          - `const TextText Text = "text"`

      - `type BetaResponseFormatTextJSONSchemaConfig struct{…}`

        JSON Schema response format. Used to generate structured JSON responses.
        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

        - `Name string`

          The name of the response format. Must be a-z, A-Z, 0-9, or contain
          underscores and dashes, with a maximum length of 64.

        - `Schema map[string, any]`

          The schema for the response format, described as a JSON Schema object.
          Learn how to build JSON schemas [here](https://json-schema.org/).

        - `Type JSONSchema`

          The type of response format being defined. Always `json_schema`.

          - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

        - `Description string`

          A description of what the response format is for, used by the model to
          determine how to respond in the format.

        - `Strict bool`

          Whether to enable strict schema adherence when generating the output.
          If set to true, the model will always follow the exact schema defined
          in the `schema` field. Only a subset of JSON Schema is supported when
          `strict` is `true`. To learn more, read the [Structured Outputs
          guide](https://platform.openai.com/docs/guides/structured-outputs).

      - `type BetaResponseFormatTextConfigJSONObject struct{…}`

        JSON object response format. An older method of generating JSON responses.
        Using `json_schema` is recommended for models that support it. Note that the
        model will not generate JSON without a system or user message instructing it
        to do so.

        - `Type JSONObject`

          The type of response format being defined. Always `json_object`.

          - `const JSONObjectJSONObject JSONObject = "json_object"`

    - `Verbosity string`

      Constrains the verbosity of the model's response. Lower values will result in
      more concise responses, while higher values will result in more verbose responses.
      Currently supported values are `low`, `medium`, and `high`. The default is
      `medium`.

      - `const BetaResponseInputTokenCountParamsTextVerbosityLow BetaResponseInputTokenCountParamsTextVerbosity = "low"`

      - `const BetaResponseInputTokenCountParamsTextVerbosityMedium BetaResponseInputTokenCountParamsTextVerbosity = "medium"`

      - `const BetaResponseInputTokenCountParamsTextVerbosityHigh BetaResponseInputTokenCountParamsTextVerbosity = "high"`

  - `ToolChoice param.Field[BetaResponseInputTokenCountParamsToolChoiceUnion]`

    Body param: Controls which tool the model should use, if any.

    - `type BetaToolChoiceOptions string`

      Controls which (if any) tool is called by the model.

      `none` means the model will not call any tool and instead generates a message.

      `auto` means the model can pick between generating a message or calling one or
      more tools.

      `required` means the model must call one or more tools.

      - `const BetaToolChoiceOptionsNone BetaToolChoiceOptions = "none"`

      - `const BetaToolChoiceOptionsAuto BetaToolChoiceOptions = "auto"`

      - `const BetaToolChoiceOptionsRequired BetaToolChoiceOptions = "required"`

    - `type BetaToolChoiceAllowed struct{…}`

      Constrains the tools available to the model to a pre-defined set.

      - `Mode BetaToolChoiceAllowedMode`

        Constrains the tools available to the model to a pre-defined set.

        `auto` allows the model to pick from among the allowed tools and generate a
        message.

        `required` requires the model to call one or more of the allowed tools.

        - `const BetaToolChoiceAllowedModeAuto BetaToolChoiceAllowedMode = "auto"`

        - `const BetaToolChoiceAllowedModeRequired BetaToolChoiceAllowedMode = "required"`

      - `Tools []map[string, any]`

        A list of tool definitions that the model should be allowed to call.

        For the Responses API, the list of tool definitions might look like:

        ```json
        [
          { "type": "function", "name": "get_weather" },
          { "type": "mcp", "server_label": "deepwiki" },
          { "type": "image_generation" }
        ]
        ```

      - `Type AllowedTools`

        Allowed tool configuration type. Always `allowed_tools`.

        - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

    - `type BetaToolChoiceTypes struct{…}`

      Indicates that the model should use a built-in tool to generate a response.
      [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools).

      - `Type BetaToolChoiceTypesType`

        The type of hosted tool the model should to use. Learn more about
        [built-in tools](https://platform.openai.com/docs/guides/tools).

        Allowed values are:

        - `file_search`
        - `web_search_preview`
        - `computer`
        - `computer_use_preview`
        - `computer_use`
        - `code_interpreter`
        - `image_generation`

        - `const BetaToolChoiceTypesTypeFileSearch BetaToolChoiceTypesType = "file_search"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview BetaToolChoiceTypesType = "web_search_preview"`

        - `const BetaToolChoiceTypesTypeComputer BetaToolChoiceTypesType = "computer"`

        - `const BetaToolChoiceTypesTypeComputerUsePreview BetaToolChoiceTypesType = "computer_use_preview"`

        - `const BetaToolChoiceTypesTypeComputerUse BetaToolChoiceTypesType = "computer_use"`

        - `const BetaToolChoiceTypesTypeWebSearchPreview2025_03_11 BetaToolChoiceTypesType = "web_search_preview_2025_03_11"`

        - `const BetaToolChoiceTypesTypeImageGeneration BetaToolChoiceTypesType = "image_generation"`

        - `const BetaToolChoiceTypesTypeCodeInterpreter BetaToolChoiceTypesType = "code_interpreter"`

    - `type BetaToolChoiceFunction struct{…}`

      Use this option to force the model to call a specific function.

      - `Name string`

        The name of the function to call.

      - `Type Function`

        For function calling, the type is always `function`.

        - `const FunctionFunction Function = "function"`

    - `type BetaToolChoiceMcp struct{…}`

      Use this option to force the model to call a specific tool on a remote MCP server.

      - `ServerLabel string`

        The label of the MCP server to use.

      - `Type Mcp`

        For MCP tools, the type is always `mcp`.

        - `const McpMcp Mcp = "mcp"`

      - `Name string`

        The name of the tool to call on the server.

    - `type BetaToolChoiceCustom struct{…}`

      Use this option to force the model to call a specific custom tool.

      - `Name string`

        The name of the custom tool to call.

      - `Type Custom`

        For custom tool calling, the type is always `custom`.

        - `const CustomCustom Custom = "custom"`

    - `type BetaResponseInputTokenCountParamsToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}`

      - `Type ProgrammaticToolCalling`

        The tool to call. Always `programmatic_tool_calling`.

        - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

    - `type BetaToolChoiceApplyPatch struct{…}`

      Forces the model to call the apply_patch tool when executing a tool call.

      - `Type ApplyPatch`

        The tool to call. Always `apply_patch`.

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `type BetaToolChoiceShell struct{…}`

      Forces the model to call the shell tool when a tool call is required.

      - `Type Shell`

        The tool to call. Always `shell`.

        - `const ShellShell Shell = "shell"`

  - `Tools param.Field[[]BetaToolUnion]`

    Body param: An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter.

    - `type BetaFunctionTool struct{…}`

      Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).

    - `type BetaFileSearchTool struct{…}`

      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).

    - `type BetaComputerTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaComputerUsePreviewTool struct{…}`

      A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).

    - `type BetaWebSearchTool struct{…}`

      Search the Internet for sources related to the prompt. Learn more about the
      [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaToolMcp struct{…}`

      Give the model access to additional tools via remote Model Context Protocol
      (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).

    - `type BetaToolCodeInterpreter struct{…}`

      A tool that runs Python code to help generate a response to a prompt.

    - `type BetaToolProgrammaticToolCalling struct{…}`

    - `type BetaToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

    - `type BetaToolLocalShell struct{…}`

      A tool that allows the model to execute shell commands in a local environment.

    - `type BetaFunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

    - `type BetaCustomTool struct{…}`

      A custom tool that processes input using a specified format. Learn more about   [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)

    - `type BetaNamespaceTool struct{…}`

      Groups function/custom tools under a shared namespace.

    - `type BetaToolSearchTool struct{…}`

      Hosted or BYOT tool search configuration for deferred tools.

    - `type BetaWebSearchPreviewTool struct{…}`

      This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).

    - `type BetaApplyPatchTool struct{…}`

      Allows the assistant to create, delete, or update files using unified diffs.

  - `Truncation param.Field[BetaResponseInputTokenCountParamsTruncation]`

    Body param: The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.

    - `const BetaResponseInputTokenCountParamsTruncationAuto BetaResponseInputTokenCountParamsTruncation = "auto"`

    - `const BetaResponseInputTokenCountParamsTruncationDisabled BetaResponseInputTokenCountParamsTruncation = "disabled"`

  - `Betas param.Field[[]string]`

    Header param: Optional beta features to enable for this request.

    - `const BetaResponseInputTokenCountParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseInputTokenCountParamsOpenAIBeta = "responses_multi_agent=v1"`

### Returns

- `type BetaResponseInputTokenCountResponse struct{…}`

  - `InputTokens int64`

  - `Object ResponseInputTokens`

    - `const ResponseInputTokensResponseInputTokens ResponseInputTokens = "response.input_tokens"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Responses.InputTokens.Count(context.TODO(), openai.BetaResponseInputTokenCountParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.InputTokens)
}
```

#### Response

```json
{
  "input_tokens": 123,
  "object": "response.input_tokens"
}
```

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/responses"
)

func main() {
  client := openai.NewClient()
  response, err := client.Responses.InputTokens.Count(context.TODO(), responses.InputTokenCountParams{
    Model: "gpt-5",
    Input: "Tell me a joke.",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.InputTokens)
}
```

#### Response

```json
{
  "object": "response.input_tokens",
  "input_tokens": 11
}
```
