# Responses

## Run OpenAI Responses API (OpenAI only)

`client.Responses.New(ctx, body) (*ResponseNewResponseUnion, error)`

**post** `/v5/responses`

Runs inference using the OpenAI Responses API contract, taking an `input` rather than a chat `messages` array.

This endpoint is restricted to OpenAI-vendor models: requests whose `model` (`vendor/name`) resolves
to any other vendor are rejected with an unsupported-vendor error, unlike /v5/chat/completions and
/v5/inference which support many vendors. Use it when you specifically need Responses API features
such as `previous_response_id` chaining, `instructions`, or `store`; use /v5/chat/completions for the
standard messages-based chat contract. When `stream` is set the response streams as server-sent
events; otherwise a single `response` object is returned.

### Parameters

- `body ResponseNewParams`

  - `Input param.Field[ResponseNewParamsInputUnion]`

    - `string`

    - `type ResponseNewParamsInputInputItems []ResponseNewParamsInputInputItemUnion`

      - `type ResponseNewParamsInputInputItemEasyInputMessageParam 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 ResponseNewParamsInputInputItemEasyInputMessageParamContentUnion`

          - `string`

          - `type ResponseNewParamsInputInputItemEasyInputMessageParamContentInputItems []ResponseNewParamsInputInputItemEasyInputMessageParamContentInputItemUnion`

            - `type OpenAIResponseInputTextParamResp struct{…}`

              A text input to the model.

              - `Text string`

              - `Type InputText`

                - `const InputTextInputText InputText = "input_text"`

            - `type OpenAIResponseInputImageParamResp struct{…}`

              An image input to the model.

              Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail OpenAIResponseInputImageParamDetail`

                - `const OpenAIResponseInputImageParamDetailLow OpenAIResponseInputImageParamDetail = "low"`

                - `const OpenAIResponseInputImageParamDetailHigh OpenAIResponseInputImageParamDetail = "high"`

                - `const OpenAIResponseInputImageParamDetailAuto OpenAIResponseInputImageParamDetail = "auto"`

              - `Type InputImage`

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

              - `ImageURL string`

            - `type OpenAIResponseInputFileParamResp struct{…}`

              A file input to the model.

              - `Type InputFile`

                - `const InputFileInputFile InputFile = "input_file"`

              - `FileData string`

              - `FileID string`

              - `FileURL string`

              - `Filename string`

        - `Role string`

          - `const ResponseNewParamsInputInputItemEasyInputMessageParamRoleUser ResponseNewParamsInputInputItemEasyInputMessageParamRole = "user"`

          - `const ResponseNewParamsInputInputItemEasyInputMessageParamRoleAssistant ResponseNewParamsInputInputItemEasyInputMessageParamRole = "assistant"`

          - `const ResponseNewParamsInputInputItemEasyInputMessageParamRoleSystem ResponseNewParamsInputInputItemEasyInputMessageParamRole = "system"`

          - `const ResponseNewParamsInputInputItemEasyInputMessageParamRoleDeveloper ResponseNewParamsInputInputItemEasyInputMessageParamRole = "developer"`

        - `Phase string`

          - `const ResponseNewParamsInputInputItemEasyInputMessageParamPhaseCommentary ResponseNewParamsInputInputItemEasyInputMessageParamPhase = "commentary"`

          - `const ResponseNewParamsInputInputItemEasyInputMessageParamPhaseFinalAnswer ResponseNewParamsInputInputItemEasyInputMessageParamPhase = "final_answer"`

        - `Type string`

          - `const ResponseNewParamsInputInputItemEasyInputMessageParamTypeMessage ResponseNewParamsInputInputItemEasyInputMessageParamType = "message"`

      - `type ResponseNewParamsInputInputItemMessage 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 []ResponseNewParamsInputInputItemMessageContentUnion`

          - `type OpenAIResponseInputTextParamResp struct{…}`

            A text input to the model.

          - `type OpenAIResponseInputImageParamResp struct{…}`

            An image input to the model.

            Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type OpenAIResponseInputFileParamResp struct{…}`

            A file input to the model.

        - `Role string`

          - `const ResponseNewParamsInputInputItemMessageRoleUser ResponseNewParamsInputInputItemMessageRole = "user"`

          - `const ResponseNewParamsInputInputItemMessageRoleSystem ResponseNewParamsInputInputItemMessageRole = "system"`

          - `const ResponseNewParamsInputInputItemMessageRoleDeveloper ResponseNewParamsInputInputItemMessageRole = "developer"`

        - `Status string`

          - `const ResponseNewParamsInputInputItemMessageStatusInProgress ResponseNewParamsInputInputItemMessageStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemMessageStatusCompleted ResponseNewParamsInputInputItemMessageStatus = "completed"`

          - `const ResponseNewParamsInputInputItemMessageStatusIncomplete ResponseNewParamsInputInputItemMessageStatus = "incomplete"`

        - `Type string`

          - `const ResponseNewParamsInputInputItemMessageTypeMessage ResponseNewParamsInputInputItemMessageType = "message"`

      - `type ResponseNewParamsInputInputItemResponseOutputMessageParam struct{…}`

        An output message from the model.

        - `ID string`

        - `Content []ResponseNewParamsInputInputItemResponseOutputMessageParamContentUnion`

          - `type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParam struct{…}`

            A text output from the model.

            - `Annotations []ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationUnion`

              - `type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationFileCitation struct{…}`

                A citation to a file.

                - `FileID string`

                - `Filename string`

                - `Index int64`

                - `Type FileCitation`

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationURLCitation struct{…}`

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

                - `EndIndex int64`

                - `StartIndex int64`

                - `Title string`

                - `Type URLCitation`

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

              - `type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationContainerFileCitation struct{…}`

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

                - `ContainerID string`

                - `EndIndex int64`

                - `FileID string`

                - `Filename string`

                - `StartIndex int64`

                - `Type ContainerFileCitation`

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

              - `type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationFilePath struct{…}`

                A path to a file.

                - `FileID string`

                - `Index int64`

                - `Type FilePath`

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

            - `Type OutputText`

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamLogprob`

              - `Token string`

              - `Bytes []int64`

              - `Logprob float64`

              - `TopLogprobs []ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamLogprobTopLogprob`

                - `Token string`

                - `Bytes []int64`

                - `Logprob float64`

          - `type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputRefusalParam struct{…}`

            A refusal from the model.

            - `Refusal string`

            - `Type Refusal`

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status string`

          - `const ResponseNewParamsInputInputItemResponseOutputMessageParamStatusInProgress ResponseNewParamsInputInputItemResponseOutputMessageParamStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemResponseOutputMessageParamStatusCompleted ResponseNewParamsInputInputItemResponseOutputMessageParamStatus = "completed"`

          - `const ResponseNewParamsInputInputItemResponseOutputMessageParamStatusIncomplete ResponseNewParamsInputInputItemResponseOutputMessageParamStatus = "incomplete"`

        - `Type Message`

          - `const MessageMessage Message = "message"`

        - `Phase string`

          - `const ResponseNewParamsInputInputItemResponseOutputMessageParamPhaseCommentary ResponseNewParamsInputInputItemResponseOutputMessageParamPhase = "commentary"`

          - `const ResponseNewParamsInputInputItemResponseOutputMessageParamPhaseFinalAnswer ResponseNewParamsInputInputItemResponseOutputMessageParamPhase = "final_answer"`

      - `type ResponseNewParamsInputInputItemResponseFileSearchToolCallParam 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`

        - `Queries []string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusSearching ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "searching"`

          - `const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "completed"`

          - `const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "incomplete"`

          - `const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusFailed ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "failed"`

        - `Type FileSearchCall`

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Results []ResponseNewParamsInputInputItemResponseFileSearchToolCallParamResult`

          - `Attributes map[string, ResponseNewParamsInputInputItemResponseFileSearchToolCallParamResultAttributeUnion]`

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

          - `Filename string`

          - `Score float64`

          - `Text string`

      - `type ResponseNewParamsInputInputItemResponseComputerToolCallParam 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`

        - `Action ResponseNewParamsInputInputItemResponseComputerToolCallParamActionUnion`

          A click action.

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClick struct{…}`

            A click action.

            - `Button string`

              - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonLeft ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "left"`

              - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonRight ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "right"`

              - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonWheel ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "wheel"`

              - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonBack ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "back"`

              - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonForward ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "forward"`

            - `Type Click`

              - `const ClickClick Click = "click"`

            - `X int64`

            - `Y int64`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionDoubleClick struct{…}`

            A double click action.

            - `Type DoubleClick`

              - `const DoubleClickDoubleClick DoubleClick = "double_click"`

            - `X int64`

            - `Y int64`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionDrag struct{…}`

            A drag action.

            - `Path []ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionDragPath`

              - `X int64`

              - `Y int64`

            - `Type Drag`

              - `const DragDrag Drag = "drag"`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

            - `Keys []string`

            - `Type Keypress`

              - `const KeypressKeypress Keypress = "keypress"`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionMove struct{…}`

            A mouse move action.

            - `Type Move`

              - `const MoveMove Move = "move"`

            - `X int64`

            - `Y int64`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionScreenshot struct{…}`

            A screenshot action.

            - `Type Screenshot`

              - `const ScreenshotScreenshot Screenshot = "screenshot"`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionScroll struct{…}`

            A scroll action.

            - `ScrollX int64`

            - `ScrollY int64`

            - `Type Scroll`

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

            - `Y int64`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionType struct{…}`

            An action to type in text.

            - `Text string`

            - `Type Type`

              - `const TypeType Type = "type"`

          - `type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionWait struct{…}`

            A wait action.

            - `Type Wait`

              - `const WaitWait Wait = "wait"`

        - `CallID string`

        - `PendingSafetyChecks []ResponseNewParamsInputInputItemResponseComputerToolCallParamPendingSafetyCheck`

          - `ID string`

          - `Code string`

          - `Message string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseComputerToolCallParamStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseComputerToolCallParamStatus = "completed"`

          - `const ResponseNewParamsInputInputItemResponseComputerToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseComputerToolCallParamStatus = "incomplete"`

        - `Type ComputerCall`

          - `const ComputerCallComputerCall ComputerCall = "computer_call"`

      - `type ResponseNewParamsInputInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

        - `Output ResponseNewParamsInputInputItemComputerCallOutputOutput`

          A computer screenshot image used with the computer use tool.

          - `Type ComputerScreenshot`

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

          - `ImageURL string`

        - `Type ComputerCallOutput`

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

        - `AcknowledgedSafetyChecks []ResponseNewParamsInputInputItemComputerCallOutputAcknowledgedSafetyCheck`

          - `ID string`

          - `Code string`

          - `Message string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemComputerCallOutputStatusInProgress ResponseNewParamsInputInputItemComputerCallOutputStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemComputerCallOutputStatusCompleted ResponseNewParamsInputInputItemComputerCallOutputStatus = "completed"`

          - `const ResponseNewParamsInputInputItemComputerCallOutputStatusIncomplete ResponseNewParamsInputInputItemComputerCallOutputStatus = "incomplete"`

      - `type ResponseNewParamsInputInputItemResponseFunctionWebSearchParam 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`

        - `Action ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionUnion`

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

          - `type ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionSearch struct{…}`

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

            - `Query string`

            - `Type Search`

              - `const SearchSearch Search = "search"`

            - `Queries []string`

            - `Sources []ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionSearchSource`

              - `Type URL`

                - `const URLURL URL = "url"`

              - `URL string`

          - `type ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionOpenPage struct{…}`

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

            - `Type OpenPage`

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

          - `type ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionFind struct{…}`

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

            - `Pattern string`

            - `Type FindInPage`

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusInProgress ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusSearching ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "searching"`

          - `const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusCompleted ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "completed"`

          - `const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusFailed ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "failed"`

        - `Type WebSearchCall`

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `type ResponseNewParamsInputInputItemResponseFunctionToolCallParam 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`

        - `CallID string`

        - `Name string`

        - `Type FunctionCall`

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatus = "completed"`

          - `const ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatus = "incomplete"`

      - `type ResponseNewParamsInputInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

        - `Output ResponseNewParamsInputInputItemFunctionCallOutputOutputUnion`

          - `string`

          - `type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentList []ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemUnion`

            - `type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContentParam struct{…}`

              A text input to the model.

              - `Text string`

              - `Type InputText`

                - `const InputTextInputText InputText = "input_text"`

            - `type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParam struct{…}`

              An image input to the model.

              Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail string`

                - `const ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetailLow ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetail = "low"`

                - `const ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetailHigh ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetail = "high"`

                - `const ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetailAuto ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetail = "auto"`

              - `FileID string`

              - `ImageURL string`

            - `type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContentParam struct{…}`

              A file input to the model.

              - `Type InputFile`

                - `const InputFileInputFile InputFile = "input_file"`

              - `FileData string`

              - `FileID string`

              - `FileURL string`

              - `Filename string`

        - `Type FunctionCallOutput`

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemFunctionCallOutputStatusInProgress ResponseNewParamsInputInputItemFunctionCallOutputStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemFunctionCallOutputStatusCompleted ResponseNewParamsInputInputItemFunctionCallOutputStatus = "completed"`

          - `const ResponseNewParamsInputInputItemFunctionCallOutputStatusIncomplete ResponseNewParamsInputInputItemFunctionCallOutputStatus = "incomplete"`

      - `type ResponseNewParamsInputInputItemResponseReasoningItemParam 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`

        - `Summary []ResponseNewParamsInputInputItemResponseReasoningItemParamSummary`

          - `Text string`

          - `Type SummaryText`

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Content []ResponseNewParamsInputInputItemResponseReasoningItemParamContent`

          - `Text string`

          - `Type ReasoningText`

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemResponseReasoningItemParamStatusInProgress ResponseNewParamsInputInputItemResponseReasoningItemParamStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemResponseReasoningItemParamStatusCompleted ResponseNewParamsInputInputItemResponseReasoningItemParamStatus = "completed"`

          - `const ResponseNewParamsInputInputItemResponseReasoningItemParamStatusIncomplete ResponseNewParamsInputInputItemResponseReasoningItemParamStatus = "incomplete"`

      - `type ResponseNewParamsInputInputItemResponseCompactionItemParamParam struct{…}`

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

        - `EncryptedContent string`

        - `Type Compaction`

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

      - `type ResponseNewParamsInputInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

        - `Result string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemImageGenerationCallStatusInProgress ResponseNewParamsInputInputItemImageGenerationCallStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemImageGenerationCallStatusCompleted ResponseNewParamsInputInputItemImageGenerationCallStatus = "completed"`

          - `const ResponseNewParamsInputInputItemImageGenerationCallStatusGenerating ResponseNewParamsInputInputItemImageGenerationCallStatus = "generating"`

          - `const ResponseNewParamsInputInputItemImageGenerationCallStatusFailed ResponseNewParamsInputInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `type ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParam struct{…}`

        A tool call to run code.

        - `ID string`

        - `Code string`

        - `ContainerID string`

        - `Outputs []ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamOutputUnion`

          - `type ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamOutputOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

            - `Type Logs`

              - `const LogsLogs Logs = "logs"`

          - `type ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamOutputOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              - `const ImageImage Image = "image"`

            - `URL string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "completed"`

          - `const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "incomplete"`

          - `const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusInterpreting ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "interpreting"`

          - `const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusFailed ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "failed"`

        - `Type CodeInterpreterCall`

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `type ResponseNewParamsInputInputItemLocalShellCall struct{…}`

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

        - `ID string`

        - `Action ResponseNewParamsInputInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

          - `Env map[string, string]`

          - `Type Exec`

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

          - `User string`

          - `WorkingDirectory string`

        - `CallID string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemLocalShellCallStatusInProgress ResponseNewParamsInputInputItemLocalShellCallStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemLocalShellCallStatusCompleted ResponseNewParamsInputInputItemLocalShellCallStatus = "completed"`

          - `const ResponseNewParamsInputInputItemLocalShellCallStatusIncomplete ResponseNewParamsInputInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `type ResponseNewParamsInputInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

        - `Output string`

        - `Type LocalShellCallOutput`

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Status string`

          - `const ResponseNewParamsInputInputItemLocalShellCallOutputStatusInProgress ResponseNewParamsInputInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemLocalShellCallOutputStatusCompleted ResponseNewParamsInputInputItemLocalShellCallOutputStatus = "completed"`

          - `const ResponseNewParamsInputInputItemLocalShellCallOutputStatusIncomplete ResponseNewParamsInputInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type ResponseNewParamsInputInputItemShellCall struct{…}`

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

        - `Action ResponseNewParamsInputInputItemShellCallAction`

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

          - `Commands []string`

          - `MaxOutputLength int64`

          - `TimeoutMs int64`

        - `CallID string`

        - `Type ShellCall`

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

        - `Environment ResponseNewParamsInputInputItemShellCallEnvironmentUnion`

          - `type LocalEnvironmentParamResp struct{…}`

            - `Type Local`

              - `const LocalLocal Local = "local"`

            - `Skills []LocalEnvironmentParamSkillResp`

              - `Description string`

              - `Name string`

              - `Path string`

          - `type ContainerReferenceParamResp struct{…}`

            - `ContainerID string`

            - `Type ContainerReference`

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

        - `Status string`

          - `const ResponseNewParamsInputInputItemShellCallStatusInProgress ResponseNewParamsInputInputItemShellCallStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemShellCallStatusCompleted ResponseNewParamsInputInputItemShellCallStatus = "completed"`

          - `const ResponseNewParamsInputInputItemShellCallStatusIncomplete ResponseNewParamsInputInputItemShellCallStatus = "incomplete"`

      - `type ResponseNewParamsInputInputItemShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

        - `Output []ResponseNewParamsInputInputItemShellCallOutputOutput`

          - `Outcome ResponseNewParamsInputInputItemShellCallOutputOutputOutcomeUnion`

            Indicates that the shell call exceeded its configured time limit.

            - `type ResponseNewParamsInputInputItemShellCallOutputOutputOutcomeOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type ResponseNewParamsInputInputItemShellCallOutputOutputOutcomeOutcomeExit struct{…}`

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

              - `ExitCode int64`

              - `Type Exit`

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

          - `Stdout string`

        - `Type ShellCallOutput`

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

        - `MaxOutputLength int64`

        - `Status string`

          - `const ResponseNewParamsInputInputItemShellCallOutputStatusInProgress ResponseNewParamsInputInputItemShellCallOutputStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemShellCallOutputStatusCompleted ResponseNewParamsInputInputItemShellCallOutputStatus = "completed"`

          - `const ResponseNewParamsInputInputItemShellCallOutputStatusIncomplete ResponseNewParamsInputInputItemShellCallOutputStatus = "incomplete"`

      - `type ResponseNewParamsInputInputItemApplyPatchCall struct{…}`

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

        - `CallID string`

        - `Operation ResponseNewParamsInputInputItemApplyPatchCallOperationUnion`

          Instruction for creating a new file via the apply_patch tool.

          - `type ResponseNewParamsInputInputItemApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

            - `Path string`

            - `Type CreateFile`

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type ResponseNewParamsInputInputItemApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

            - `Type DeleteFile`

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type ResponseNewParamsInputInputItemApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

            - `Path string`

            - `Type UpdateFile`

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status string`

          - `const ResponseNewParamsInputInputItemApplyPatchCallStatusInProgress ResponseNewParamsInputInputItemApplyPatchCallStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemApplyPatchCallStatusCompleted ResponseNewParamsInputInputItemApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

      - `type ResponseNewParamsInputInputItemApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemApplyPatchCallOutputStatusCompleted ResponseNewParamsInputInputItemApplyPatchCallOutputStatus = "completed"`

          - `const ResponseNewParamsInputInputItemApplyPatchCallOutputStatusFailed ResponseNewParamsInputInputItemApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

        - `Output string`

      - `type ResponseNewParamsInputInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

        - `ServerLabel string`

        - `Tools []ResponseNewParamsInputInputItemMcpListToolsTool`

          - `InputSchema any`

          - `Name string`

          - `Annotations any`

          - `Description string`

        - `Type McpListTools`

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Error string`

      - `type McpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

        - `Arguments string`

        - `Name string`

        - `ServerLabel string`

        - `Type McpApprovalRequest`

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `type ResponseNewParamsInputInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

        - `Approve bool`

        - `Type McpApprovalResponse`

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

        - `Reason string`

      - `type ResponseNewParamsInputInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

        - `Arguments string`

        - `Name string`

        - `ServerLabel string`

        - `Type McpCall`

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `ApprovalRequestID string`

        - `Error string`

        - `Output string`

        - `Status string`

          - `const ResponseNewParamsInputInputItemMcpCallStatusInProgress ResponseNewParamsInputInputItemMcpCallStatus = "in_progress"`

          - `const ResponseNewParamsInputInputItemMcpCallStatusCompleted ResponseNewParamsInputInputItemMcpCallStatus = "completed"`

          - `const ResponseNewParamsInputInputItemMcpCallStatusIncomplete ResponseNewParamsInputInputItemMcpCallStatus = "incomplete"`

          - `const ResponseNewParamsInputInputItemMcpCallStatusCalling ResponseNewParamsInputInputItemMcpCallStatus = "calling"`

          - `const ResponseNewParamsInputInputItemMcpCallStatusFailed ResponseNewParamsInputInputItemMcpCallStatus = "failed"`

      - `type ResponseNewParamsInputInputItemResponseCustomToolCallOutputParam struct{…}`

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

        - `CallID string`

        - `Output ResponseNewParamsInputInputItemResponseCustomToolCallOutputParamOutputUnion`

          - `string`

          - `type ResponseNewParamsInputInputItemResponseCustomToolCallOutputParamOutputOutputContentList []ResponseNewParamsInputInputItemResponseCustomToolCallOutputParamOutputOutputContentListItemUnion`

            - `type OpenAIResponseInputTextParamResp struct{…}`

              A text input to the model.

            - `type OpenAIResponseInputImageParamResp struct{…}`

              An image input to the model.

              Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type OpenAIResponseInputFileParamResp struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

      - `type ResponseNewParamsInputInputItemResponseCustomToolCallParam struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

        - `Input string`

        - `Name string`

        - `Type CustomToolCall`

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

      - `type ResponseNewParamsInputInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

        - `Type string`

          - `const ResponseNewParamsInputInputItemItemReferenceTypeItemReference ResponseNewParamsInputInputItemItemReferenceType = "item_reference"`

  - `Model param.Field[string]`

    model specified as `model_vendor/model`, for example `openai/gpt-4o`

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

    Which fields to include in the response

  - `Instructions param.Field[string]`

    Instructions for the response generation

  - `MaxOutputTokens param.Field[int64]`

    Maximum number of output tokens

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

    Metadata for the response

  - `ParallelToolCalls param.Field[bool]`

    Whether to enable parallel tool calls

  - `PreviousResponseID param.Field[string]`

    ID of the previous response for chaining

  - `Reasoning param.Field[map[string, any]]`

    Reasoning configuration for the response

  - `Store param.Field[bool]`

    Whether to store the response

  - `Stream param.Field[bool]`

    Whether to stream the response

  - `Temperature param.Field[float64]`

    Sampling temperature for randomness control

  - `Text param.Field[map[string, any]]`

    Text configuration parameters

  - `ToolChoice param.Field[ResponseNewParamsToolChoiceUnion]`

    Tool choice configuration

    - `string`

    - `type ResponseNewParamsToolChoiceMap map[string, any]`

  - `Tools param.Field[[]map[string, any]]`

    Tools available for the response

  - `TopP param.Field[float64]`

    Top-p sampling parameter

  - `Truncation param.Field[ResponseNewParamsTruncation]`

    Truncation configuration

    - `const ResponseNewParamsTruncationAuto ResponseNewParamsTruncation = "auto"`

    - `const ResponseNewParamsTruncationDisabled ResponseNewParamsTruncation = "disabled"`

### Returns

- `type ResponseNewResponseUnion interface{…}`

  Emitted when there is a partial audio response.

  - `type OpenAIResponse struct{…}`

    - `ID string`

    - `CreatedAt float64`

    - `Model OpenAIResponseModel`

      - `type OpenAIResponseModel string`

        - `const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"`

        - `const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"`

        - `const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"`

        - `const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"`

        - `const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"`

        - `const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"`

        - `const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"`

        - `const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"`

        - `const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"`

        - `const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"`

        - `const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"`

        - `const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"`

        - `const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"`

        - `const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"`

        - `const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"`

        - `const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"`

        - `const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"`

        - `const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"`

        - `const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"`

        - `const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"`

        - `const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"`

        - `const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"`

        - `const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"`

        - `const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"`

        - `const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"`

        - `const OpenAIResponseModelO3 OpenAIResponseModel = "o3"`

        - `const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"`

        - `const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"`

        - `const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"`

        - `const OpenAIResponseModelO1 OpenAIResponseModel = "o1"`

        - `const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"`

        - `const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"`

        - `const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"`

        - `const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"`

        - `const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"`

        - `const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"`

        - `const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"`

        - `const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"`

        - `const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"`

        - `const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"`

        - `const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"`

        - `const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"`

        - `const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"`

        - `const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"`

        - `const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

        - `const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"`

        - `const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"`

        - `const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"`

        - `const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

        - `const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"`

        - `const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"`

        - `const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"`

        - `const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"`

        - `const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"`

        - `const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"`

        - `const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"`

        - `const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"`

        - `const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"`

        - `const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"`

        - `const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"`

        - `const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"`

        - `const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"`

        - `const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"`

        - `const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"`

        - `const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"`

        - `const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"`

        - `const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"`

        - `const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"`

        - `const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"`

        - `const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"`

        - `const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"`

        - `const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"`

        - `const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"`

        - `const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"`

        - `const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"`

        - `const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"`

        - `const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"`

        - `const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"`

        - `const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"`

        - `const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"`

        - `const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"`

        - `const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"`

        - `const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"`

        - `const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"`

        - `const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"`

        - `const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"`

      - `string`

    - `Object Response`

      - `const ResponseResponse Response = "response"`

    - `Output []OpenAIResponseOutputUnion`

      - `type OpenAIResponseOutputMessage struct{…}`

        An output message from the model.

        - `ID string`

        - `Content []OpenAIResponseOutputMessageContentUnion`

          - `type OpenAIResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []OpenAIResponseOutputTextAnnotationUnion`

              - `type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}`

                A citation to a file.

                - `FileID string`

                - `Filename string`

                - `Index int64`

                - `Type FileCitation`

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}`

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

                - `EndIndex int64`

                - `StartIndex int64`

                - `Title string`

                - `Type URLCitation`

                  - `const URLCitationURLCitation URLCitation = "url_citation"`

                - `URL string`

              - `type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}`

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

                - `ContainerID string`

                - `EndIndex int64`

                - `FileID string`

                - `Filename string`

                - `StartIndex int64`

                - `Type ContainerFileCitation`

                  - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

              - `type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}`

                A path to a file.

                - `FileID string`

                - `Index int64`

                - `Type FilePath`

                  - `const FilePathFilePath FilePath = "file_path"`

            - `Text string`

            - `Type OutputText`

              - `const OutputTextOutputText OutputText = "output_text"`

            - `Logprobs []OpenAIResponseOutputTextLogprob`

              - `Token string`

              - `Bytes []int64`

              - `Logprob float64`

              - `TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob`

                - `Token string`

                - `Bytes []int64`

                - `Logprob float64`

          - `type OpenAIResponseOutputRefusal struct{…}`

            A refusal from the model.

            - `Refusal string`

            - `Type Refusal`

              - `const RefusalRefusal Refusal = "refusal"`

        - `Role Assistant`

          - `const AssistantAssistant Assistant = "assistant"`

        - `Status OpenAIResponseOutputMessageStatus`

          - `const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"`

          - `const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"`

          - `const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          - `const MessageMessage Message = "message"`

        - `Phase OpenAIResponseOutputMessagePhase`

          - `const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"`

          - `const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"`

      - `type OpenAIResponseFileSearchToolCall 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`

        - `Queries []string`

        - `Status OpenAIResponseFileSearchToolCallStatus`

          - `const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"`

          - `const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"`

          - `const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"`

          - `const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"`

          - `const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"`

        - `Type FileSearchCall`

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Results []OpenAIResponseFileSearchToolCallResult`

          - `Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]`

            - `string`

            - `float64`

            - `bool`

          - `FileID string`

          - `Filename string`

          - `Score float64`

          - `Text string`

      - `type OpenAIResponseFunctionToolCall 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`

        - `CallID string`

        - `Name string`

        - `Type FunctionCall`

          - `const FunctionCallFunctionCall FunctionCall = "function_call"`

        - `ID string`

        - `Status OpenAIResponseFunctionToolCallStatus`

          - `const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"`

          - `const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"`

          - `const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"`

      - `type OpenAIResponseFunctionWebSearch 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`

        - `Action OpenAIResponseFunctionWebSearchActionUnion`

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

          - `type OpenAIResponseFunctionWebSearchActionActionSearch struct{…}`

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

            - `Query string`

            - `Type Search`

              - `const SearchSearch Search = "search"`

            - `Queries []string`

            - `Sources []OpenAIResponseFunctionWebSearchActionActionSearchSource`

              - `Type URL`

                - `const URLURL URL = "url"`

              - `URL string`

          - `type OpenAIResponseFunctionWebSearchActionActionOpenPage struct{…}`

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

            - `Type OpenPage`

              - `const OpenPageOpenPage OpenPage = "open_page"`

            - `URL string`

          - `type OpenAIResponseFunctionWebSearchActionActionFind struct{…}`

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

            - `Pattern string`

            - `Type FindInPage`

              - `const FindInPageFindInPage FindInPage = "find_in_page"`

            - `URL string`

        - `Status OpenAIResponseFunctionWebSearchStatus`

          - `const OpenAIResponseFunctionWebSearchStatusInProgress OpenAIResponseFunctionWebSearchStatus = "in_progress"`

          - `const OpenAIResponseFunctionWebSearchStatusSearching OpenAIResponseFunctionWebSearchStatus = "searching"`

          - `const OpenAIResponseFunctionWebSearchStatusCompleted OpenAIResponseFunctionWebSearchStatus = "completed"`

          - `const OpenAIResponseFunctionWebSearchStatusFailed OpenAIResponseFunctionWebSearchStatus = "failed"`

        - `Type WebSearchCall`

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `type OpenAIResponseComputerToolCall 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`

        - `Action OpenAIResponseComputerToolCallActionUnion`

          A click action.

          - `type OpenAIResponseComputerToolCallActionActionClick struct{…}`

            A click action.

            - `Button string`

              - `const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"`

              - `const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"`

              - `const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"`

              - `const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"`

              - `const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"`

            - `Type Click`

              - `const ClickClick Click = "click"`

            - `X int64`

            - `Y int64`

          - `type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}`

            A double click action.

            - `Type DoubleClick`

              - `const DoubleClickDoubleClick DoubleClick = "double_click"`

            - `X int64`

            - `Y int64`

          - `type OpenAIResponseComputerToolCallActionActionDrag struct{…}`

            A drag action.

            - `Path []OpenAIResponseComputerToolCallActionActionDragPath`

              - `X int64`

              - `Y int64`

            - `Type Drag`

              - `const DragDrag Drag = "drag"`

          - `type OpenAIResponseComputerToolCallActionActionKeypress struct{…}`

            A collection of keypresses the model would like to perform.

            - `Keys []string`

            - `Type Keypress`

              - `const KeypressKeypress Keypress = "keypress"`

          - `type OpenAIResponseComputerToolCallActionActionMove struct{…}`

            A mouse move action.

            - `Type Move`

              - `const MoveMove Move = "move"`

            - `X int64`

            - `Y int64`

          - `type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}`

            A screenshot action.

            - `Type Screenshot`

              - `const ScreenshotScreenshot Screenshot = "screenshot"`

          - `type OpenAIResponseComputerToolCallActionActionScroll struct{…}`

            A scroll action.

            - `ScrollX int64`

            - `ScrollY int64`

            - `Type Scroll`

              - `const ScrollScroll Scroll = "scroll"`

            - `X int64`

            - `Y int64`

          - `type OpenAIResponseComputerToolCallActionActionType struct{…}`

            An action to type in text.

            - `Text string`

            - `Type Type`

              - `const TypeType Type = "type"`

          - `type OpenAIResponseComputerToolCallActionActionWait struct{…}`

            A wait action.

            - `Type Wait`

              - `const WaitWait Wait = "wait"`

        - `CallID string`

        - `PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck`

          - `ID string`

          - `Code string`

          - `Message string`

        - `Status OpenAIResponseComputerToolCallStatus`

          - `const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"`

          - `const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"`

          - `const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"`

        - `Type ComputerCall`

          - `const ComputerCallComputerCall ComputerCall = "computer_call"`

      - `type OpenAIResponseReasoningItem 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`

        - `Summary []OpenAIResponseReasoningItemSummary`

          - `Text string`

          - `Type SummaryText`

            - `const SummaryTextSummaryText SummaryText = "summary_text"`

        - `Type Reasoning`

          - `const ReasoningReasoning Reasoning = "reasoning"`

        - `Content []OpenAIResponseReasoningItemContent`

          - `Text string`

          - `Type ReasoningText`

            - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

        - `EncryptedContent string`

        - `Status OpenAIResponseReasoningItemStatus`

          - `const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"`

          - `const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"`

          - `const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"`

      - `type ResponseCompactionItem struct{…}`

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

        - `ID string`

        - `EncryptedContent string`

        - `Type Compaction`

          - `const CompactionCompaction Compaction = "compaction"`

        - `CreatedBy string`

      - `type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

        - `Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus`

          - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"`

          - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"`

          - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Result string`

      - `type OpenAIResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

        - `ID string`

        - `ContainerID string`

        - `Status OpenAIResponseCodeInterpreterToolCallStatus`

          - `const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"`

          - `const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

        - `Code string`

        - `Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnion`

          - `type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}`

            The logs output from the code interpreter.

            - `Logs string`

            - `Type Logs`

              - `const LogsLogs Logs = "logs"`

          - `type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}`

            The image output from the code interpreter.

            - `Type Image`

              - `const ImageImage Image = "image"`

            - `URL string`

      - `type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}`

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

        - `ID string`

        - `Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

          - `Env map[string, string]`

          - `Type Exec`

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

          - `User string`

          - `WorkingDirectory string`

        - `CallID string`

        - `Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus`

          - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"`

          - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `type ResponseFunctionShellToolCall struct{…}`

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

        - `ID string`

        - `Action ResponseFunctionShellToolCallAction`

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

          - `Commands []string`

          - `MaxOutputLength int64`

          - `TimeoutMs int64`

        - `CallID string`

        - `Status ResponseFunctionShellToolCallStatus`

          - `const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"`

          - `const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"`

          - `const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"`

        - `Type ShellCall`

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `CreatedBy string`

        - `Environment ResponseFunctionShellToolCallEnvironmentUnion`

          Represents the use of a local environment to perform shell actions.

          - `type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}`

            Represents the use of a local environment to perform shell actions.

            - `Type Local`

              - `const LocalLocal Local = "local"`

          - `type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}`

            Represents a container created with /v1/containers.

            - `ContainerID string`

            - `Type ContainerReference`

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `type ResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

        - `ID string`

        - `CallID string`

        - `Output []ResponseFunctionShellToolCallOutputOutput`

          - `Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion`

            Indicates that the shell call exceeded its configured time limit.

            - `type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}`

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

              - `ExitCode int64`

              - `Type Exit`

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

          - `Stdout string`

          - `CreatedBy string`

        - `Status ResponseFunctionShellToolCallOutputStatus`

          - `const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"`

          - `const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"`

          - `const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"`

        - `Type ShellCallOutput`

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `CreatedBy string`

        - `MaxOutputLength int64`

      - `type ResponseApplyPatchToolCall struct{…}`

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

        - `ID string`

        - `CallID string`

        - `Operation ResponseApplyPatchToolCallOperationUnion`

          Instruction describing how to create a file via the apply_patch tool.

          - `type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}`

            Instruction describing how to create a file via the apply_patch tool.

            - `Diff string`

            - `Path string`

            - `Type CreateFile`

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}`

            Instruction describing how to delete a file via the apply_patch tool.

            - `Path string`

            - `Type DeleteFile`

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}`

            Instruction describing how to update a file via the apply_patch tool.

            - `Diff string`

            - `Path string`

            - `Type UpdateFile`

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status ResponseApplyPatchToolCallStatus`

          - `const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"`

          - `const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"`

        - `Type ApplyPatchCall`

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `CreatedBy string`

      - `type ResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

        - `ID string`

        - `CallID string`

        - `Status ResponseApplyPatchToolCallOutputStatus`

          - `const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"`

          - `const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `CreatedBy string`

        - `Output string`

      - `type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

        - `Arguments string`

        - `Name string`

        - `ServerLabel string`

        - `Type McpCall`

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `ApprovalRequestID string`

        - `Error string`

        - `Output string`

        - `Status OpenAITypesResponsesResponseOutputItemMcpCallStatus`

          - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"`

          - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"`

          - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"`

          - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"`

      - `type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

        - `ServerLabel string`

        - `Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool`

          - `InputSchema any`

          - `Name string`

          - `Annotations any`

          - `Description string`

        - `Type McpListTools`

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Error string`

      - `type McpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

        - `ID string`

        - `Arguments string`

        - `Name string`

        - `ServerLabel string`

        - `Type McpApprovalRequest`

          - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

      - `type OpenAIResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

        - `CallID string`

        - `Input string`

        - `Name string`

        - `Type CustomToolCall`

          - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

        - `ID string`

    - `ParallelToolCalls bool`

    - `ToolChoice OpenAIResponseToolChoiceUnion`

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

      - `type OpenAIResponseToolChoiceString string`

        - `const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"`

        - `const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"`

        - `const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"`

      - `type ToolChoiceAllowed struct{…}`

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

        - `Mode ToolChoiceAllowedMode`

          - `const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"`

          - `const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"`

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

        - `Type AllowedTools`

          - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

      - `type ToolChoiceTypes 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 ToolChoiceTypesType`

          - `const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"`

          - `const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"`

          - `const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"`

          - `const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"`

          - `const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"`

          - `const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"`

      - `type ToolChoiceFunction struct{…}`

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

        - `Name string`

        - `Type Function`

          - `const FunctionFunction Function = "function"`

      - `type ToolChoiceMcp struct{…}`

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

        - `ServerLabel string`

        - `Type Mcp`

          - `const McpMcp Mcp = "mcp"`

        - `Name string`

      - `type ToolChoiceCustom struct{…}`

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

        - `Name string`

        - `Type Custom`

          - `const CustomCustom Custom = "custom"`

      - `type ToolChoiceApplyPatch struct{…}`

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

        - `Type ApplyPatch`

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

      - `type ToolChoiceShell struct{…}`

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

        - `Type Shell`

          - `const ShellShell Shell = "shell"`

    - `Tools []OpenAIResponseToolUnion`

      - `type FunctionTool 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`

        - `Type Function`

          - `const FunctionFunction Function = "function"`

        - `Description string`

        - `Parameters map[string, any]`

        - `Strict bool`

      - `type FileSearchTool 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`

          - `const FileSearchFileSearch FileSearch = "file_search"`

        - `VectorStoreIDs []string`

        - `Filters FileSearchToolFiltersUnion`

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

          - `type FileSearchToolFiltersComparisonFilter struct{…}`

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

            - `Key string`

            - `Type string`

              - `const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"`

              - `const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"`

              - `const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"`

              - `const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"`

              - `const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"`

              - `const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"`

            - `Value FileSearchToolFiltersComparisonFilterValueUnion`

              - `string`

              - `float64`

              - `bool`

              - `type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion`

                - `string`

                - `float64`

          - `type FileSearchToolFiltersCompoundFilter struct{…}`

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

            - `Filters []FileSearchToolFiltersCompoundFilterFilter`

              - `type FileSearchToolFiltersCompoundFilterFilter struct{…}`

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

                - `Key string`

                - `Type string`

                  - `const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"`

                  - `const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"`

                  - `const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"`

                  - `const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"`

                  - `const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"`

                  - `const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"`

                - `Value FileSearchToolFiltersCompoundFilterFilterValueUnion`

                  - `string`

                  - `float64`

                  - `bool`

                  - `type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

            - `Type string`

              - `const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"`

              - `const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"`

        - `MaxNumResults int64`

        - `RankingOptions FileSearchToolRankingOptions`

          Ranking options for search.

          - `HybridSearch FileSearchToolRankingOptionsHybridSearch`

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

            - `EmbeddingWeight float64`

            - `TextWeight float64`

          - `Ranker string`

            - `const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"`

            - `const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"`

          - `ScoreThreshold float64`

      - `type ComputerTool 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`

        - `DisplayWidth int64`

        - `Environment ComputerToolEnvironment`

          - `const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"`

          - `const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"`

          - `const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"`

          - `const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"`

          - `const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"`

        - `Type ComputerUsePreview`

          - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

      - `type WebSearchTool 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 WebSearchToolType`

          - `const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"`

          - `const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"`

        - `Filters WebSearchToolFilters`

          Filters for the search.

          - `AllowedDomains []string`

        - `SearchContextSize WebSearchToolSearchContextSize`

          - `const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"`

          - `const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"`

          - `const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"`

        - `UserLocation WebSearchToolUserLocation`

          The approximate location of the user.

          - `City string`

          - `Country string`

          - `Region string`

          - `Timezone string`

          - `Type string`

            - `const WebSearchToolUserLocationTypeApproximate WebSearchToolUserLocationType = "approximate"`

      - `type OpenAIResponseToolMcp 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`

        - `Type Mcp`

          - `const McpMcp Mcp = "mcp"`

        - `AllowedTools OpenAIResponseToolMcpAllowedToolsUnion`

          A filter object to specify which tools are allowed.

          - `type OpenAIResponseToolMcpAllowedToolsArray []string`

          - `type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

            - `ToolNames []string`

        - `Authorization string`

        - `ConnectorID string`

          - `const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"`

          - `const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"`

          - `const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"`

          - `const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"`

          - `const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"`

          - `const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"`

          - `const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"`

          - `const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"`

        - `Headers map[string, string]`

        - `RequireApproval OpenAIResponseToolMcpRequireApprovalUnion`

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

          Can be
          `always`, `never`, or a filter object associated with tools
          that require approval.

          - `type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter 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 OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlways`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

              - `ToolNames []string`

            - `Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNever`

              A filter object to specify which tools are allowed.

              - `ReadOnly bool`

              - `ToolNames []string`

          - `type OpenAIResponseToolMcpRequireApprovalString string`

            - `const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"`

            - `const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"`

        - `ServerDescription string`

        - `ServerURL string`

      - `type OpenAIResponseToolCodeInterpreter struct{…}`

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

        - `Container OpenAIResponseToolCodeInterpreterContainerUnion`

          Configuration for a code interpreter container.

          Optionally specify the IDs of the files to run the code on.

          - `string`

          - `type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

            Configuration for a code interpreter container.

            Optionally specify the IDs of the files to run the code on.

            - `Type Auto`

              - `const AutoAuto Auto = "auto"`

            - `FileIDs []string`

            - `MemoryLimit string`

              - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

              - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

              - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

              - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

            - `NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

              - `type ContainerNetworkPolicyDisabled struct{…}`

                - `Type Disabled`

                  - `const DisabledDisabled Disabled = "disabled"`

              - `type ContainerNetworkPolicyAllowlist struct{…}`

                - `AllowedDomains []string`

                - `Type Allowlist`

                  - `const AllowlistAllowlist Allowlist = "allowlist"`

                - `DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecret`

                  - `Domain string`

                  - `Name string`

                  - `Value string`

        - `Type CodeInterpreter`

          - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

      - `type OpenAIResponseToolImageGeneration struct{…}`

        A tool that generates images using the GPT image models.

        - `Type ImageGeneration`

          - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

        - `Action string`

          - `const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"`

          - `const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"`

          - `const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"`

        - `Background string`

          - `const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"`

          - `const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"`

          - `const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"`

        - `InputFidelity string`

          - `const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"`

          - `const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"`

        - `InputImageMask OpenAIResponseToolImageGenerationInputImageMask`

          Optional mask for inpainting.

          Contains `image_url`
          (string, optional) and `file_id` (string, optional).

          - `FileID string`

          - `ImageURL string`

        - `Model string`

          - `string`

          - `string`

            - `const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"`

            - `const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"`

            - `const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"`

        - `Moderation string`

          - `const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"`

          - `const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"`

        - `OutputCompression int64`

        - `OutputFormat string`

          - `const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"`

          - `const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"`

          - `const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"`

        - `PartialImages int64`

        - `Quality string`

          - `const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"`

          - `const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"`

          - `const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"`

          - `const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"`

        - `Size string`

          - `const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"`

          - `const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"`

          - `const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"`

          - `const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"`

      - `type OpenAIResponseToolLocalShell struct{…}`

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

        - `Type LocalShell`

          - `const LocalShellLocalShell LocalShell = "local_shell"`

      - `type FunctionShellTool struct{…}`

        A tool that allows the model to execute shell commands.

        - `Type Shell`

          - `const ShellShell Shell = "shell"`

        - `Environment FunctionShellToolEnvironmentUnion`

          - `type FunctionShellToolEnvironmentContainerAuto struct{…}`

            - `Type ContainerAuto`

              - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

            - `FileIDs []string`

            - `MemoryLimit string`

              - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"`

              - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"`

              - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"`

              - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"`

            - `NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnion`

              - `type ContainerNetworkPolicyDisabled struct{…}`

              - `type ContainerNetworkPolicyAllowlist struct{…}`

            - `Skills []FunctionShellToolEnvironmentContainerAutoSkillUnion`

              - `type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}`

                - `SkillID string`

                - `Type SkillReference`

                  - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

                - `Version string`

              - `type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}`

                - `Description string`

                - `Name string`

                - `Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource`

                  Inline skill payload

                  - `Data string`

                  - `MediaType ApplicationZip`

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

                  - `Type Base64`

                    - `const Base64Base64 Base64 = "base64"`

                - `Type Inline`

                  - `const InlineInline Inline = "inline"`

          - `type LocalEnvironment struct{…}`

            - `Type Local`

              - `const LocalLocal Local = "local"`

            - `Skills []LocalEnvironmentSkill`

              - `Description string`

              - `Name string`

              - `Path string`

          - `type ContainerReference struct{…}`

            - `ContainerID string`

            - `Type ContainerReference`

              - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

      - `type CustomTool 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`

        - `Type Custom`

          - `const CustomCustom Custom = "custom"`

        - `Description string`

        - `Format CustomToolFormatUnion`

          Unconstrained free-form text.

          - `type CustomToolFormatText struct{…}`

            Unconstrained free-form text.

            - `Type Text`

              - `const TextText Text = "text"`

          - `type CustomToolFormatGrammar struct{…}`

            A grammar defined by the user.

            - `Definition string`

            - `Syntax string`

              - `const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"`

              - `const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"`

            - `Type Grammar`

              - `const GrammarGrammar Grammar = "grammar"`

      - `type WebSearchPreviewTool 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 WebSearchPreviewToolType`

          - `const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"`

          - `const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"`

        - `SearchContextSize WebSearchPreviewToolSearchContextSize`

          - `const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"`

          - `const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"`

          - `const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"`

        - `UserLocation WebSearchPreviewToolUserLocation`

          The user's location.

          - `Type Approximate`

            - `const ApproximateApproximate Approximate = "approximate"`

          - `City string`

          - `Country string`

          - `Region string`

          - `Timezone string`

      - `type ApplyPatchTool struct{…}`

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

        - `Type ApplyPatch`

          - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `Background bool`

    - `CompletedAt float64`

    - `Conversation Conversation`

      The conversation that this response belonged to.

      Input items and output items from this response were automatically added to this conversation.

      - `ID string`

    - `Error OpenAIResponseError`

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

      - `Code OpenAIResponseErrorCode`

        - `const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"`

        - `const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"`

        - `const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"`

        - `const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"`

        - `const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"`

        - `const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"`

        - `const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"`

        - `const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"`

        - `const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"`

        - `const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"`

        - `const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"`

        - `const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"`

        - `const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"`

        - `const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"`

        - `const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"`

        - `const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"`

        - `const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"`

        - `const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"`

      - `Message string`

    - `IncompleteDetails IncompleteDetails`

      Details about why the response is incomplete.

      - `Reason IncompleteDetailsReason`

        - `const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"`

        - `const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"`

    - `Instructions OpenAIResponseInstructionsUnion`

      - `string`

      - `type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion`

        - `type EasyInputMessage 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 EasyInputMessageContentUnion`

            - `string`

            - `type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion`

              - `type OpenAIResponseInputText struct{…}`

                A text input to the model.

                - `Text string`

                - `Type InputText`

                  - `const InputTextInputText InputText = "input_text"`

              - `type OpenAIResponseInputImage struct{…}`

                An image input to the model.

                Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

                - `Detail OpenAIResponseInputImageDetail`

                  - `const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"`

                  - `const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"`

                  - `const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"`

                - `Type InputImage`

                  - `const InputImageInputImage InputImage = "input_image"`

                - `FileID string`

                - `ImageURL string`

              - `type OpenAIResponseInputFile struct{…}`

                A file input to the model.

                - `Type InputFile`

                  - `const InputFileInputFile InputFile = "input_file"`

                - `FileData string`

                - `FileID string`

                - `FileURL string`

                - `Filename string`

          - `Role EasyInputMessageRole`

            - `const EasyInputMessageRoleUser EasyInputMessageRole = "user"`

            - `const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"`

            - `const EasyInputMessageRoleSystem EasyInputMessageRole = "system"`

            - `const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"`

          - `Phase EasyInputMessagePhase`

            - `const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"`

            - `const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"`

          - `Type EasyInputMessageType`

            - `const EasyInputMessageTypeMessage EasyInputMessageType = "message"`

        - `type OpenAITypesResponsesResponseInputItemMessage 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 []OpenAITypesResponsesResponseInputItemMessageContentUnion`

            - `type OpenAIResponseInputText struct{…}`

              A text input to the model.

            - `type OpenAIResponseInputImage struct{…}`

              An image input to the model.

              Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type OpenAIResponseInputFile struct{…}`

              A file input to the model.

          - `Role OpenAITypesResponsesResponseInputItemMessageRole`

            - `const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"`

            - `const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"`

            - `const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"`

          - `Status OpenAITypesResponsesResponseInputItemMessageStatus`

            - `const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"`

            - `const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"`

            - `const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"`

          - `Type OpenAITypesResponsesResponseInputItemMessageType`

            - `const OpenAITypesResponsesResponseInputItemMessageTypeMessage OpenAITypesResponsesResponseInputItemMessageType = "message"`

        - `type OpenAIResponseOutputMessage struct{…}`

          An output message from the model.

        - `type OpenAIResponseFileSearchToolCall 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 OpenAIResponseComputerToolCall 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 OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}`

          The output of a computer tool call.

          - `CallID string`

          - `Output ResponseComputerToolCallOutputScreenshot`

            A computer screenshot image used with the computer use tool.

            - `Type ComputerScreenshot`

              - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

            - `FileID string`

            - `ImageURL string`

          - `Type ComputerCallOutput`

            - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

          - `ID string`

          - `AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

            - `ID string`

            - `Code string`

            - `Message string`

          - `Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatus`

            - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"`

            - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"`

            - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"`

        - `type OpenAIResponseFunctionWebSearch 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 OpenAIResponseFunctionToolCall 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 OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}`

          The output of a function tool call.

          - `CallID string`

          - `Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion`

            - `string`

            - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion`

              - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}`

                A text input to the model.

                - `Text string`

                - `Type InputText`

                  - `const InputTextInputText InputText = "input_text"`

              - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}`

                An image input to the model.

                Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

                - `Type InputImage`

                  - `const InputImageInputImage InputImage = "input_image"`

                - `Detail string`

                  - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"`

                  - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"`

                  - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"`

                - `FileID string`

                - `ImageURL string`

              - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}`

                A file input to the model.

                - `Type InputFile`

                  - `const InputFileInputFile InputFile = "input_file"`

                - `FileData string`

                - `FileID string`

                - `FileURL string`

                - `Filename string`

          - `Type FunctionCallOutput`

            - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

          - `ID string`

          - `Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus`

            - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"`

            - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"`

            - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"`

        - `type OpenAIResponseReasoningItem 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 ResponseCompactionItemParamResp struct{…}`

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

          - `EncryptedContent string`

          - `Type Compaction`

            - `const CompactionCompaction Compaction = "compaction"`

          - `ID string`

        - `type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}`

          An image generation request made by the model.

          - `ID string`

          - `Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus`

            - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"`

            - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"`

            - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"`

            - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"`

          - `Type ImageGenerationCall`

            - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

          - `Result string`

        - `type OpenAIResponseCodeInterpreterToolCall struct{…}`

          A tool call to run code.

        - `type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}`

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

          - `ID string`

          - `Action OpenAITypesResponsesResponseInputItemLocalShellCallAction`

            Execute a shell command on the server.

            - `Command []string`

            - `Env map[string, string]`

            - `Type Exec`

              - `const ExecExec Exec = "exec"`

            - `TimeoutMs int64`

            - `User string`

            - `WorkingDirectory string`

          - `CallID string`

          - `Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus`

            - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"`

            - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"`

            - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"`

          - `Type LocalShellCall`

            - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

        - `type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}`

          The output of a local shell tool call.

          - `ID string`

          - `Output string`

          - `Type LocalShellCallOutput`

            - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

          - `Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus`

            - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"`

            - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"`

            - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"`

        - `type ShellCall struct{…}`

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

          - `Action ShellCallAction`

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

            - `Commands []string`

            - `MaxOutputLength int64`

            - `TimeoutMs int64`

          - `CallID string`

          - `Type ShellCall`

            - `const ShellCallShellCall ShellCall = "shell_call"`

          - `ID string`

          - `Environment ShellCallEnvironmentUnion`

            - `type LocalEnvironment struct{…}`

            - `type ContainerReference struct{…}`

          - `Status ShellCallStatus`

            - `const ShellCallStatusInProgress ShellCallStatus = "in_progress"`

            - `const ShellCallStatusCompleted ShellCallStatus = "completed"`

            - `const ShellCallStatusIncomplete ShellCallStatus = "incomplete"`

        - `type ShellCallOutput struct{…}`

          The streamed output items emitted by a shell tool call.

          - `CallID string`

          - `Output []ShellCallOutputOutput`

            - `Outcome ShellCallOutputOutputOutcomeUnion`

              Indicates that the shell call exceeded its configured time limit.

              - `type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}`

                Indicates that the shell call exceeded its configured time limit.

                - `Type Timeout`

                  - `const TimeoutTimeout Timeout = "timeout"`

              - `type ShellCallOutputOutputOutcomeOutcomeExit struct{…}`

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

                - `ExitCode int64`

                - `Type Exit`

                  - `const ExitExit Exit = "exit"`

            - `Stderr string`

            - `Stdout string`

          - `Type ShellCallOutput`

            - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

          - `ID string`

          - `MaxOutputLength int64`

          - `Status ShellCallOutputStatus`

            - `const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"`

            - `const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"`

            - `const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"`

        - `type ApplyPatchCall struct{…}`

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

          - `CallID string`

          - `Operation ApplyPatchCallOperationUnion`

            Instruction for creating a new file via the apply_patch tool.

            - `type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}`

              Instruction for creating a new file via the apply_patch tool.

              - `Diff string`

              - `Path string`

              - `Type CreateFile`

                - `const CreateFileCreateFile CreateFile = "create_file"`

            - `type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}`

              Instruction for deleting an existing file via the apply_patch tool.

              - `Path string`

              - `Type DeleteFile`

                - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

            - `type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}`

              Instruction for updating an existing file via the apply_patch tool.

              - `Diff string`

              - `Path string`

              - `Type UpdateFile`

                - `const UpdateFileUpdateFile UpdateFile = "update_file"`

          - `Status ApplyPatchCallStatus`

            - `const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"`

            - `const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"`

          - `Type ApplyPatchCall`

            - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

          - `ID string`

        - `type ApplyPatchCallOutput struct{…}`

          The streamed output emitted by an apply patch tool call.

          - `CallID string`

          - `Status ApplyPatchCallOutputStatus`

            - `const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"`

            - `const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"`

          - `Type ApplyPatchCallOutput`

            - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

          - `ID string`

          - `Output string`

        - `type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}`

          A list of tools available on an MCP server.

          - `ID string`

          - `ServerLabel string`

          - `Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool`

            - `InputSchema any`

            - `Name string`

            - `Annotations any`

            - `Description string`

          - `Type McpListTools`

            - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

          - `Error string`

        - `type McpApprovalRequest struct{…}`

          A request for human approval of a tool invocation.

        - `type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}`

          A response to an MCP approval request.

          - `ApprovalRequestID string`

          - `Approve bool`

          - `Type McpApprovalResponse`

            - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

          - `ID string`

          - `Reason string`

        - `type OpenAITypesResponsesResponseInputItemMcpCall struct{…}`

          An invocation of a tool on an MCP server.

          - `ID string`

          - `Arguments string`

          - `Name string`

          - `ServerLabel string`

          - `Type McpCall`

            - `const McpCallMcpCall McpCall = "mcp_call"`

          - `ApprovalRequestID string`

          - `Error string`

          - `Output string`

          - `Status OpenAITypesResponsesResponseInputItemMcpCallStatus`

            - `const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"`

            - `const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"`

            - `const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"`

            - `const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"`

            - `const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"`

        - `type OpenAIResponseCustomToolCallOutput struct{…}`

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

          - `CallID string`

          - `Output OpenAIResponseCustomToolCallOutputOutputUnion`

            - `string`

            - `type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion`

              - `type OpenAIResponseInputText struct{…}`

                A text input to the model.

              - `type OpenAIResponseInputImage struct{…}`

                An image input to the model.

                Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `type OpenAIResponseInputFile struct{…}`

                A file input to the model.

          - `Type CustomToolCallOutput`

            - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

          - `ID string`

        - `type OpenAIResponseCustomToolCall struct{…}`

          A call to a custom tool created by the model.

        - `type OpenAITypesResponsesResponseInputItemItemReference struct{…}`

          An internal identifier for an item to reference.

          - `ID string`

          - `Type OpenAITypesResponsesResponseInputItemItemReferenceType`

            - `const OpenAITypesResponsesResponseInputItemItemReferenceTypeItemReference OpenAITypesResponsesResponseInputItemItemReferenceType = "item_reference"`

    - `MaxOutputTokens int64`

    - `MaxToolCalls int64`

    - `Metadata map[string, string]`

    - `PreviousResponseID string`

    - `Prompt OpenAIResponsePrompt`

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

      - `ID string`

      - `Variables map[string, OpenAIResponsePromptVariableUnion]`

        - `string`

        - `type OpenAIResponseInputText struct{…}`

          A text input to the model.

        - `type OpenAIResponseInputImage struct{…}`

          An image input to the model.

          Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `type OpenAIResponseInputFile struct{…}`

          A file input to the model.

      - `Version string`

    - `PromptCacheKey string`

    - `PromptCacheRetention OpenAIResponsePromptCacheRetention`

      - `const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"`

      - `const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"`

    - `Reasoning Reasoning`

      **gpt-5 and o-series models only**

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

      - `Effort ReasoningEffort`

        - `const ReasoningEffortNone ReasoningEffort = "none"`

        - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`

        - `const ReasoningEffortLow ReasoningEffort = "low"`

        - `const ReasoningEffortMedium ReasoningEffort = "medium"`

        - `const ReasoningEffortHigh ReasoningEffort = "high"`

        - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`

      - `GenerateSummary ReasoningGenerateSummary`

        - `const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"`

        - `const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"`

        - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"`

      - `Summary ReasoningSummary`

        - `const ReasoningSummaryAuto ReasoningSummary = "auto"`

        - `const ReasoningSummaryConcise ReasoningSummary = "concise"`

        - `const ReasoningSummaryDetailed ReasoningSummary = "detailed"`

    - `SafetyIdentifier string`

    - `ServiceTier OpenAIResponseServiceTier`

      - `const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"`

      - `const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"`

      - `const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"`

      - `const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"`

      - `const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"`

    - `Status OpenAIResponseStatus`

      - `const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"`

      - `const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"`

      - `const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"`

      - `const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"`

      - `const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"`

      - `const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"`

    - `Temperature float64`

    - `Text OpenAIResponseTextConfig`

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

        Default response format. Used to generate text responses.

        - `type OpenAIResponseTextConfigFormatResponseFormatText struct{…}`

          Default response format. Used to generate text responses.

          - `Type Text`

            - `const TextText Text = "text"`

        - `type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig 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`

          - `Schema map[string, any]`

          - `Type JsonSchema`

            - `const JsonSchemaJsonSchema JsonSchema = "json_schema"`

          - `Description string`

          - `Strict bool`

        - `type OpenAIResponseTextConfigFormatResponseFormatJsonObject 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`

            - `const JsonObjectJsonObject JsonObject = "json_object"`

      - `Verbosity OpenAIResponseTextConfigVerbosity`

        - `const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"`

        - `const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"`

        - `const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"`

    - `TopLogprobs int64`

    - `TopP float64`

    - `Truncation OpenAIResponseTruncation`

      - `const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"`

      - `const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"`

    - `Usage OpenAIResponseUsage`

      Represents token usage details including input tokens, output tokens,
      a breakdown of output tokens, and the total tokens used.

      - `InputTokens int64`

      - `InputTokensDetails OpenAIResponseUsageInputTokensDetails`

        A detailed breakdown of the input tokens.

        - `CachedTokens int64`

      - `OutputTokens int64`

      - `OutputTokensDetails OpenAIResponseUsageOutputTokensDetails`

        A detailed breakdown of the output tokens.

        - `ReasoningTokens int64`

      - `TotalTokens int64`

    - `User string`

  - `type ResponseNewResponseResponseAudioDeltaEvent struct{…}`

    Emitted when there is a partial audio response.

    - `Delta string`

    - `SequenceNumber int64`

    - `Type ResponseAudioDelta`

      - `const ResponseAudioDeltaResponseAudioDelta ResponseAudioDelta = "response.audio.delta"`

  - `type ResponseNewResponseResponseAudioDoneEvent struct{…}`

    Emitted when the audio response is complete.

    - `SequenceNumber int64`

    - `Type ResponseAudioDone`

      - `const ResponseAudioDoneResponseAudioDone ResponseAudioDone = "response.audio.done"`

  - `type ResponseNewResponseResponseAudioTranscriptDeltaEvent struct{…}`

    Emitted when there is a partial transcript of audio.

    - `Delta string`

    - `SequenceNumber int64`

    - `Type ResponseAudioTranscriptDelta`

      - `const ResponseAudioTranscriptDeltaResponseAudioTranscriptDelta ResponseAudioTranscriptDelta = "response.audio.transcript.delta"`

  - `type ResponseNewResponseResponseAudioTranscriptDoneEvent struct{…}`

    Emitted when the full audio transcript is completed.

    - `SequenceNumber int64`

    - `Type ResponseAudioTranscriptDone`

      - `const ResponseAudioTranscriptDoneResponseAudioTranscriptDone ResponseAudioTranscriptDone = "response.audio.transcript.done"`

  - `type ResponseNewResponseResponseCodeInterpreterCallCodeDeltaEvent struct{…}`

    Emitted when a partial code snippet is streamed by the code interpreter.

    - `Delta string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseCodeInterpreterCallCodeDelta`

      - `const ResponseCodeInterpreterCallCodeDeltaResponseCodeInterpreterCallCodeDelta ResponseCodeInterpreterCallCodeDelta = "response.code_interpreter_call_code.delta"`

  - `type ResponseNewResponseResponseCodeInterpreterCallCodeDoneEvent struct{…}`

    Emitted when the code snippet is finalized by the code interpreter.

    - `Code string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseCodeInterpreterCallCodeDone`

      - `const ResponseCodeInterpreterCallCodeDoneResponseCodeInterpreterCallCodeDone ResponseCodeInterpreterCallCodeDone = "response.code_interpreter_call_code.done"`

  - `type ResponseNewResponseResponseCodeInterpreterCallCompletedEvent struct{…}`

    Emitted when the code interpreter call is completed.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseCodeInterpreterCallCompleted`

      - `const ResponseCodeInterpreterCallCompletedResponseCodeInterpreterCallCompleted ResponseCodeInterpreterCallCompleted = "response.code_interpreter_call.completed"`

  - `type ResponseNewResponseResponseCodeInterpreterCallInProgressEvent struct{…}`

    Emitted when a code interpreter call is in progress.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseCodeInterpreterCallInProgress`

      - `const ResponseCodeInterpreterCallInProgressResponseCodeInterpreterCallInProgress ResponseCodeInterpreterCallInProgress = "response.code_interpreter_call.in_progress"`

  - `type ResponseNewResponseResponseCodeInterpreterCallInterpretingEvent struct{…}`

    Emitted when the code interpreter is actively interpreting the code snippet.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseCodeInterpreterCallInterpreting`

      - `const ResponseCodeInterpreterCallInterpretingResponseCodeInterpreterCallInterpreting ResponseCodeInterpreterCallInterpreting = "response.code_interpreter_call.interpreting"`

  - `type ResponseNewResponseResponseCompletedEvent struct{…}`

    Emitted when the model response is complete.

    - `Response OpenAIResponse`

    - `SequenceNumber int64`

    - `Type ResponseCompleted`

      - `const ResponseCompletedResponseCompleted ResponseCompleted = "response.completed"`

  - `type ResponseNewResponseResponseContentPartAddedEvent struct{…}`

    Emitted when a new content part is added.

    - `ContentIndex int64`

    - `ItemID string`

    - `OutputIndex int64`

    - `Part ResponseNewResponseResponseContentPartAddedEventPartUnion`

      A text output from the model.

      - `type OpenAIResponseOutputText struct{…}`

        A text output from the model.

      - `type OpenAIResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type PartReasoningText struct{…}`

        Reasoning text from the model.

        - `Text string`

        - `Type ReasoningText`

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

    - `SequenceNumber int64`

    - `Type ResponseContentPartAdded`

      - `const ResponseContentPartAddedResponseContentPartAdded ResponseContentPartAdded = "response.content_part.added"`

  - `type ResponseNewResponseResponseContentPartDoneEvent struct{…}`

    Emitted when a content part is done.

    - `ContentIndex int64`

    - `ItemID string`

    - `OutputIndex int64`

    - `Part ResponseNewResponseResponseContentPartDoneEventPartUnion`

      A text output from the model.

      - `type OpenAIResponseOutputText struct{…}`

        A text output from the model.

      - `type OpenAIResponseOutputRefusal struct{…}`

        A refusal from the model.

      - `type PartReasoningText struct{…}`

        Reasoning text from the model.

    - `SequenceNumber int64`

    - `Type ResponseContentPartDone`

      - `const ResponseContentPartDoneResponseContentPartDone ResponseContentPartDone = "response.content_part.done"`

  - `type ResponseNewResponseResponseCreatedEvent struct{…}`

    An event that is emitted when a response is created.

    - `Response OpenAIResponse`

    - `SequenceNumber int64`

    - `Type ResponseCreated`

      - `const ResponseCreatedResponseCreated ResponseCreated = "response.created"`

  - `type ResponseNewResponseResponseErrorEvent struct{…}`

    Emitted when an error occurs.

    - `Message string`

    - `SequenceNumber int64`

    - `Type Error`

      - `const ErrorError Error = "error"`

    - `Code string`

    - `Param string`

  - `type ResponseNewResponseResponseFileSearchCallCompletedEvent struct{…}`

    Emitted when a file search call is completed (results found).

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseFileSearchCallCompleted`

      - `const ResponseFileSearchCallCompletedResponseFileSearchCallCompleted ResponseFileSearchCallCompleted = "response.file_search_call.completed"`

  - `type ResponseNewResponseResponseFileSearchCallInProgressEvent struct{…}`

    Emitted when a file search call is initiated.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseFileSearchCallInProgress`

      - `const ResponseFileSearchCallInProgressResponseFileSearchCallInProgress ResponseFileSearchCallInProgress = "response.file_search_call.in_progress"`

  - `type ResponseNewResponseResponseFileSearchCallSearchingEvent struct{…}`

    Emitted when a file search is currently searching.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseFileSearchCallSearching`

      - `const ResponseFileSearchCallSearchingResponseFileSearchCallSearching ResponseFileSearchCallSearching = "response.file_search_call.searching"`

  - `type ResponseNewResponseResponseFunctionCallArgumentsDeltaEvent struct{…}`

    Emitted when there is a partial function-call arguments delta.

    - `Delta string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseFunctionCallArgumentsDelta`

      - `const ResponseFunctionCallArgumentsDeltaResponseFunctionCallArgumentsDelta ResponseFunctionCallArgumentsDelta = "response.function_call_arguments.delta"`

  - `type ResponseNewResponseResponseFunctionCallArgumentsDoneEvent struct{…}`

    Emitted when function-call arguments are finalized.

    - `Arguments string`

    - `ItemID string`

    - `Name string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseFunctionCallArgumentsDone`

      - `const ResponseFunctionCallArgumentsDoneResponseFunctionCallArgumentsDone ResponseFunctionCallArgumentsDone = "response.function_call_arguments.done"`

  - `type ResponseNewResponseResponseInProgressEvent struct{…}`

    Emitted when the response is in progress.

    - `Response OpenAIResponse`

    - `SequenceNumber int64`

    - `Type ResponseInProgress`

      - `const ResponseInProgressResponseInProgress ResponseInProgress = "response.in_progress"`

  - `type ResponseNewResponseResponseFailedEvent struct{…}`

    An event that is emitted when a response fails.

    - `Response OpenAIResponse`

    - `SequenceNumber int64`

    - `Type ResponseFailed`

      - `const ResponseFailedResponseFailed ResponseFailed = "response.failed"`

  - `type ResponseNewResponseResponseIncompleteEvent struct{…}`

    An event that is emitted when a response finishes as incomplete.

    - `Response OpenAIResponse`

    - `SequenceNumber int64`

    - `Type ResponseIncomplete`

      - `const ResponseIncompleteResponseIncomplete ResponseIncomplete = "response.incomplete"`

  - `type ResponseNewResponseResponseOutputItemAddedEvent struct{…}`

    Emitted when a new output item is added.

    - `Item ResponseNewResponseResponseOutputItemAddedEventItemUnion`

      An output message from the model.

      - `type OpenAIResponseOutputMessage struct{…}`

        An output message from the model.

      - `type OpenAIResponseFileSearchToolCall 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 OpenAIResponseFunctionToolCall 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 OpenAIResponseFunctionWebSearch 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 OpenAIResponseComputerToolCall 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 OpenAIResponseReasoningItem 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 ResponseCompactionItem struct{…}`

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

      - `type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

      - `type OpenAIResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}`

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

      - `type ResponseFunctionShellToolCall struct{…}`

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

      - `type ResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

      - `type ResponseApplyPatchToolCall struct{…}`

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

      - `type ResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

      - `type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

      - `type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

      - `type McpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

      - `type OpenAIResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseOutputItemAdded`

      - `const ResponseOutputItemAddedResponseOutputItemAdded ResponseOutputItemAdded = "response.output_item.added"`

  - `type ResponseNewResponseResponseOutputItemDoneEvent struct{…}`

    Emitted when an output item is marked done.

    - `Item ResponseNewResponseResponseOutputItemDoneEventItemUnion`

      An output message from the model.

      - `type OpenAIResponseOutputMessage struct{…}`

        An output message from the model.

      - `type OpenAIResponseFileSearchToolCall 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 OpenAIResponseFunctionToolCall 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 OpenAIResponseFunctionWebSearch 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 OpenAIResponseComputerToolCall 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 OpenAIResponseReasoningItem 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 ResponseCompactionItem struct{…}`

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

      - `type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

      - `type OpenAIResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}`

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

      - `type ResponseFunctionShellToolCall struct{…}`

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

      - `type ResponseFunctionShellToolCallOutput struct{…}`

        The output of a shell tool call that was emitted.

      - `type ResponseApplyPatchToolCall struct{…}`

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

      - `type ResponseApplyPatchToolCallOutput struct{…}`

        The output emitted by an apply patch tool call.

      - `type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

      - `type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

      - `type McpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

      - `type OpenAIResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseOutputItemDone`

      - `const ResponseOutputItemDoneResponseOutputItemDone ResponseOutputItemDone = "response.output_item.done"`

  - `type ResponseNewResponseResponseReasoningSummaryPartAddedEvent struct{…}`

    Emitted when a new reasoning summary part is added.

    - `ItemID string`

    - `OutputIndex int64`

    - `Part ResponseNewResponseResponseReasoningSummaryPartAddedEventPart`

      The summary part that was added.

      - `Text string`

      - `Type SummaryText`

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `SequenceNumber int64`

    - `SummaryIndex int64`

    - `Type ResponseReasoningSummaryPartAdded`

      - `const ResponseReasoningSummaryPartAddedResponseReasoningSummaryPartAdded ResponseReasoningSummaryPartAdded = "response.reasoning_summary_part.added"`

  - `type ResponseNewResponseResponseReasoningSummaryPartDoneEvent struct{…}`

    Emitted when a reasoning summary part is completed.

    - `ItemID string`

    - `OutputIndex int64`

    - `Part ResponseNewResponseResponseReasoningSummaryPartDoneEventPart`

      The completed summary part.

      - `Text string`

      - `Type SummaryText`

        - `const SummaryTextSummaryText SummaryText = "summary_text"`

    - `SequenceNumber int64`

    - `SummaryIndex int64`

    - `Type ResponseReasoningSummaryPartDone`

      - `const ResponseReasoningSummaryPartDoneResponseReasoningSummaryPartDone ResponseReasoningSummaryPartDone = "response.reasoning_summary_part.done"`

  - `type ResponseNewResponseResponseReasoningSummaryTextDeltaEvent struct{…}`

    Emitted when a delta is added to a reasoning summary text.

    - `Delta string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `SummaryIndex int64`

    - `Type ResponseReasoningSummaryTextDelta`

      - `const ResponseReasoningSummaryTextDeltaResponseReasoningSummaryTextDelta ResponseReasoningSummaryTextDelta = "response.reasoning_summary_text.delta"`

  - `type ResponseNewResponseResponseReasoningSummaryTextDoneEvent struct{…}`

    Emitted when a reasoning summary text is completed.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `SummaryIndex int64`

    - `Text string`

    - `Type ResponseReasoningSummaryTextDone`

      - `const ResponseReasoningSummaryTextDoneResponseReasoningSummaryTextDone ResponseReasoningSummaryTextDone = "response.reasoning_summary_text.done"`

  - `type ResponseNewResponseResponseReasoningTextDeltaEvent struct{…}`

    Emitted when a delta is added to a reasoning text.

    - `ContentIndex int64`

    - `Delta string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseReasoningTextDelta`

      - `const ResponseReasoningTextDeltaResponseReasoningTextDelta ResponseReasoningTextDelta = "response.reasoning_text.delta"`

  - `type ResponseNewResponseResponseReasoningTextDoneEvent struct{…}`

    Emitted when a reasoning text is completed.

    - `ContentIndex int64`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Text string`

    - `Type ResponseReasoningTextDone`

      - `const ResponseReasoningTextDoneResponseReasoningTextDone ResponseReasoningTextDone = "response.reasoning_text.done"`

  - `type ResponseNewResponseResponseRefusalDeltaEvent struct{…}`

    Emitted when there is a partial refusal text.

    - `ContentIndex int64`

    - `Delta string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseRefusalDelta`

      - `const ResponseRefusalDeltaResponseRefusalDelta ResponseRefusalDelta = "response.refusal.delta"`

  - `type ResponseNewResponseResponseRefusalDoneEvent struct{…}`

    Emitted when refusal text is finalized.

    - `ContentIndex int64`

    - `ItemID string`

    - `OutputIndex int64`

    - `Refusal string`

    - `SequenceNumber int64`

    - `Type ResponseRefusalDone`

      - `const ResponseRefusalDoneResponseRefusalDone ResponseRefusalDone = "response.refusal.done"`

  - `type ResponseNewResponseResponseTextDeltaEvent struct{…}`

    Emitted when there is an additional text delta.

    - `ContentIndex int64`

    - `Delta string`

    - `ItemID string`

    - `Logprobs []ResponseNewResponseResponseTextDeltaEventLogprob`

      - `Token string`

      - `Logprob float64`

      - `TopLogprobs []ResponseNewResponseResponseTextDeltaEventLogprobTopLogprob`

        - `Token string`

        - `Logprob float64`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseOutputTextDelta`

      - `const ResponseOutputTextDeltaResponseOutputTextDelta ResponseOutputTextDelta = "response.output_text.delta"`

  - `type ResponseNewResponseResponseTextDoneEvent struct{…}`

    Emitted when text content is finalized.

    - `ContentIndex int64`

    - `ItemID string`

    - `Logprobs []ResponseNewResponseResponseTextDoneEventLogprob`

      - `Token string`

      - `Logprob float64`

      - `TopLogprobs []ResponseNewResponseResponseTextDoneEventLogprobTopLogprob`

        - `Token string`

        - `Logprob float64`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Text string`

    - `Type ResponseOutputTextDone`

      - `const ResponseOutputTextDoneResponseOutputTextDone ResponseOutputTextDone = "response.output_text.done"`

  - `type ResponseNewResponseResponseWebSearchCallCompletedEvent struct{…}`

    Emitted when a web search call is completed.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseWebSearchCallCompleted`

      - `const ResponseWebSearchCallCompletedResponseWebSearchCallCompleted ResponseWebSearchCallCompleted = "response.web_search_call.completed"`

  - `type ResponseNewResponseResponseWebSearchCallInProgressEvent struct{…}`

    Emitted when a web search call is initiated.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseWebSearchCallInProgress`

      - `const ResponseWebSearchCallInProgressResponseWebSearchCallInProgress ResponseWebSearchCallInProgress = "response.web_search_call.in_progress"`

  - `type ResponseNewResponseResponseWebSearchCallSearchingEvent struct{…}`

    Emitted when a web search call is executing.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseWebSearchCallSearching`

      - `const ResponseWebSearchCallSearchingResponseWebSearchCallSearching ResponseWebSearchCallSearching = "response.web_search_call.searching"`

  - `type ResponseNewResponseResponseImageGenCallCompletedEvent struct{…}`

    Emitted when an image generation tool call has completed and the final image is available.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseImageGenerationCallCompleted`

      - `const ResponseImageGenerationCallCompletedResponseImageGenerationCallCompleted ResponseImageGenerationCallCompleted = "response.image_generation_call.completed"`

  - `type ResponseNewResponseResponseImageGenCallGeneratingEvent struct{…}`

    Emitted when an image generation tool call is actively generating an image (intermediate state).

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseImageGenerationCallGenerating`

      - `const ResponseImageGenerationCallGeneratingResponseImageGenerationCallGenerating ResponseImageGenerationCallGenerating = "response.image_generation_call.generating"`

  - `type ResponseNewResponseResponseImageGenCallInProgressEvent struct{…}`

    Emitted when an image generation tool call is in progress.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseImageGenerationCallInProgress`

      - `const ResponseImageGenerationCallInProgressResponseImageGenerationCallInProgress ResponseImageGenerationCallInProgress = "response.image_generation_call.in_progress"`

  - `type ResponseNewResponseResponseImageGenCallPartialImageEvent struct{…}`

    Emitted when a partial image is available during image generation streaming.

    - `ItemID string`

    - `OutputIndex int64`

    - `PartialImageB64 string`

    - `PartialImageIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseImageGenerationCallPartialImage`

      - `const ResponseImageGenerationCallPartialImageResponseImageGenerationCallPartialImage ResponseImageGenerationCallPartialImage = "response.image_generation_call.partial_image"`

  - `type ResponseNewResponseResponseMcpCallArgumentsDeltaEvent struct{…}`

    Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

    - `Delta string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpCallArgumentsDelta`

      - `const ResponseMcpCallArgumentsDeltaResponseMcpCallArgumentsDelta ResponseMcpCallArgumentsDelta = "response.mcp_call_arguments.delta"`

  - `type ResponseNewResponseResponseMcpCallArgumentsDoneEvent struct{…}`

    Emitted when the arguments for an MCP tool call are finalized.

    - `Arguments string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpCallArgumentsDone`

      - `const ResponseMcpCallArgumentsDoneResponseMcpCallArgumentsDone ResponseMcpCallArgumentsDone = "response.mcp_call_arguments.done"`

  - `type ResponseNewResponseResponseMcpCallCompletedEvent struct{…}`

    Emitted when an MCP  tool call has completed successfully.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpCallCompleted`

      - `const ResponseMcpCallCompletedResponseMcpCallCompleted ResponseMcpCallCompleted = "response.mcp_call.completed"`

  - `type ResponseNewResponseResponseMcpCallFailedEvent struct{…}`

    Emitted when an MCP  tool call has failed.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpCallFailed`

      - `const ResponseMcpCallFailedResponseMcpCallFailed ResponseMcpCallFailed = "response.mcp_call.failed"`

  - `type ResponseNewResponseResponseMcpCallInProgressEvent struct{…}`

    Emitted when an MCP  tool call is in progress.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpCallInProgress`

      - `const ResponseMcpCallInProgressResponseMcpCallInProgress ResponseMcpCallInProgress = "response.mcp_call.in_progress"`

  - `type ResponseNewResponseResponseMcpListToolsCompletedEvent struct{…}`

    Emitted when the list of available MCP tools has been successfully retrieved.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpListToolsCompleted`

      - `const ResponseMcpListToolsCompletedResponseMcpListToolsCompleted ResponseMcpListToolsCompleted = "response.mcp_list_tools.completed"`

  - `type ResponseNewResponseResponseMcpListToolsFailedEvent struct{…}`

    Emitted when the attempt to list available MCP tools has failed.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpListToolsFailed`

      - `const ResponseMcpListToolsFailedResponseMcpListToolsFailed ResponseMcpListToolsFailed = "response.mcp_list_tools.failed"`

  - `type ResponseNewResponseResponseMcpListToolsInProgressEvent struct{…}`

    Emitted when the system is in the process of retrieving the list of available MCP tools.

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseMcpListToolsInProgress`

      - `const ResponseMcpListToolsInProgressResponseMcpListToolsInProgress ResponseMcpListToolsInProgress = "response.mcp_list_tools.in_progress"`

  - `type ResponseNewResponseResponseOutputTextAnnotationAddedEvent struct{…}`

    Emitted when an annotation is added to output text content.

    - `Annotation any`

    - `AnnotationIndex int64`

    - `ContentIndex int64`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseOutputTextAnnotationAdded`

      - `const ResponseOutputTextAnnotationAddedResponseOutputTextAnnotationAdded ResponseOutputTextAnnotationAdded = "response.output_text.annotation.added"`

  - `type ResponseNewResponseResponseQueuedEvent struct{…}`

    Emitted when a response is queued and waiting to be processed.

    - `Response OpenAIResponse`

    - `SequenceNumber int64`

    - `Type ResponseQueued`

      - `const ResponseQueuedResponseQueued ResponseQueued = "response.queued"`

  - `type ResponseNewResponseResponseCustomToolCallInputDeltaEvent struct{…}`

    Event representing a delta (partial update) to the input of a custom tool call.

    - `Delta string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseCustomToolCallInputDelta`

      - `const ResponseCustomToolCallInputDeltaResponseCustomToolCallInputDelta ResponseCustomToolCallInputDelta = "response.custom_tool_call_input.delta"`

  - `type ResponseNewResponseResponseCustomToolCallInputDoneEvent struct{…}`

    Event indicating that input for a custom tool call is complete.

    - `Input string`

    - `ItemID string`

    - `OutputIndex int64`

    - `SequenceNumber int64`

    - `Type ResponseCustomToolCallInputDone`

      - `const ResponseCustomToolCallInputDoneResponseCustomToolCallInputDone ResponseCustomToolCallInputDone = "response.custom_tool_call_input.done"`

  - `type ResponseNewResponseGenericResponseEvent struct{…}`

    - `Type string`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  response, err := client.Responses.New(context.TODO(), sgpdev.ResponseNewParams{
    Input: sgpdev.ResponseNewParamsInputUnion{
      OfString: sgpdev.String("string"),
    },
    Model: "model",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
```

#### Response

```json
{
  "id": "id",
  "created_at": 0,
  "model": "gpt-5.2",
  "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",
      "phase": "commentary"
    }
  ],
  "parallel_tool_calls": true,
  "tool_choice": "none",
  "tools": [
    {
      "name": "name",
      "type": "function",
      "description": "description",
      "parameters": {
        "foo": "bar"
      },
      "strict": true
    }
  ],
  "background": true,
  "completed_at": 0,
  "conversation": {
    "id": "id"
  },
  "error": {
    "code": "server_error",
    "message": "message"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "instructions": "string",
  "max_output_tokens": 0,
  "max_tool_calls": 0,
  "metadata": {
    "foo": "string"
  },
  "previous_response_id": "previous_response_id",
  "prompt": {
    "id": "id",
    "variables": {
      "foo": "string"
    },
    "version": "version"
  },
  "prompt_cache_key": "prompt_cache_key",
  "prompt_cache_retention": "in-memory",
  "reasoning": {
    "effort": "none",
    "generate_summary": "auto",
    "summary": "auto"
  },
  "safety_identifier": "safety_identifier",
  "service_tier": "auto",
  "status": "completed",
  "temperature": 0,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "top_logprobs": 0,
  "top_p": 0,
  "truncation": "auto",
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  },
  "user": "user"
}
```

## Domain Types

### Apply Patch Call

- `type ApplyPatchCall struct{…}`

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

  - `CallID string`

  - `Operation ApplyPatchCallOperationUnion`

    Instruction for creating a new file via the apply_patch tool.

    - `type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}`

      Instruction for creating a new file via the apply_patch tool.

      - `Diff string`

      - `Path string`

      - `Type CreateFile`

        - `const CreateFileCreateFile CreateFile = "create_file"`

    - `type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}`

      Instruction for deleting an existing file via the apply_patch tool.

      - `Path string`

      - `Type DeleteFile`

        - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

    - `type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}`

      Instruction for updating an existing file via the apply_patch tool.

      - `Diff string`

      - `Path string`

      - `Type UpdateFile`

        - `const UpdateFileUpdateFile UpdateFile = "update_file"`

  - `Status ApplyPatchCallStatus`

    - `const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"`

    - `const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"`

  - `Type ApplyPatchCall`

    - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

  - `ID string`

### Apply Patch Call Output

- `type ApplyPatchCallOutput struct{…}`

  The streamed output emitted by an apply patch tool call.

  - `CallID string`

  - `Status ApplyPatchCallOutputStatus`

    - `const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"`

    - `const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"`

  - `Type ApplyPatchCallOutput`

    - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

  - `ID string`

  - `Output string`

### Apply Patch Tool

- `type ApplyPatchTool struct{…}`

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

  - `Type ApplyPatch`

    - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

### Computer Tool

- `type ComputerTool 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`

  - `DisplayWidth int64`

  - `Environment ComputerToolEnvironment`

    - `const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"`

    - `const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"`

    - `const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"`

    - `const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"`

    - `const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"`

  - `Type ComputerUsePreview`

    - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

### Container Network Policy Allowlist

- `type ContainerNetworkPolicyAllowlist struct{…}`

  - `AllowedDomains []string`

  - `Type Allowlist`

    - `const AllowlistAllowlist Allowlist = "allowlist"`

  - `DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecret`

    - `Domain string`

    - `Name string`

    - `Value string`

### Container Network Policy Disabled

- `type ContainerNetworkPolicyDisabled struct{…}`

  - `Type Disabled`

    - `const DisabledDisabled Disabled = "disabled"`

### Container Reference

- `type ContainerReference struct{…}`

  - `ContainerID string`

  - `Type ContainerReference`

    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

### Container Reference Param

- `type ContainerReferenceParamResp struct{…}`

  - `ContainerID string`

  - `Type ContainerReference`

    - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

### Conversation

- `type Conversation struct{…}`

  The conversation that this response belonged to.

  Input items and output items from this response were automatically added to this conversation.

  - `ID string`

### Custom Tool

- `type CustomTool 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`

  - `Type Custom`

    - `const CustomCustom Custom = "custom"`

  - `Description string`

  - `Format CustomToolFormatUnion`

    Unconstrained free-form text.

    - `type CustomToolFormatText struct{…}`

      Unconstrained free-form text.

      - `Type Text`

        - `const TextText Text = "text"`

    - `type CustomToolFormatGrammar struct{…}`

      A grammar defined by the user.

      - `Definition string`

      - `Syntax string`

        - `const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"`

        - `const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"`

      - `Type Grammar`

        - `const GrammarGrammar Grammar = "grammar"`

### Easy Input Message

- `type EasyInputMessage 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 EasyInputMessageContentUnion`

    - `string`

    - `type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion`

      - `type OpenAIResponseInputText struct{…}`

        A text input to the model.

        - `Text string`

        - `Type InputText`

          - `const InputTextInputText InputText = "input_text"`

      - `type OpenAIResponseInputImage struct{…}`

        An image input to the model.

        Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `Detail OpenAIResponseInputImageDetail`

          - `const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"`

          - `const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"`

          - `const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"`

        - `Type InputImage`

          - `const InputImageInputImage InputImage = "input_image"`

        - `FileID string`

        - `ImageURL string`

      - `type OpenAIResponseInputFile struct{…}`

        A file input to the model.

        - `Type InputFile`

          - `const InputFileInputFile InputFile = "input_file"`

        - `FileData string`

        - `FileID string`

        - `FileURL string`

        - `Filename string`

  - `Role EasyInputMessageRole`

    - `const EasyInputMessageRoleUser EasyInputMessageRole = "user"`

    - `const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"`

    - `const EasyInputMessageRoleSystem EasyInputMessageRole = "system"`

    - `const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"`

  - `Phase EasyInputMessagePhase`

    - `const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"`

    - `const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"`

  - `Type EasyInputMessageType`

    - `const EasyInputMessageTypeMessage EasyInputMessageType = "message"`

### File Search Tool

- `type FileSearchTool 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`

    - `const FileSearchFileSearch FileSearch = "file_search"`

  - `VectorStoreIDs []string`

  - `Filters FileSearchToolFiltersUnion`

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

    - `type FileSearchToolFiltersComparisonFilter struct{…}`

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

      - `Key string`

      - `Type string`

        - `const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"`

        - `const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"`

        - `const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"`

        - `const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"`

        - `const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"`

        - `const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"`

      - `Value FileSearchToolFiltersComparisonFilterValueUnion`

        - `string`

        - `float64`

        - `bool`

        - `type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion`

          - `string`

          - `float64`

    - `type FileSearchToolFiltersCompoundFilter struct{…}`

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

      - `Filters []FileSearchToolFiltersCompoundFilterFilter`

        - `type FileSearchToolFiltersCompoundFilterFilter struct{…}`

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

          - `Key string`

          - `Type string`

            - `const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"`

            - `const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"`

            - `const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"`

            - `const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"`

            - `const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"`

            - `const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"`

          - `Value FileSearchToolFiltersCompoundFilterFilterValueUnion`

            - `string`

            - `float64`

            - `bool`

            - `type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

              - `string`

              - `float64`

      - `Type string`

        - `const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"`

        - `const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"`

  - `MaxNumResults int64`

  - `RankingOptions FileSearchToolRankingOptions`

    Ranking options for search.

    - `HybridSearch FileSearchToolRankingOptionsHybridSearch`

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

      - `EmbeddingWeight float64`

      - `TextWeight float64`

    - `Ranker string`

      - `const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"`

      - `const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"`

    - `ScoreThreshold float64`

### Function Shell Tool

- `type FunctionShellTool struct{…}`

  A tool that allows the model to execute shell commands.

  - `Type Shell`

    - `const ShellShell Shell = "shell"`

  - `Environment FunctionShellToolEnvironmentUnion`

    - `type FunctionShellToolEnvironmentContainerAuto struct{…}`

      - `Type ContainerAuto`

        - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

      - `FileIDs []string`

      - `MemoryLimit string`

        - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"`

        - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"`

        - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"`

        - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"`

      - `NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnion`

        - `type ContainerNetworkPolicyDisabled struct{…}`

          - `Type Disabled`

            - `const DisabledDisabled Disabled = "disabled"`

        - `type ContainerNetworkPolicyAllowlist struct{…}`

          - `AllowedDomains []string`

          - `Type Allowlist`

            - `const AllowlistAllowlist Allowlist = "allowlist"`

          - `DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecret`

            - `Domain string`

            - `Name string`

            - `Value string`

      - `Skills []FunctionShellToolEnvironmentContainerAutoSkillUnion`

        - `type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}`

          - `SkillID string`

          - `Type SkillReference`

            - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

          - `Version string`

        - `type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}`

          - `Description string`

          - `Name string`

          - `Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource`

            Inline skill payload

            - `Data string`

            - `MediaType ApplicationZip`

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

            - `Type Base64`

              - `const Base64Base64 Base64 = "base64"`

          - `Type Inline`

            - `const InlineInline Inline = "inline"`

    - `type LocalEnvironment struct{…}`

      - `Type Local`

        - `const LocalLocal Local = "local"`

      - `Skills []LocalEnvironmentSkill`

        - `Description string`

        - `Name string`

        - `Path string`

    - `type ContainerReference struct{…}`

      - `ContainerID string`

      - `Type ContainerReference`

        - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

### Function Tool

- `type FunctionTool 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`

  - `Type Function`

    - `const FunctionFunction Function = "function"`

  - `Description string`

  - `Parameters map[string, any]`

  - `Strict bool`

### Incomplete Details

- `type IncompleteDetails struct{…}`

  Details about why the response is incomplete.

  - `Reason IncompleteDetailsReason`

    - `const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"`

    - `const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"`

### Local Environment

- `type LocalEnvironment struct{…}`

  - `Type Local`

    - `const LocalLocal Local = "local"`

  - `Skills []LocalEnvironmentSkill`

    - `Description string`

    - `Name string`

    - `Path string`

### Local Environment Param

- `type LocalEnvironmentParamResp struct{…}`

  - `Type Local`

    - `const LocalLocal Local = "local"`

  - `Skills []LocalEnvironmentParamSkillResp`

    - `Description string`

    - `Name string`

    - `Path string`

### Mcp Approval Request

- `type McpApprovalRequest struct{…}`

  A request for human approval of a tool invocation.

  - `ID string`

  - `Arguments string`

  - `Name string`

  - `ServerLabel string`

  - `Type McpApprovalRequest`

    - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

### OpenAI Response

- `type OpenAIResponse struct{…}`

  - `ID string`

  - `CreatedAt float64`

  - `Model OpenAIResponseModel`

    - `type OpenAIResponseModel string`

      - `const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"`

      - `const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"`

      - `const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"`

      - `const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"`

      - `const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"`

      - `const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"`

      - `const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"`

      - `const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"`

      - `const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"`

      - `const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"`

      - `const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"`

      - `const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"`

      - `const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"`

      - `const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"`

      - `const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"`

      - `const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"`

      - `const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"`

      - `const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"`

      - `const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"`

      - `const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"`

      - `const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"`

      - `const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"`

      - `const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"`

      - `const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"`

      - `const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"`

      - `const OpenAIResponseModelO3 OpenAIResponseModel = "o3"`

      - `const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"`

      - `const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"`

      - `const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"`

      - `const OpenAIResponseModelO1 OpenAIResponseModel = "o1"`

      - `const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"`

      - `const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"`

      - `const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"`

      - `const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"`

      - `const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"`

      - `const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"`

      - `const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"`

      - `const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"`

      - `const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"`

      - `const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"`

      - `const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"`

      - `const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"`

      - `const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"`

      - `const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"`

      - `const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"`

      - `const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"`

      - `const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"`

      - `const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"`

      - `const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"`

      - `const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"`

      - `const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"`

      - `const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"`

      - `const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"`

      - `const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"`

      - `const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"`

      - `const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"`

      - `const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"`

      - `const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"`

      - `const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"`

      - `const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"`

      - `const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"`

      - `const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"`

      - `const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"`

      - `const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"`

      - `const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"`

      - `const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"`

      - `const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"`

      - `const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"`

      - `const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"`

      - `const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"`

      - `const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"`

      - `const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"`

      - `const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"`

      - `const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"`

      - `const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"`

      - `const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"`

      - `const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"`

      - `const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"`

      - `const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"`

      - `const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"`

      - `const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"`

      - `const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"`

      - `const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"`

      - `const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"`

      - `const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"`

      - `const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"`

    - `string`

  - `Object Response`

    - `const ResponseResponse Response = "response"`

  - `Output []OpenAIResponseOutputUnion`

    - `type OpenAIResponseOutputMessage struct{…}`

      An output message from the model.

      - `ID string`

      - `Content []OpenAIResponseOutputMessageContentUnion`

        - `type OpenAIResponseOutputText struct{…}`

          A text output from the model.

          - `Annotations []OpenAIResponseOutputTextAnnotationUnion`

            - `type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}`

              A citation to a file.

              - `FileID string`

              - `Filename string`

              - `Index int64`

              - `Type FileCitation`

                - `const FileCitationFileCitation FileCitation = "file_citation"`

            - `type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}`

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

              - `EndIndex int64`

              - `StartIndex int64`

              - `Title string`

              - `Type URLCitation`

                - `const URLCitationURLCitation URLCitation = "url_citation"`

              - `URL string`

            - `type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}`

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

              - `ContainerID string`

              - `EndIndex int64`

              - `FileID string`

              - `Filename string`

              - `StartIndex int64`

              - `Type ContainerFileCitation`

                - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

            - `type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}`

              A path to a file.

              - `FileID string`

              - `Index int64`

              - `Type FilePath`

                - `const FilePathFilePath FilePath = "file_path"`

          - `Text string`

          - `Type OutputText`

            - `const OutputTextOutputText OutputText = "output_text"`

          - `Logprobs []OpenAIResponseOutputTextLogprob`

            - `Token string`

            - `Bytes []int64`

            - `Logprob float64`

            - `TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob`

              - `Token string`

              - `Bytes []int64`

              - `Logprob float64`

        - `type OpenAIResponseOutputRefusal struct{…}`

          A refusal from the model.

          - `Refusal string`

          - `Type Refusal`

            - `const RefusalRefusal Refusal = "refusal"`

      - `Role Assistant`

        - `const AssistantAssistant Assistant = "assistant"`

      - `Status OpenAIResponseOutputMessageStatus`

        - `const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"`

        - `const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"`

        - `const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"`

      - `Type Message`

        - `const MessageMessage Message = "message"`

      - `Phase OpenAIResponseOutputMessagePhase`

        - `const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"`

        - `const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"`

    - `type OpenAIResponseFileSearchToolCall 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`

      - `Queries []string`

      - `Status OpenAIResponseFileSearchToolCallStatus`

        - `const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"`

        - `const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"`

        - `const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"`

        - `const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"`

        - `const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"`

      - `Type FileSearchCall`

        - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

      - `Results []OpenAIResponseFileSearchToolCallResult`

        - `Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]`

          - `string`

          - `float64`

          - `bool`

        - `FileID string`

        - `Filename string`

        - `Score float64`

        - `Text string`

    - `type OpenAIResponseFunctionToolCall 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`

      - `CallID string`

      - `Name string`

      - `Type FunctionCall`

        - `const FunctionCallFunctionCall FunctionCall = "function_call"`

      - `ID string`

      - `Status OpenAIResponseFunctionToolCallStatus`

        - `const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"`

        - `const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"`

        - `const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"`

    - `type OpenAIResponseFunctionWebSearch 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`

      - `Action OpenAIResponseFunctionWebSearchActionUnion`

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

        - `type OpenAIResponseFunctionWebSearchActionActionSearch struct{…}`

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

          - `Query string`

          - `Type Search`

            - `const SearchSearch Search = "search"`

          - `Queries []string`

          - `Sources []OpenAIResponseFunctionWebSearchActionActionSearchSource`

            - `Type URL`

              - `const URLURL URL = "url"`

            - `URL string`

        - `type OpenAIResponseFunctionWebSearchActionActionOpenPage struct{…}`

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

          - `Type OpenPage`

            - `const OpenPageOpenPage OpenPage = "open_page"`

          - `URL string`

        - `type OpenAIResponseFunctionWebSearchActionActionFind struct{…}`

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

          - `Pattern string`

          - `Type FindInPage`

            - `const FindInPageFindInPage FindInPage = "find_in_page"`

          - `URL string`

      - `Status OpenAIResponseFunctionWebSearchStatus`

        - `const OpenAIResponseFunctionWebSearchStatusInProgress OpenAIResponseFunctionWebSearchStatus = "in_progress"`

        - `const OpenAIResponseFunctionWebSearchStatusSearching OpenAIResponseFunctionWebSearchStatus = "searching"`

        - `const OpenAIResponseFunctionWebSearchStatusCompleted OpenAIResponseFunctionWebSearchStatus = "completed"`

        - `const OpenAIResponseFunctionWebSearchStatusFailed OpenAIResponseFunctionWebSearchStatus = "failed"`

      - `Type WebSearchCall`

        - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

    - `type OpenAIResponseComputerToolCall 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`

      - `Action OpenAIResponseComputerToolCallActionUnion`

        A click action.

        - `type OpenAIResponseComputerToolCallActionActionClick struct{…}`

          A click action.

          - `Button string`

            - `const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"`

            - `const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"`

            - `const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"`

            - `const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"`

            - `const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"`

          - `Type Click`

            - `const ClickClick Click = "click"`

          - `X int64`

          - `Y int64`

        - `type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}`

          A double click action.

          - `Type DoubleClick`

            - `const DoubleClickDoubleClick DoubleClick = "double_click"`

          - `X int64`

          - `Y int64`

        - `type OpenAIResponseComputerToolCallActionActionDrag struct{…}`

          A drag action.

          - `Path []OpenAIResponseComputerToolCallActionActionDragPath`

            - `X int64`

            - `Y int64`

          - `Type Drag`

            - `const DragDrag Drag = "drag"`

        - `type OpenAIResponseComputerToolCallActionActionKeypress struct{…}`

          A collection of keypresses the model would like to perform.

          - `Keys []string`

          - `Type Keypress`

            - `const KeypressKeypress Keypress = "keypress"`

        - `type OpenAIResponseComputerToolCallActionActionMove struct{…}`

          A mouse move action.

          - `Type Move`

            - `const MoveMove Move = "move"`

          - `X int64`

          - `Y int64`

        - `type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}`

          A screenshot action.

          - `Type Screenshot`

            - `const ScreenshotScreenshot Screenshot = "screenshot"`

        - `type OpenAIResponseComputerToolCallActionActionScroll struct{…}`

          A scroll action.

          - `ScrollX int64`

          - `ScrollY int64`

          - `Type Scroll`

            - `const ScrollScroll Scroll = "scroll"`

          - `X int64`

          - `Y int64`

        - `type OpenAIResponseComputerToolCallActionActionType struct{…}`

          An action to type in text.

          - `Text string`

          - `Type Type`

            - `const TypeType Type = "type"`

        - `type OpenAIResponseComputerToolCallActionActionWait struct{…}`

          A wait action.

          - `Type Wait`

            - `const WaitWait Wait = "wait"`

      - `CallID string`

      - `PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck`

        - `ID string`

        - `Code string`

        - `Message string`

      - `Status OpenAIResponseComputerToolCallStatus`

        - `const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"`

        - `const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"`

        - `const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"`

      - `Type ComputerCall`

        - `const ComputerCallComputerCall ComputerCall = "computer_call"`

    - `type OpenAIResponseReasoningItem 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`

      - `Summary []OpenAIResponseReasoningItemSummary`

        - `Text string`

        - `Type SummaryText`

          - `const SummaryTextSummaryText SummaryText = "summary_text"`

      - `Type Reasoning`

        - `const ReasoningReasoning Reasoning = "reasoning"`

      - `Content []OpenAIResponseReasoningItemContent`

        - `Text string`

        - `Type ReasoningText`

          - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

      - `EncryptedContent string`

      - `Status OpenAIResponseReasoningItemStatus`

        - `const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"`

        - `const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"`

        - `const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"`

    - `type ResponseCompactionItem struct{…}`

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

      - `ID string`

      - `EncryptedContent string`

      - `Type Compaction`

        - `const CompactionCompaction Compaction = "compaction"`

      - `CreatedBy string`

    - `type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}`

      An image generation request made by the model.

      - `ID string`

      - `Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus`

        - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"`

        - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"`

        - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"`

        - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"`

      - `Type ImageGenerationCall`

        - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

      - `Result string`

    - `type OpenAIResponseCodeInterpreterToolCall struct{…}`

      A tool call to run code.

      - `ID string`

      - `ContainerID string`

      - `Status OpenAIResponseCodeInterpreterToolCallStatus`

        - `const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"`

        - `const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"`

        - `const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"`

        - `const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"`

        - `const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"`

      - `Type CodeInterpreterCall`

        - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `Code string`

      - `Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnion`

        - `type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}`

          The logs output from the code interpreter.

          - `Logs string`

          - `Type Logs`

            - `const LogsLogs Logs = "logs"`

        - `type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}`

          The image output from the code interpreter.

          - `Type Image`

            - `const ImageImage Image = "image"`

          - `URL string`

    - `type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}`

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

      - `ID string`

      - `Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction`

        Execute a shell command on the server.

        - `Command []string`

        - `Env map[string, string]`

        - `Type Exec`

          - `const ExecExec Exec = "exec"`

        - `TimeoutMs int64`

        - `User string`

        - `WorkingDirectory string`

      - `CallID string`

      - `Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus`

        - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"`

        - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"`

        - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"`

      - `Type LocalShellCall`

        - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

    - `type ResponseFunctionShellToolCall struct{…}`

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

      - `ID string`

      - `Action ResponseFunctionShellToolCallAction`

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

        - `Commands []string`

        - `MaxOutputLength int64`

        - `TimeoutMs int64`

      - `CallID string`

      - `Status ResponseFunctionShellToolCallStatus`

        - `const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"`

        - `const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"`

        - `const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"`

      - `Type ShellCall`

        - `const ShellCallShellCall ShellCall = "shell_call"`

      - `CreatedBy string`

      - `Environment ResponseFunctionShellToolCallEnvironmentUnion`

        Represents the use of a local environment to perform shell actions.

        - `type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}`

          Represents the use of a local environment to perform shell actions.

          - `Type Local`

            - `const LocalLocal Local = "local"`

        - `type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}`

          Represents a container created with /v1/containers.

          - `ContainerID string`

          - `Type ContainerReference`

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

    - `type ResponseFunctionShellToolCallOutput struct{…}`

      The output of a shell tool call that was emitted.

      - `ID string`

      - `CallID string`

      - `Output []ResponseFunctionShellToolCallOutputOutput`

        - `Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion`

          Indicates that the shell call exceeded its configured time limit.

          - `type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}`

            Indicates that the shell call exceeded its configured time limit.

            - `Type Timeout`

              - `const TimeoutTimeout Timeout = "timeout"`

          - `type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}`

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

            - `ExitCode int64`

            - `Type Exit`

              - `const ExitExit Exit = "exit"`

        - `Stderr string`

        - `Stdout string`

        - `CreatedBy string`

      - `Status ResponseFunctionShellToolCallOutputStatus`

        - `const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"`

        - `const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"`

        - `const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"`

      - `Type ShellCallOutput`

        - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

      - `CreatedBy string`

      - `MaxOutputLength int64`

    - `type ResponseApplyPatchToolCall struct{…}`

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

      - `ID string`

      - `CallID string`

      - `Operation ResponseApplyPatchToolCallOperationUnion`

        Instruction describing how to create a file via the apply_patch tool.

        - `type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}`

          Instruction describing how to create a file via the apply_patch tool.

          - `Diff string`

          - `Path string`

          - `Type CreateFile`

            - `const CreateFileCreateFile CreateFile = "create_file"`

        - `type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}`

          Instruction describing how to delete a file via the apply_patch tool.

          - `Path string`

          - `Type DeleteFile`

            - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

        - `type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}`

          Instruction describing how to update a file via the apply_patch tool.

          - `Diff string`

          - `Path string`

          - `Type UpdateFile`

            - `const UpdateFileUpdateFile UpdateFile = "update_file"`

      - `Status ResponseApplyPatchToolCallStatus`

        - `const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"`

        - `const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"`

      - `Type ApplyPatchCall`

        - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

      - `CreatedBy string`

    - `type ResponseApplyPatchToolCallOutput struct{…}`

      The output emitted by an apply patch tool call.

      - `ID string`

      - `CallID string`

      - `Status ResponseApplyPatchToolCallOutputStatus`

        - `const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"`

        - `const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"`

      - `Type ApplyPatchCallOutput`

        - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

      - `CreatedBy string`

      - `Output string`

    - `type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}`

      An invocation of a tool on an MCP server.

      - `ID string`

      - `Arguments string`

      - `Name string`

      - `ServerLabel string`

      - `Type McpCall`

        - `const McpCallMcpCall McpCall = "mcp_call"`

      - `ApprovalRequestID string`

      - `Error string`

      - `Output string`

      - `Status OpenAITypesResponsesResponseOutputItemMcpCallStatus`

        - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"`

        - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"`

        - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"`

        - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"`

        - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"`

    - `type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}`

      A list of tools available on an MCP server.

      - `ID string`

      - `ServerLabel string`

      - `Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool`

        - `InputSchema any`

        - `Name string`

        - `Annotations any`

        - `Description string`

      - `Type McpListTools`

        - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

      - `Error string`

    - `type McpApprovalRequest struct{…}`

      A request for human approval of a tool invocation.

      - `ID string`

      - `Arguments string`

      - `Name string`

      - `ServerLabel string`

      - `Type McpApprovalRequest`

        - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"`

    - `type OpenAIResponseCustomToolCall struct{…}`

      A call to a custom tool created by the model.

      - `CallID string`

      - `Input string`

      - `Name string`

      - `Type CustomToolCall`

        - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

      - `ID string`

  - `ParallelToolCalls bool`

  - `ToolChoice OpenAIResponseToolChoiceUnion`

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

    - `type OpenAIResponseToolChoiceString string`

      - `const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"`

      - `const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"`

      - `const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"`

    - `type ToolChoiceAllowed struct{…}`

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

      - `Mode ToolChoiceAllowedMode`

        - `const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"`

        - `const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"`

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

      - `Type AllowedTools`

        - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

    - `type ToolChoiceTypes 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 ToolChoiceTypesType`

        - `const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"`

        - `const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"`

        - `const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"`

        - `const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"`

        - `const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"`

        - `const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"`

    - `type ToolChoiceFunction struct{…}`

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

      - `Name string`

      - `Type Function`

        - `const FunctionFunction Function = "function"`

    - `type ToolChoiceMcp struct{…}`

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

      - `ServerLabel string`

      - `Type Mcp`

        - `const McpMcp Mcp = "mcp"`

      - `Name string`

    - `type ToolChoiceCustom struct{…}`

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

      - `Name string`

      - `Type Custom`

        - `const CustomCustom Custom = "custom"`

    - `type ToolChoiceApplyPatch struct{…}`

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

      - `Type ApplyPatch`

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

    - `type ToolChoiceShell struct{…}`

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

      - `Type Shell`

        - `const ShellShell Shell = "shell"`

  - `Tools []OpenAIResponseToolUnion`

    - `type FunctionTool 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`

      - `Type Function`

        - `const FunctionFunction Function = "function"`

      - `Description string`

      - `Parameters map[string, any]`

      - `Strict bool`

    - `type FileSearchTool 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`

        - `const FileSearchFileSearch FileSearch = "file_search"`

      - `VectorStoreIDs []string`

      - `Filters FileSearchToolFiltersUnion`

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

        - `type FileSearchToolFiltersComparisonFilter struct{…}`

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

          - `Key string`

          - `Type string`

            - `const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"`

            - `const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"`

            - `const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"`

            - `const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"`

            - `const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"`

            - `const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"`

          - `Value FileSearchToolFiltersComparisonFilterValueUnion`

            - `string`

            - `float64`

            - `bool`

            - `type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion`

              - `string`

              - `float64`

        - `type FileSearchToolFiltersCompoundFilter struct{…}`

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

          - `Filters []FileSearchToolFiltersCompoundFilterFilter`

            - `type FileSearchToolFiltersCompoundFilterFilter struct{…}`

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

              - `Key string`

              - `Type string`

                - `const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"`

                - `const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"`

                - `const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"`

                - `const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"`

                - `const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"`

                - `const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"`

              - `Value FileSearchToolFiltersCompoundFilterFilterValueUnion`

                - `string`

                - `float64`

                - `bool`

                - `type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion`

                  - `string`

                  - `float64`

          - `Type string`

            - `const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"`

            - `const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"`

      - `MaxNumResults int64`

      - `RankingOptions FileSearchToolRankingOptions`

        Ranking options for search.

        - `HybridSearch FileSearchToolRankingOptionsHybridSearch`

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

          - `EmbeddingWeight float64`

          - `TextWeight float64`

        - `Ranker string`

          - `const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"`

          - `const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"`

        - `ScoreThreshold float64`

    - `type ComputerTool 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`

      - `DisplayWidth int64`

      - `Environment ComputerToolEnvironment`

        - `const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"`

        - `const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"`

        - `const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"`

        - `const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"`

        - `const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"`

      - `Type ComputerUsePreview`

        - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

    - `type WebSearchTool 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 WebSearchToolType`

        - `const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"`

        - `const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"`

      - `Filters WebSearchToolFilters`

        Filters for the search.

        - `AllowedDomains []string`

      - `SearchContextSize WebSearchToolSearchContextSize`

        - `const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"`

        - `const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"`

        - `const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"`

      - `UserLocation WebSearchToolUserLocation`

        The approximate location of the user.

        - `City string`

        - `Country string`

        - `Region string`

        - `Timezone string`

        - `Type string`

          - `const WebSearchToolUserLocationTypeApproximate WebSearchToolUserLocationType = "approximate"`

    - `type OpenAIResponseToolMcp 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`

      - `Type Mcp`

        - `const McpMcp Mcp = "mcp"`

      - `AllowedTools OpenAIResponseToolMcpAllowedToolsUnion`

        A filter object to specify which tools are allowed.

        - `type OpenAIResponseToolMcpAllowedToolsArray []string`

        - `type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}`

          A filter object to specify which tools are allowed.

          - `ReadOnly bool`

          - `ToolNames []string`

      - `Authorization string`

      - `ConnectorID string`

        - `const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"`

        - `const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"`

        - `const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"`

        - `const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"`

        - `const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"`

        - `const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"`

        - `const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"`

        - `const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"`

      - `Headers map[string, string]`

      - `RequireApproval OpenAIResponseToolMcpRequireApprovalUnion`

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

        Can be
        `always`, `never`, or a filter object associated with tools
        that require approval.

        - `type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter 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 OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlways`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

            - `ToolNames []string`

          - `Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNever`

            A filter object to specify which tools are allowed.

            - `ReadOnly bool`

            - `ToolNames []string`

        - `type OpenAIResponseToolMcpRequireApprovalString string`

          - `const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"`

          - `const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"`

      - `ServerDescription string`

      - `ServerURL string`

    - `type OpenAIResponseToolCodeInterpreter struct{…}`

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

      - `Container OpenAIResponseToolCodeInterpreterContainerUnion`

        Configuration for a code interpreter container.

        Optionally specify the IDs of the files to run the code on.

        - `string`

        - `type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}`

          Configuration for a code interpreter container.

          Optionally specify the IDs of the files to run the code on.

          - `Type Auto`

            - `const AutoAuto Auto = "auto"`

          - `FileIDs []string`

          - `MemoryLimit string`

            - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

            - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

            - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

            - `const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

          - `NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

            - `type ContainerNetworkPolicyDisabled struct{…}`

              - `Type Disabled`

                - `const DisabledDisabled Disabled = "disabled"`

            - `type ContainerNetworkPolicyAllowlist struct{…}`

              - `AllowedDomains []string`

              - `Type Allowlist`

                - `const AllowlistAllowlist Allowlist = "allowlist"`

              - `DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecret`

                - `Domain string`

                - `Name string`

                - `Value string`

      - `Type CodeInterpreter`

        - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

    - `type OpenAIResponseToolImageGeneration struct{…}`

      A tool that generates images using the GPT image models.

      - `Type ImageGeneration`

        - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"`

      - `Action string`

        - `const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"`

        - `const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"`

        - `const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"`

      - `Background string`

        - `const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"`

        - `const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"`

        - `const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"`

      - `InputFidelity string`

        - `const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"`

        - `const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"`

      - `InputImageMask OpenAIResponseToolImageGenerationInputImageMask`

        Optional mask for inpainting.

        Contains `image_url`
        (string, optional) and `file_id` (string, optional).

        - `FileID string`

        - `ImageURL string`

      - `Model string`

        - `string`

        - `string`

          - `const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"`

          - `const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"`

          - `const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"`

      - `Moderation string`

        - `const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"`

        - `const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"`

      - `OutputCompression int64`

      - `OutputFormat string`

        - `const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"`

        - `const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"`

        - `const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"`

      - `PartialImages int64`

      - `Quality string`

        - `const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"`

        - `const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"`

        - `const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"`

        - `const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"`

      - `Size string`

        - `const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"`

        - `const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"`

        - `const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"`

        - `const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"`

    - `type OpenAIResponseToolLocalShell struct{…}`

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

      - `Type LocalShell`

        - `const LocalShellLocalShell LocalShell = "local_shell"`

    - `type FunctionShellTool struct{…}`

      A tool that allows the model to execute shell commands.

      - `Type Shell`

        - `const ShellShell Shell = "shell"`

      - `Environment FunctionShellToolEnvironmentUnion`

        - `type FunctionShellToolEnvironmentContainerAuto struct{…}`

          - `Type ContainerAuto`

            - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"`

          - `FileIDs []string`

          - `MemoryLimit string`

            - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"`

            - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"`

            - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"`

            - `const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"`

          - `NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnion`

            - `type ContainerNetworkPolicyDisabled struct{…}`

            - `type ContainerNetworkPolicyAllowlist struct{…}`

          - `Skills []FunctionShellToolEnvironmentContainerAutoSkillUnion`

            - `type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}`

              - `SkillID string`

              - `Type SkillReference`

                - `const SkillReferenceSkillReference SkillReference = "skill_reference"`

              - `Version string`

            - `type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}`

              - `Description string`

              - `Name string`

              - `Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource`

                Inline skill payload

                - `Data string`

                - `MediaType ApplicationZip`

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

                - `Type Base64`

                  - `const Base64Base64 Base64 = "base64"`

              - `Type Inline`

                - `const InlineInline Inline = "inline"`

        - `type LocalEnvironment struct{…}`

          - `Type Local`

            - `const LocalLocal Local = "local"`

          - `Skills []LocalEnvironmentSkill`

            - `Description string`

            - `Name string`

            - `Path string`

        - `type ContainerReference struct{…}`

          - `ContainerID string`

          - `Type ContainerReference`

            - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

    - `type CustomTool 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`

      - `Type Custom`

        - `const CustomCustom Custom = "custom"`

      - `Description string`

      - `Format CustomToolFormatUnion`

        Unconstrained free-form text.

        - `type CustomToolFormatText struct{…}`

          Unconstrained free-form text.

          - `Type Text`

            - `const TextText Text = "text"`

        - `type CustomToolFormatGrammar struct{…}`

          A grammar defined by the user.

          - `Definition string`

          - `Syntax string`

            - `const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"`

            - `const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"`

          - `Type Grammar`

            - `const GrammarGrammar Grammar = "grammar"`

    - `type WebSearchPreviewTool 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 WebSearchPreviewToolType`

        - `const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"`

        - `const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"`

      - `SearchContextSize WebSearchPreviewToolSearchContextSize`

        - `const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"`

        - `const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"`

        - `const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"`

      - `UserLocation WebSearchPreviewToolUserLocation`

        The user's location.

        - `Type Approximate`

          - `const ApproximateApproximate Approximate = "approximate"`

        - `City string`

        - `Country string`

        - `Region string`

        - `Timezone string`

    - `type ApplyPatchTool struct{…}`

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

      - `Type ApplyPatch`

        - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

  - `Background bool`

  - `CompletedAt float64`

  - `Conversation Conversation`

    The conversation that this response belonged to.

    Input items and output items from this response were automatically added to this conversation.

    - `ID string`

  - `Error OpenAIResponseError`

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

    - `Code OpenAIResponseErrorCode`

      - `const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"`

      - `const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"`

      - `const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"`

      - `const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"`

      - `const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"`

      - `const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"`

      - `const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"`

      - `const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"`

      - `const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"`

      - `const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"`

      - `const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"`

      - `const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"`

      - `const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"`

      - `const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"`

      - `const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"`

      - `const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"`

      - `const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"`

      - `const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"`

    - `Message string`

  - `IncompleteDetails IncompleteDetails`

    Details about why the response is incomplete.

    - `Reason IncompleteDetailsReason`

      - `const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"`

      - `const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"`

  - `Instructions OpenAIResponseInstructionsUnion`

    - `string`

    - `type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion`

      - `type EasyInputMessage 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 EasyInputMessageContentUnion`

          - `string`

          - `type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion`

            - `type OpenAIResponseInputText struct{…}`

              A text input to the model.

              - `Text string`

              - `Type InputText`

                - `const InputTextInputText InputText = "input_text"`

            - `type OpenAIResponseInputImage struct{…}`

              An image input to the model.

              Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

              - `Detail OpenAIResponseInputImageDetail`

                - `const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"`

                - `const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"`

                - `const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"`

              - `Type InputImage`

                - `const InputImageInputImage InputImage = "input_image"`

              - `FileID string`

              - `ImageURL string`

            - `type OpenAIResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                - `const InputFileInputFile InputFile = "input_file"`

              - `FileData string`

              - `FileID string`

              - `FileURL string`

              - `Filename string`

        - `Role EasyInputMessageRole`

          - `const EasyInputMessageRoleUser EasyInputMessageRole = "user"`

          - `const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"`

          - `const EasyInputMessageRoleSystem EasyInputMessageRole = "system"`

          - `const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"`

        - `Phase EasyInputMessagePhase`

          - `const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"`

          - `const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"`

        - `Type EasyInputMessageType`

          - `const EasyInputMessageTypeMessage EasyInputMessageType = "message"`

      - `type OpenAITypesResponsesResponseInputItemMessage 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 []OpenAITypesResponsesResponseInputItemMessageContentUnion`

          - `type OpenAIResponseInputText struct{…}`

            A text input to the model.

          - `type OpenAIResponseInputImage struct{…}`

            An image input to the model.

            Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

          - `type OpenAIResponseInputFile struct{…}`

            A file input to the model.

        - `Role OpenAITypesResponsesResponseInputItemMessageRole`

          - `const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"`

          - `const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"`

          - `const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"`

        - `Status OpenAITypesResponsesResponseInputItemMessageStatus`

          - `const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"`

          - `const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"`

        - `Type OpenAITypesResponsesResponseInputItemMessageType`

          - `const OpenAITypesResponsesResponseInputItemMessageTypeMessage OpenAITypesResponsesResponseInputItemMessageType = "message"`

      - `type OpenAIResponseOutputMessage struct{…}`

        An output message from the model.

      - `type OpenAIResponseFileSearchToolCall 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 OpenAIResponseComputerToolCall 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 OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

        - `Output ResponseComputerToolCallOutputScreenshot`

          A computer screenshot image used with the computer use tool.

          - `Type ComputerScreenshot`

            - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

          - `FileID string`

          - `ImageURL string`

        - `Type ComputerCallOutput`

          - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

        - `ID string`

        - `AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

          - `ID string`

          - `Code string`

          - `Message string`

        - `Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatus`

          - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"`

          - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type OpenAIResponseFunctionWebSearch 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 OpenAIResponseFunctionToolCall 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 OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `CallID string`

        - `Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion`

          - `string`

          - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion`

            - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}`

              A text input to the model.

              - `Text string`

              - `Type InputText`

                - `const InputTextInputText InputText = "input_text"`

            - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}`

              An image input to the model.

              Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

              - `Type InputImage`

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail string`

                - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"`

                - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"`

                - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"`

              - `FileID string`

              - `ImageURL string`

            - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                - `const InputFileInputFile InputFile = "input_file"`

              - `FileData string`

              - `FileID string`

              - `FileURL string`

              - `Filename string`

        - `Type FunctionCallOutput`

          - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

        - `ID string`

        - `Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus`

          - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type OpenAIResponseReasoningItem 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 ResponseCompactionItemParamResp struct{…}`

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

        - `EncryptedContent string`

        - `Type Compaction`

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

      - `type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}`

        An image generation request made by the model.

        - `ID string`

        - `Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus`

          - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"`

          - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"`

          - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Result string`

      - `type OpenAIResponseCodeInterpreterToolCall struct{…}`

        A tool call to run code.

      - `type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

        - `Action OpenAITypesResponsesResponseInputItemLocalShellCallAction`

          Execute a shell command on the server.

          - `Command []string`

          - `Env map[string, string]`

          - `Type Exec`

            - `const ExecExec Exec = "exec"`

          - `TimeoutMs int64`

          - `User string`

          - `WorkingDirectory string`

        - `CallID string`

        - `Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus`

          - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"`

          - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}`

        The output of a local shell tool call.

        - `ID string`

        - `Output string`

        - `Type LocalShellCallOutput`

          - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

        - `Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus`

          - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type ShellCall struct{…}`

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

        - `Action ShellCallAction`

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

          - `Commands []string`

          - `MaxOutputLength int64`

          - `TimeoutMs int64`

        - `CallID string`

        - `Type ShellCall`

          - `const ShellCallShellCall ShellCall = "shell_call"`

        - `ID string`

        - `Environment ShellCallEnvironmentUnion`

          - `type LocalEnvironment struct{…}`

          - `type ContainerReference struct{…}`

        - `Status ShellCallStatus`

          - `const ShellCallStatusInProgress ShellCallStatus = "in_progress"`

          - `const ShellCallStatusCompleted ShellCallStatus = "completed"`

          - `const ShellCallStatusIncomplete ShellCallStatus = "incomplete"`

      - `type ShellCallOutput struct{…}`

        The streamed output items emitted by a shell tool call.

        - `CallID string`

        - `Output []ShellCallOutputOutput`

          - `Outcome ShellCallOutputOutputOutcomeUnion`

            Indicates that the shell call exceeded its configured time limit.

            - `type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type ShellCallOutputOutputOutcomeOutcomeExit struct{…}`

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

              - `ExitCode int64`

              - `Type Exit`

                - `const ExitExit Exit = "exit"`

          - `Stderr string`

          - `Stdout string`

        - `Type ShellCallOutput`

          - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

        - `ID string`

        - `MaxOutputLength int64`

        - `Status ShellCallOutputStatus`

          - `const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"`

          - `const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"`

          - `const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"`

      - `type ApplyPatchCall struct{…}`

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

        - `CallID string`

        - `Operation ApplyPatchCallOperationUnion`

          Instruction for creating a new file via the apply_patch tool.

          - `type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

            - `Path string`

            - `Type CreateFile`

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}`

            Instruction for deleting an existing file via the apply_patch tool.

            - `Path string`

            - `Type DeleteFile`

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

            - `Path string`

            - `Type UpdateFile`

              - `const UpdateFileUpdateFile UpdateFile = "update_file"`

        - `Status ApplyPatchCallStatus`

          - `const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"`

          - `const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"`

        - `Type ApplyPatchCall`

          - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

        - `ID string`

      - `type ApplyPatchCallOutput struct{…}`

        The streamed output emitted by an apply patch tool call.

        - `CallID string`

        - `Status ApplyPatchCallOutputStatus`

          - `const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"`

          - `const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"`

        - `Type ApplyPatchCallOutput`

          - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

        - `ID string`

        - `Output string`

      - `type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}`

        A list of tools available on an MCP server.

        - `ID string`

        - `ServerLabel string`

        - `Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool`

          - `InputSchema any`

          - `Name string`

          - `Annotations any`

          - `Description string`

        - `Type McpListTools`

          - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

        - `Error string`

      - `type McpApprovalRequest struct{…}`

        A request for human approval of a tool invocation.

      - `type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}`

        A response to an MCP approval request.

        - `ApprovalRequestID string`

        - `Approve bool`

        - `Type McpApprovalResponse`

          - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

        - `ID string`

        - `Reason string`

      - `type OpenAITypesResponsesResponseInputItemMcpCall struct{…}`

        An invocation of a tool on an MCP server.

        - `ID string`

        - `Arguments string`

        - `Name string`

        - `ServerLabel string`

        - `Type McpCall`

          - `const McpCallMcpCall McpCall = "mcp_call"`

        - `ApprovalRequestID string`

        - `Error string`

        - `Output string`

        - `Status OpenAITypesResponsesResponseInputItemMcpCallStatus`

          - `const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"`

          - `const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"`

          - `const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"`

          - `const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"`

          - `const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"`

      - `type OpenAIResponseCustomToolCallOutput struct{…}`

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

        - `CallID string`

        - `Output OpenAIResponseCustomToolCallOutputOutputUnion`

          - `string`

          - `type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            - `type OpenAIResponseInputText struct{…}`

              A text input to the model.

            - `type OpenAIResponseInputImage struct{…}`

              An image input to the model.

              Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

            - `type OpenAIResponseInputFile struct{…}`

              A file input to the model.

        - `Type CustomToolCallOutput`

          - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

        - `ID string`

      - `type OpenAIResponseCustomToolCall struct{…}`

        A call to a custom tool created by the model.

      - `type OpenAITypesResponsesResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

        - `Type OpenAITypesResponsesResponseInputItemItemReferenceType`

          - `const OpenAITypesResponsesResponseInputItemItemReferenceTypeItemReference OpenAITypesResponsesResponseInputItemItemReferenceType = "item_reference"`

  - `MaxOutputTokens int64`

  - `MaxToolCalls int64`

  - `Metadata map[string, string]`

  - `PreviousResponseID string`

  - `Prompt OpenAIResponsePrompt`

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

    - `ID string`

    - `Variables map[string, OpenAIResponsePromptVariableUnion]`

      - `string`

      - `type OpenAIResponseInputText struct{…}`

        A text input to the model.

      - `type OpenAIResponseInputImage struct{…}`

        An image input to the model.

        Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `type OpenAIResponseInputFile struct{…}`

        A file input to the model.

    - `Version string`

  - `PromptCacheKey string`

  - `PromptCacheRetention OpenAIResponsePromptCacheRetention`

    - `const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"`

    - `const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"`

  - `Reasoning Reasoning`

    **gpt-5 and o-series models only**

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

    - `Effort ReasoningEffort`

      - `const ReasoningEffortNone ReasoningEffort = "none"`

      - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`

      - `const ReasoningEffortLow ReasoningEffort = "low"`

      - `const ReasoningEffortMedium ReasoningEffort = "medium"`

      - `const ReasoningEffortHigh ReasoningEffort = "high"`

      - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`

    - `GenerateSummary ReasoningGenerateSummary`

      - `const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"`

      - `const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"`

      - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"`

    - `Summary ReasoningSummary`

      - `const ReasoningSummaryAuto ReasoningSummary = "auto"`

      - `const ReasoningSummaryConcise ReasoningSummary = "concise"`

      - `const ReasoningSummaryDetailed ReasoningSummary = "detailed"`

  - `SafetyIdentifier string`

  - `ServiceTier OpenAIResponseServiceTier`

    - `const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"`

    - `const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"`

    - `const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"`

    - `const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"`

    - `const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"`

  - `Status OpenAIResponseStatus`

    - `const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"`

    - `const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"`

    - `const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"`

    - `const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"`

    - `const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"`

    - `const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"`

  - `Temperature float64`

  - `Text OpenAIResponseTextConfig`

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

      Default response format. Used to generate text responses.

      - `type OpenAIResponseTextConfigFormatResponseFormatText struct{…}`

        Default response format. Used to generate text responses.

        - `Type Text`

          - `const TextText Text = "text"`

      - `type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig 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`

        - `Schema map[string, any]`

        - `Type JsonSchema`

          - `const JsonSchemaJsonSchema JsonSchema = "json_schema"`

        - `Description string`

        - `Strict bool`

      - `type OpenAIResponseTextConfigFormatResponseFormatJsonObject 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`

          - `const JsonObjectJsonObject JsonObject = "json_object"`

    - `Verbosity OpenAIResponseTextConfigVerbosity`

      - `const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"`

      - `const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"`

      - `const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"`

  - `TopLogprobs int64`

  - `TopP float64`

  - `Truncation OpenAIResponseTruncation`

    - `const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"`

    - `const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"`

  - `Usage OpenAIResponseUsage`

    Represents token usage details including input tokens, output tokens,
    a breakdown of output tokens, and the total tokens used.

    - `InputTokens int64`

    - `InputTokensDetails OpenAIResponseUsageInputTokensDetails`

      A detailed breakdown of the input tokens.

      - `CachedTokens int64`

    - `OutputTokens int64`

    - `OutputTokensDetails OpenAIResponseUsageOutputTokensDetails`

      A detailed breakdown of the output tokens.

      - `ReasoningTokens int64`

    - `TotalTokens int64`

  - `User string`

### OpenAI Response Code Interpreter Tool Call

- `type OpenAIResponseCodeInterpreterToolCall struct{…}`

  A tool call to run code.

  - `ID string`

  - `ContainerID string`

  - `Status OpenAIResponseCodeInterpreterToolCallStatus`

    - `const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"`

    - `const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"`

    - `const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"`

    - `const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"`

    - `const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"`

  - `Type CodeInterpreterCall`

    - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

  - `Code string`

  - `Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnion`

    - `type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}`

      The logs output from the code interpreter.

      - `Logs string`

      - `Type Logs`

        - `const LogsLogs Logs = "logs"`

    - `type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}`

      The image output from the code interpreter.

      - `Type Image`

        - `const ImageImage Image = "image"`

      - `URL string`

### OpenAI Response Computer Tool Call

- `type OpenAIResponseComputerToolCall 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`

  - `Action OpenAIResponseComputerToolCallActionUnion`

    A click action.

    - `type OpenAIResponseComputerToolCallActionActionClick struct{…}`

      A click action.

      - `Button string`

        - `const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"`

        - `const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"`

        - `const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"`

        - `const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"`

        - `const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"`

      - `Type Click`

        - `const ClickClick Click = "click"`

      - `X int64`

      - `Y int64`

    - `type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}`

      A double click action.

      - `Type DoubleClick`

        - `const DoubleClickDoubleClick DoubleClick = "double_click"`

      - `X int64`

      - `Y int64`

    - `type OpenAIResponseComputerToolCallActionActionDrag struct{…}`

      A drag action.

      - `Path []OpenAIResponseComputerToolCallActionActionDragPath`

        - `X int64`

        - `Y int64`

      - `Type Drag`

        - `const DragDrag Drag = "drag"`

    - `type OpenAIResponseComputerToolCallActionActionKeypress struct{…}`

      A collection of keypresses the model would like to perform.

      - `Keys []string`

      - `Type Keypress`

        - `const KeypressKeypress Keypress = "keypress"`

    - `type OpenAIResponseComputerToolCallActionActionMove struct{…}`

      A mouse move action.

      - `Type Move`

        - `const MoveMove Move = "move"`

      - `X int64`

      - `Y int64`

    - `type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}`

      A screenshot action.

      - `Type Screenshot`

        - `const ScreenshotScreenshot Screenshot = "screenshot"`

    - `type OpenAIResponseComputerToolCallActionActionScroll struct{…}`

      A scroll action.

      - `ScrollX int64`

      - `ScrollY int64`

      - `Type Scroll`

        - `const ScrollScroll Scroll = "scroll"`

      - `X int64`

      - `Y int64`

    - `type OpenAIResponseComputerToolCallActionActionType struct{…}`

      An action to type in text.

      - `Text string`

      - `Type Type`

        - `const TypeType Type = "type"`

    - `type OpenAIResponseComputerToolCallActionActionWait struct{…}`

      A wait action.

      - `Type Wait`

        - `const WaitWait Wait = "wait"`

  - `CallID string`

  - `PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck`

    - `ID string`

    - `Code string`

    - `Message string`

  - `Status OpenAIResponseComputerToolCallStatus`

    - `const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"`

    - `const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"`

    - `const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"`

  - `Type ComputerCall`

    - `const ComputerCallComputerCall ComputerCall = "computer_call"`

### OpenAI Response Custom Tool Call

- `type OpenAIResponseCustomToolCall struct{…}`

  A call to a custom tool created by the model.

  - `CallID string`

  - `Input string`

  - `Name string`

  - `Type CustomToolCall`

    - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"`

  - `ID string`

### OpenAI Response Custom Tool Call Output

- `type OpenAIResponseCustomToolCallOutput struct{…}`

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

  - `CallID string`

  - `Output OpenAIResponseCustomToolCallOutputOutputUnion`

    - `string`

    - `type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion`

      - `type OpenAIResponseInputText struct{…}`

        A text input to the model.

        - `Text string`

        - `Type InputText`

          - `const InputTextInputText InputText = "input_text"`

      - `type OpenAIResponseInputImage struct{…}`

        An image input to the model.

        Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        - `Detail OpenAIResponseInputImageDetail`

          - `const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"`

          - `const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"`

          - `const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"`

        - `Type InputImage`

          - `const InputImageInputImage InputImage = "input_image"`

        - `FileID string`

        - `ImageURL string`

      - `type OpenAIResponseInputFile struct{…}`

        A file input to the model.

        - `Type InputFile`

          - `const InputFileInputFile InputFile = "input_file"`

        - `FileData string`

        - `FileID string`

        - `FileURL string`

        - `Filename string`

  - `Type CustomToolCallOutput`

    - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"`

  - `ID string`

### OpenAI Response Error

- `type OpenAIResponseError struct{…}`

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

  - `Code OpenAIResponseErrorCode`

    - `const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"`

    - `const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"`

    - `const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"`

    - `const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"`

    - `const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"`

    - `const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"`

    - `const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"`

    - `const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"`

    - `const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"`

    - `const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"`

    - `const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"`

    - `const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"`

    - `const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"`

    - `const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"`

    - `const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"`

    - `const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"`

    - `const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"`

    - `const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"`

  - `Message string`

### OpenAI Response File Search Tool Call

- `type OpenAIResponseFileSearchToolCall 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`

  - `Queries []string`

  - `Status OpenAIResponseFileSearchToolCallStatus`

    - `const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"`

    - `const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"`

    - `const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"`

    - `const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"`

    - `const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"`

  - `Type FileSearchCall`

    - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

  - `Results []OpenAIResponseFileSearchToolCallResult`

    - `Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]`

      - `string`

      - `float64`

      - `bool`

    - `FileID string`

    - `Filename string`

    - `Score float64`

    - `Text string`

### OpenAI Response Function Tool Call

- `type OpenAIResponseFunctionToolCall 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`

  - `CallID string`

  - `Name string`

  - `Type FunctionCall`

    - `const FunctionCallFunctionCall FunctionCall = "function_call"`

  - `ID string`

  - `Status OpenAIResponseFunctionToolCallStatus`

    - `const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"`

    - `const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"`

    - `const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"`

### OpenAI Response Function Web Search

- `type OpenAIResponseFunctionWebSearch 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`

  - `Action OpenAIResponseFunctionWebSearchActionUnion`

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

    - `type OpenAIResponseFunctionWebSearchActionActionSearch struct{…}`

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

      - `Query string`

      - `Type Search`

        - `const SearchSearch Search = "search"`

      - `Queries []string`

      - `Sources []OpenAIResponseFunctionWebSearchActionActionSearchSource`

        - `Type URL`

          - `const URLURL URL = "url"`

        - `URL string`

    - `type OpenAIResponseFunctionWebSearchActionActionOpenPage struct{…}`

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

      - `Type OpenPage`

        - `const OpenPageOpenPage OpenPage = "open_page"`

      - `URL string`

    - `type OpenAIResponseFunctionWebSearchActionActionFind struct{…}`

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

      - `Pattern string`

      - `Type FindInPage`

        - `const FindInPageFindInPage FindInPage = "find_in_page"`

      - `URL string`

  - `Status OpenAIResponseFunctionWebSearchStatus`

    - `const OpenAIResponseFunctionWebSearchStatusInProgress OpenAIResponseFunctionWebSearchStatus = "in_progress"`

    - `const OpenAIResponseFunctionWebSearchStatusSearching OpenAIResponseFunctionWebSearchStatus = "searching"`

    - `const OpenAIResponseFunctionWebSearchStatusCompleted OpenAIResponseFunctionWebSearchStatus = "completed"`

    - `const OpenAIResponseFunctionWebSearchStatusFailed OpenAIResponseFunctionWebSearchStatus = "failed"`

  - `Type WebSearchCall`

    - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

### OpenAI Response Input File

- `type OpenAIResponseInputFile struct{…}`

  A file input to the model.

  - `Type InputFile`

    - `const InputFileInputFile InputFile = "input_file"`

  - `FileData string`

  - `FileID string`

  - `FileURL string`

  - `Filename string`

### OpenAI Response Input File Param

- `type OpenAIResponseInputFileParamResp struct{…}`

  A file input to the model.

  - `Type InputFile`

    - `const InputFileInputFile InputFile = "input_file"`

  - `FileData string`

  - `FileID string`

  - `FileURL string`

  - `Filename string`

### OpenAI Response Input Image

- `type OpenAIResponseInputImage struct{…}`

  An image input to the model.

  Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

  - `Detail OpenAIResponseInputImageDetail`

    - `const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"`

    - `const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"`

    - `const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"`

  - `Type InputImage`

    - `const InputImageInputImage InputImage = "input_image"`

  - `FileID string`

  - `ImageURL string`

### OpenAI Response Input Image Param

- `type OpenAIResponseInputImageParamResp struct{…}`

  An image input to the model.

  Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

  - `Detail OpenAIResponseInputImageParamDetail`

    - `const OpenAIResponseInputImageParamDetailLow OpenAIResponseInputImageParamDetail = "low"`

    - `const OpenAIResponseInputImageParamDetailHigh OpenAIResponseInputImageParamDetail = "high"`

    - `const OpenAIResponseInputImageParamDetailAuto OpenAIResponseInputImageParamDetail = "auto"`

  - `Type InputImage`

    - `const InputImageInputImage InputImage = "input_image"`

  - `FileID string`

  - `ImageURL string`

### OpenAI Response Input Text

- `type OpenAIResponseInputText struct{…}`

  A text input to the model.

  - `Text string`

  - `Type InputText`

    - `const InputTextInputText InputText = "input_text"`

### OpenAI Response Input Text Param

- `type OpenAIResponseInputTextParamResp struct{…}`

  A text input to the model.

  - `Text string`

  - `Type InputText`

    - `const InputTextInputText InputText = "input_text"`

### OpenAI Response Output Message

- `type OpenAIResponseOutputMessage struct{…}`

  An output message from the model.

  - `ID string`

  - `Content []OpenAIResponseOutputMessageContentUnion`

    - `type OpenAIResponseOutputText struct{…}`

      A text output from the model.

      - `Annotations []OpenAIResponseOutputTextAnnotationUnion`

        - `type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}`

          A citation to a file.

          - `FileID string`

          - `Filename string`

          - `Index int64`

          - `Type FileCitation`

            - `const FileCitationFileCitation FileCitation = "file_citation"`

        - `type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}`

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

          - `EndIndex int64`

          - `StartIndex int64`

          - `Title string`

          - `Type URLCitation`

            - `const URLCitationURLCitation URLCitation = "url_citation"`

          - `URL string`

        - `type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}`

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

          - `ContainerID string`

          - `EndIndex int64`

          - `FileID string`

          - `Filename string`

          - `StartIndex int64`

          - `Type ContainerFileCitation`

            - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

        - `type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}`

          A path to a file.

          - `FileID string`

          - `Index int64`

          - `Type FilePath`

            - `const FilePathFilePath FilePath = "file_path"`

      - `Text string`

      - `Type OutputText`

        - `const OutputTextOutputText OutputText = "output_text"`

      - `Logprobs []OpenAIResponseOutputTextLogprob`

        - `Token string`

        - `Bytes []int64`

        - `Logprob float64`

        - `TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob`

          - `Token string`

          - `Bytes []int64`

          - `Logprob float64`

    - `type OpenAIResponseOutputRefusal struct{…}`

      A refusal from the model.

      - `Refusal string`

      - `Type Refusal`

        - `const RefusalRefusal Refusal = "refusal"`

  - `Role Assistant`

    - `const AssistantAssistant Assistant = "assistant"`

  - `Status OpenAIResponseOutputMessageStatus`

    - `const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"`

    - `const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"`

    - `const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"`

  - `Type Message`

    - `const MessageMessage Message = "message"`

  - `Phase OpenAIResponseOutputMessagePhase`

    - `const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"`

    - `const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"`

### OpenAI Response Output Refusal

- `type OpenAIResponseOutputRefusal struct{…}`

  A refusal from the model.

  - `Refusal string`

  - `Type Refusal`

    - `const RefusalRefusal Refusal = "refusal"`

### OpenAI Response Output Text

- `type OpenAIResponseOutputText struct{…}`

  A text output from the model.

  - `Annotations []OpenAIResponseOutputTextAnnotationUnion`

    - `type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}`

      A citation to a file.

      - `FileID string`

      - `Filename string`

      - `Index int64`

      - `Type FileCitation`

        - `const FileCitationFileCitation FileCitation = "file_citation"`

    - `type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}`

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

      - `EndIndex int64`

      - `StartIndex int64`

      - `Title string`

      - `Type URLCitation`

        - `const URLCitationURLCitation URLCitation = "url_citation"`

      - `URL string`

    - `type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}`

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

      - `ContainerID string`

      - `EndIndex int64`

      - `FileID string`

      - `Filename string`

      - `StartIndex int64`

      - `Type ContainerFileCitation`

        - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"`

    - `type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}`

      A path to a file.

      - `FileID string`

      - `Index int64`

      - `Type FilePath`

        - `const FilePathFilePath FilePath = "file_path"`

  - `Text string`

  - `Type OutputText`

    - `const OutputTextOutputText OutputText = "output_text"`

  - `Logprobs []OpenAIResponseOutputTextLogprob`

    - `Token string`

    - `Bytes []int64`

    - `Logprob float64`

    - `TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob`

      - `Token string`

      - `Bytes []int64`

      - `Logprob float64`

### OpenAI Response Prompt

- `type OpenAIResponsePrompt 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`

  - `Variables map[string, OpenAIResponsePromptVariableUnion]`

    - `string`

    - `type OpenAIResponseInputText struct{…}`

      A text input to the model.

      - `Text string`

      - `Type InputText`

        - `const InputTextInputText InputText = "input_text"`

    - `type OpenAIResponseInputImage struct{…}`

      An image input to the model.

      Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `Detail OpenAIResponseInputImageDetail`

        - `const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"`

        - `const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"`

        - `const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"`

      - `Type InputImage`

        - `const InputImageInputImage InputImage = "input_image"`

      - `FileID string`

      - `ImageURL string`

    - `type OpenAIResponseInputFile struct{…}`

      A file input to the model.

      - `Type InputFile`

        - `const InputFileInputFile InputFile = "input_file"`

      - `FileData string`

      - `FileID string`

      - `FileURL string`

      - `Filename string`

  - `Version string`

### OpenAI Response Reasoning Item

- `type OpenAIResponseReasoningItem 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`

  - `Summary []OpenAIResponseReasoningItemSummary`

    - `Text string`

    - `Type SummaryText`

      - `const SummaryTextSummaryText SummaryText = "summary_text"`

  - `Type Reasoning`

    - `const ReasoningReasoning Reasoning = "reasoning"`

  - `Content []OpenAIResponseReasoningItemContent`

    - `Text string`

    - `Type ReasoningText`

      - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

  - `EncryptedContent string`

  - `Status OpenAIResponseReasoningItemStatus`

    - `const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"`

    - `const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"`

    - `const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"`

### OpenAI Response Text Config

- `type OpenAIResponseTextConfig 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 OpenAIResponseTextConfigFormatUnion`

    Default response format. Used to generate text responses.

    - `type OpenAIResponseTextConfigFormatResponseFormatText struct{…}`

      Default response format. Used to generate text responses.

      - `Type Text`

        - `const TextText Text = "text"`

    - `type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig 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`

      - `Schema map[string, any]`

      - `Type JsonSchema`

        - `const JsonSchemaJsonSchema JsonSchema = "json_schema"`

      - `Description string`

      - `Strict bool`

    - `type OpenAIResponseTextConfigFormatResponseFormatJsonObject 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`

        - `const JsonObjectJsonObject JsonObject = "json_object"`

  - `Verbosity OpenAIResponseTextConfigVerbosity`

    - `const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"`

    - `const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"`

    - `const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"`

### OpenAI Response Usage

- `type OpenAIResponseUsage struct{…}`

  Represents token usage details including input tokens, output tokens,
  a breakdown of output tokens, and the total tokens used.

  - `InputTokens int64`

  - `InputTokensDetails OpenAIResponseUsageInputTokensDetails`

    A detailed breakdown of the input tokens.

    - `CachedTokens int64`

  - `OutputTokens int64`

  - `OutputTokensDetails OpenAIResponseUsageOutputTokensDetails`

    A detailed breakdown of the output tokens.

    - `ReasoningTokens int64`

  - `TotalTokens int64`

### OpenAI Types Responses Response Input Item Computer Call Output

- `type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}`

  The output of a computer tool call.

  - `CallID string`

  - `Output ResponseComputerToolCallOutputScreenshot`

    A computer screenshot image used with the computer use tool.

    - `Type ComputerScreenshot`

      - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

    - `FileID string`

    - `ImageURL string`

  - `Type ComputerCallOutput`

    - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"`

  - `ID string`

  - `AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

    - `ID string`

    - `Code string`

    - `Message string`

  - `Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatus`

    - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"`

    - `const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"`

### OpenAI Types Responses Response Input Item Function Call Output

- `type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}`

  The output of a function tool call.

  - `CallID string`

  - `Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion`

    - `string`

    - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion`

      - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}`

        A text input to the model.

        - `Text string`

        - `Type InputText`

          - `const InputTextInputText InputText = "input_text"`

      - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}`

        An image input to the model.

        Learn about [image inputs](https://platform.openai.com/docs/guides/vision)

        - `Type InputImage`

          - `const InputImageInputImage InputImage = "input_image"`

        - `Detail string`

          - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"`

          - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"`

          - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"`

        - `FileID string`

        - `ImageURL string`

      - `type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}`

        A file input to the model.

        - `Type InputFile`

          - `const InputFileInputFile InputFile = "input_file"`

        - `FileData string`

        - `FileID string`

        - `FileURL string`

        - `Filename string`

  - `Type FunctionCallOutput`

    - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"`

  - `ID string`

  - `Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus`

    - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"`

    - `const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"`

### OpenAI Types Responses Response Input Item Image Generation Call

- `type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}`

  An image generation request made by the model.

  - `ID string`

  - `Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus`

    - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"`

    - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"`

    - `const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"`

  - `Type ImageGenerationCall`

    - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

  - `Result string`

### OpenAI Types Responses Response Input Item Item Reference

- `type OpenAITypesResponsesResponseInputItemItemReference struct{…}`

  An internal identifier for an item to reference.

  - `ID string`

  - `Type OpenAITypesResponsesResponseInputItemItemReferenceType`

    - `const OpenAITypesResponsesResponseInputItemItemReferenceTypeItemReference OpenAITypesResponsesResponseInputItemItemReferenceType = "item_reference"`

### OpenAI Types Responses Response Input Item Local Shell Call

- `type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}`

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

  - `ID string`

  - `Action OpenAITypesResponsesResponseInputItemLocalShellCallAction`

    Execute a shell command on the server.

    - `Command []string`

    - `Env map[string, string]`

    - `Type Exec`

      - `const ExecExec Exec = "exec"`

    - `TimeoutMs int64`

    - `User string`

    - `WorkingDirectory string`

  - `CallID string`

  - `Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus`

    - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"`

    - `const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"`

  - `Type LocalShellCall`

    - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

### OpenAI Types Responses Response Input Item Local Shell Call Output

- `type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}`

  The output of a local shell tool call.

  - `ID string`

  - `Output string`

  - `Type LocalShellCallOutput`

    - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"`

  - `Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus`

    - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"`

    - `const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"`

### OpenAI Types Responses Response Input Item Mcp Approval Response

- `type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}`

  A response to an MCP approval request.

  - `ApprovalRequestID string`

  - `Approve bool`

  - `Type McpApprovalResponse`

    - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"`

  - `ID string`

  - `Reason string`

### OpenAI Types Responses Response Input Item Mcp Call

- `type OpenAITypesResponsesResponseInputItemMcpCall struct{…}`

  An invocation of a tool on an MCP server.

  - `ID string`

  - `Arguments string`

  - `Name string`

  - `ServerLabel string`

  - `Type McpCall`

    - `const McpCallMcpCall McpCall = "mcp_call"`

  - `ApprovalRequestID string`

  - `Error string`

  - `Output string`

  - `Status OpenAITypesResponsesResponseInputItemMcpCallStatus`

    - `const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"`

    - `const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"`

    - `const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"`

    - `const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"`

### OpenAI Types Responses Response Input Item Mcp List Tools

- `type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}`

  A list of tools available on an MCP server.

  - `ID string`

  - `ServerLabel string`

  - `Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool`

    - `InputSchema any`

    - `Name string`

    - `Annotations any`

    - `Description string`

  - `Type McpListTools`

    - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

  - `Error string`

### OpenAI Types Responses Response Input Item Message

- `type OpenAITypesResponsesResponseInputItemMessage 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 []OpenAITypesResponsesResponseInputItemMessageContentUnion`

    - `type OpenAIResponseInputText struct{…}`

      A text input to the model.

      - `Text string`

      - `Type InputText`

        - `const InputTextInputText InputText = "input_text"`

    - `type OpenAIResponseInputImage struct{…}`

      An image input to the model.

      Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

      - `Detail OpenAIResponseInputImageDetail`

        - `const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"`

        - `const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"`

        - `const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"`

      - `Type InputImage`

        - `const InputImageInputImage InputImage = "input_image"`

      - `FileID string`

      - `ImageURL string`

    - `type OpenAIResponseInputFile struct{…}`

      A file input to the model.

      - `Type InputFile`

        - `const InputFileInputFile InputFile = "input_file"`

      - `FileData string`

      - `FileID string`

      - `FileURL string`

      - `Filename string`

  - `Role OpenAITypesResponsesResponseInputItemMessageRole`

    - `const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"`

    - `const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"`

    - `const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"`

  - `Status OpenAITypesResponsesResponseInputItemMessageStatus`

    - `const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"`

    - `const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"`

  - `Type OpenAITypesResponsesResponseInputItemMessageType`

    - `const OpenAITypesResponsesResponseInputItemMessageTypeMessage OpenAITypesResponsesResponseInputItemMessageType = "message"`

### OpenAI Types Responses Response Output Item Image Generation Call

- `type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}`

  An image generation request made by the model.

  - `ID string`

  - `Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus`

    - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"`

    - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"`

    - `const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"`

  - `Type ImageGenerationCall`

    - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

  - `Result string`

### OpenAI Types Responses Response Output Item Local Shell Call

- `type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}`

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

  - `ID string`

  - `Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction`

    Execute a shell command on the server.

    - `Command []string`

    - `Env map[string, string]`

    - `Type Exec`

      - `const ExecExec Exec = "exec"`

    - `TimeoutMs int64`

    - `User string`

    - `WorkingDirectory string`

  - `CallID string`

  - `Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus`

    - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"`

    - `const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"`

  - `Type LocalShellCall`

    - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

### OpenAI Types Responses Response Output Item Mcp Call

- `type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}`

  An invocation of a tool on an MCP server.

  - `ID string`

  - `Arguments string`

  - `Name string`

  - `ServerLabel string`

  - `Type McpCall`

    - `const McpCallMcpCall McpCall = "mcp_call"`

  - `ApprovalRequestID string`

  - `Error string`

  - `Output string`

  - `Status OpenAITypesResponsesResponseOutputItemMcpCallStatus`

    - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"`

    - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"`

    - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"`

    - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"`

    - `const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"`

### OpenAI Types Responses Response Output Item Mcp List Tools

- `type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}`

  A list of tools available on an MCP server.

  - `ID string`

  - `ServerLabel string`

  - `Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool`

    - `InputSchema any`

    - `Name string`

    - `Annotations any`

    - `Description string`

  - `Type McpListTools`

    - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"`

  - `Error string`

### Part Reasoning Text

- `type PartReasoningText struct{…}`

  Reasoning text from the model.

  - `Text string`

  - `Type ReasoningText`

    - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"`

### Reasoning

- `type Reasoning struct{…}`

  **gpt-5 and o-series models only**

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

  - `Effort ReasoningEffort`

    - `const ReasoningEffortNone ReasoningEffort = "none"`

    - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`

    - `const ReasoningEffortLow ReasoningEffort = "low"`

    - `const ReasoningEffortMedium ReasoningEffort = "medium"`

    - `const ReasoningEffortHigh ReasoningEffort = "high"`

    - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`

  - `GenerateSummary ReasoningGenerateSummary`

    - `const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"`

    - `const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"`

    - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"`

  - `Summary ReasoningSummary`

    - `const ReasoningSummaryAuto ReasoningSummary = "auto"`

    - `const ReasoningSummaryConcise ReasoningSummary = "concise"`

    - `const ReasoningSummaryDetailed ReasoningSummary = "detailed"`

### Response Apply Patch Tool Call

- `type ResponseApplyPatchToolCall struct{…}`

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

  - `ID string`

  - `CallID string`

  - `Operation ResponseApplyPatchToolCallOperationUnion`

    Instruction describing how to create a file via the apply_patch tool.

    - `type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}`

      Instruction describing how to create a file via the apply_patch tool.

      - `Diff string`

      - `Path string`

      - `Type CreateFile`

        - `const CreateFileCreateFile CreateFile = "create_file"`

    - `type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}`

      Instruction describing how to delete a file via the apply_patch tool.

      - `Path string`

      - `Type DeleteFile`

        - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

    - `type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}`

      Instruction describing how to update a file via the apply_patch tool.

      - `Diff string`

      - `Path string`

      - `Type UpdateFile`

        - `const UpdateFileUpdateFile UpdateFile = "update_file"`

  - `Status ResponseApplyPatchToolCallStatus`

    - `const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"`

    - `const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"`

  - `Type ApplyPatchCall`

    - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"`

  - `CreatedBy string`

### Response Apply Patch Tool Call Output

- `type ResponseApplyPatchToolCallOutput struct{…}`

  The output emitted by an apply patch tool call.

  - `ID string`

  - `CallID string`

  - `Status ResponseApplyPatchToolCallOutputStatus`

    - `const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"`

    - `const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"`

  - `Type ApplyPatchCallOutput`

    - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"`

  - `CreatedBy string`

  - `Output string`

### Response Compaction Item

- `type ResponseCompactionItem struct{…}`

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

  - `ID string`

  - `EncryptedContent string`

  - `Type Compaction`

    - `const CompactionCompaction Compaction = "compaction"`

  - `CreatedBy string`

### Response Compaction Item Param

- `type ResponseCompactionItemParamResp struct{…}`

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

  - `EncryptedContent string`

  - `Type Compaction`

    - `const CompactionCompaction Compaction = "compaction"`

  - `ID string`

### Response Computer Tool Call Output Screenshot

- `type ResponseComputerToolCallOutputScreenshot struct{…}`

  A computer screenshot image used with the computer use tool.

  - `Type ComputerScreenshot`

    - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"`

  - `FileID string`

  - `ImageURL string`

### Response Function Shell Tool Call

- `type ResponseFunctionShellToolCall struct{…}`

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

  - `ID string`

  - `Action ResponseFunctionShellToolCallAction`

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

    - `Commands []string`

    - `MaxOutputLength int64`

    - `TimeoutMs int64`

  - `CallID string`

  - `Status ResponseFunctionShellToolCallStatus`

    - `const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"`

    - `const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"`

    - `const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"`

  - `Type ShellCall`

    - `const ShellCallShellCall ShellCall = "shell_call"`

  - `CreatedBy string`

  - `Environment ResponseFunctionShellToolCallEnvironmentUnion`

    Represents the use of a local environment to perform shell actions.

    - `type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}`

      Represents the use of a local environment to perform shell actions.

      - `Type Local`

        - `const LocalLocal Local = "local"`

    - `type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}`

      Represents a container created with /v1/containers.

      - `ContainerID string`

      - `Type ContainerReference`

        - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

### Response Function Shell Tool Call Output

- `type ResponseFunctionShellToolCallOutput struct{…}`

  The output of a shell tool call that was emitted.

  - `ID string`

  - `CallID string`

  - `Output []ResponseFunctionShellToolCallOutputOutput`

    - `Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion`

      Indicates that the shell call exceeded its configured time limit.

      - `type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}`

        Indicates that the shell call exceeded its configured time limit.

        - `Type Timeout`

          - `const TimeoutTimeout Timeout = "timeout"`

      - `type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}`

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

        - `ExitCode int64`

        - `Type Exit`

          - `const ExitExit Exit = "exit"`

    - `Stderr string`

    - `Stdout string`

    - `CreatedBy string`

  - `Status ResponseFunctionShellToolCallOutputStatus`

    - `const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"`

    - `const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"`

    - `const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"`

  - `Type ShellCallOutput`

    - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

  - `CreatedBy string`

  - `MaxOutputLength int64`

### Shell Call

- `type ShellCall struct{…}`

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

  - `Action ShellCallAction`

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

    - `Commands []string`

    - `MaxOutputLength int64`

    - `TimeoutMs int64`

  - `CallID string`

  - `Type ShellCall`

    - `const ShellCallShellCall ShellCall = "shell_call"`

  - `ID string`

  - `Environment ShellCallEnvironmentUnion`

    - `type LocalEnvironment struct{…}`

      - `Type Local`

        - `const LocalLocal Local = "local"`

      - `Skills []LocalEnvironmentSkill`

        - `Description string`

        - `Name string`

        - `Path string`

    - `type ContainerReference struct{…}`

      - `ContainerID string`

      - `Type ContainerReference`

        - `const ContainerReferenceContainerReference ContainerReference = "container_reference"`

  - `Status ShellCallStatus`

    - `const ShellCallStatusInProgress ShellCallStatus = "in_progress"`

    - `const ShellCallStatusCompleted ShellCallStatus = "completed"`

    - `const ShellCallStatusIncomplete ShellCallStatus = "incomplete"`

### Shell Call Output

- `type ShellCallOutput struct{…}`

  The streamed output items emitted by a shell tool call.

  - `CallID string`

  - `Output []ShellCallOutputOutput`

    - `Outcome ShellCallOutputOutputOutcomeUnion`

      Indicates that the shell call exceeded its configured time limit.

      - `type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}`

        Indicates that the shell call exceeded its configured time limit.

        - `Type Timeout`

          - `const TimeoutTimeout Timeout = "timeout"`

      - `type ShellCallOutputOutputOutcomeOutcomeExit struct{…}`

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

        - `ExitCode int64`

        - `Type Exit`

          - `const ExitExit Exit = "exit"`

    - `Stderr string`

    - `Stdout string`

  - `Type ShellCallOutput`

    - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"`

  - `ID string`

  - `MaxOutputLength int64`

  - `Status ShellCallOutputStatus`

    - `const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"`

    - `const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"`

    - `const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"`

### Tool Choice Allowed

- `type ToolChoiceAllowed struct{…}`

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

  - `Mode ToolChoiceAllowedMode`

    - `const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"`

    - `const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"`

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

  - `Type AllowedTools`

    - `const AllowedToolsAllowedTools AllowedTools = "allowed_tools"`

### Tool Choice Apply Patch

- `type ToolChoiceApplyPatch struct{…}`

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

  - `Type ApplyPatch`

    - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"`

### Tool Choice Custom

- `type ToolChoiceCustom struct{…}`

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

  - `Name string`

  - `Type Custom`

    - `const CustomCustom Custom = "custom"`

### Tool Choice Function

- `type ToolChoiceFunction struct{…}`

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

  - `Name string`

  - `Type Function`

    - `const FunctionFunction Function = "function"`

### Tool Choice Mcp

- `type ToolChoiceMcp struct{…}`

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

  - `ServerLabel string`

  - `Type Mcp`

    - `const McpMcp Mcp = "mcp"`

  - `Name string`

### Tool Choice Shell

- `type ToolChoiceShell struct{…}`

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

  - `Type Shell`

    - `const ShellShell Shell = "shell"`

### Tool Choice Types

- `type ToolChoiceTypes 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 ToolChoiceTypesType`

    - `const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"`

    - `const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"`

    - `const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"`

    - `const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"`

    - `const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"`

    - `const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"`

### Web Search Preview Tool

- `type WebSearchPreviewTool 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 WebSearchPreviewToolType`

    - `const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"`

    - `const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"`

  - `SearchContextSize WebSearchPreviewToolSearchContextSize`

    - `const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"`

    - `const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"`

    - `const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"`

  - `UserLocation WebSearchPreviewToolUserLocation`

    The user's location.

    - `Type Approximate`

      - `const ApproximateApproximate Approximate = "approximate"`

    - `City string`

    - `Country string`

    - `Region string`

    - `Timezone string`

### Web Search Tool

- `type WebSearchTool 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 WebSearchToolType`

    - `const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"`

    - `const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"`

  - `Filters WebSearchToolFilters`

    Filters for the search.

    - `AllowedDomains []string`

  - `SearchContextSize WebSearchToolSearchContextSize`

    - `const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"`

    - `const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"`

    - `const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"`

  - `UserLocation WebSearchToolUserLocation`

    The approximate location of the user.

    - `City string`

    - `Country string`

    - `Region string`

    - `Timezone string`

    - `Type string`

      - `const WebSearchToolUserLocationTypeApproximate WebSearchToolUserLocationType = "approximate"`
