Class ResponseOutputItem
- 
                    
                    - All Implemented Interfaces:
 
 public final class ResponseOutputItemAn output message from the model. 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public interfaceResponseOutputItem.VisitorAn interface that defines how to map each variant of ResponseOutputItem to a value of type T. public final classResponseOutputItem.ImageGenerationCallAn image generation request made by the model. public final classResponseOutputItem.LocalShellCallA tool call to run a command on the local shell. public final classResponseOutputItem.McpCallAn invocation of a tool on an MCP server. public final classResponseOutputItem.McpListToolsA list of tools available on an MCP server. public final classResponseOutputItem.McpApprovalRequestA request for human approval of a tool invocation. 
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final Optional<ResponseOutputMessage>message()An output message from the model. final Optional<ResponseFileSearchToolCall>fileSearchCall()The results of a file search tool call. final Optional<ResponseFunctionToolCall>functionCall()A tool call to run a function. final Optional<ResponseFunctionWebSearch>webSearchCall()The results of a web search tool call. final Optional<ResponseComputerToolCall>computerCall()A tool call to a computer use tool. final Optional<ResponseReasoningItem>reasoning()A description of the chain of thought used by a reasoning model while generating a response. final Optional<ResponseOutputItem.ImageGenerationCall>imageGenerationCall()An image generation request made by the model. final Optional<ResponseCodeInterpreterToolCall>codeInterpreterCall()A tool call to run code. final Optional<ResponseOutputItem.LocalShellCall>localShellCall()A tool call to run a command on the local shell. final Optional<ResponseOutputItem.McpCall>mcpCall()An invocation of a tool on an MCP server. final Optional<ResponseOutputItem.McpListTools>mcpListTools()A list of tools available on an MCP server. final Optional<ResponseOutputItem.McpApprovalRequest>mcpApprovalRequest()A request for human approval of a tool invocation. final Optional<ResponseCustomToolCall>customToolCall()A call to a custom tool created by the model. final BooleanisMessage()final BooleanisFileSearchCall()final BooleanisFunctionCall()final BooleanisWebSearchCall()final BooleanisComputerCall()final BooleanisReasoning()final BooleanisImageGenerationCall()final BooleanisCodeInterpreterCall()final BooleanisLocalShellCall()final BooleanisMcpCall()final BooleanisMcpListTools()final BooleanisMcpApprovalRequest()final BooleanisCustomToolCall()final ResponseOutputMessageasMessage()An output message from the model. final ResponseFileSearchToolCallasFileSearchCall()The results of a file search tool call. final ResponseFunctionToolCallasFunctionCall()A tool call to run a function. final ResponseFunctionWebSearchasWebSearchCall()The results of a web search tool call. final ResponseComputerToolCallasComputerCall()A tool call to a computer use tool. final ResponseReasoningItemasReasoning()A description of the chain of thought used by a reasoning model while generating a response. final ResponseOutputItem.ImageGenerationCallasImageGenerationCall()An image generation request made by the model. final ResponseCodeInterpreterToolCallasCodeInterpreterCall()A tool call to run code. final ResponseOutputItem.LocalShellCallasLocalShellCall()A tool call to run a command on the local shell. final ResponseOutputItem.McpCallasMcpCall()An invocation of a tool on an MCP server. final ResponseOutputItem.McpListToolsasMcpListTools()A list of tools available on an MCP server. final ResponseOutputItem.McpApprovalRequestasMcpApprovalRequest()A request for human approval of a tool invocation. final ResponseCustomToolCallasCustomToolCall()A call to a custom tool created by the model. final Optional<JsonValue>_json()final <T extends Any> Taccept(ResponseOutputItem.Visitor<T> visitor)final ResponseOutputItemvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseOutputItemofMessage(ResponseOutputMessage message)An output message from the model. final static ResponseOutputItemofFileSearchCall(ResponseFileSearchToolCall fileSearchCall)The results of a file search tool call. final static ResponseOutputItemofFunctionCall(ResponseFunctionToolCall functionCall)A tool call to run a function. final static ResponseOutputItemofWebSearchCall(ResponseFunctionWebSearch webSearchCall)The results of a web search tool call. final static ResponseOutputItemofComputerCall(ResponseComputerToolCall computerCall)A tool call to a computer use tool. final static ResponseOutputItemofReasoning(ResponseReasoningItem reasoning)A description of the chain of thought used by a reasoning model while generating a response. final static ResponseOutputItemofImageGenerationCall(ResponseOutputItem.ImageGenerationCall imageGenerationCall)An image generation request made by the model. final static ResponseOutputItemofCodeInterpreterCall(ResponseCodeInterpreterToolCall codeInterpreterCall)A tool call to run code. final static ResponseOutputItemofLocalShellCall(ResponseOutputItem.LocalShellCall localShellCall)A tool call to run a command on the local shell. final static ResponseOutputItemofMcpCall(ResponseOutputItem.McpCall mcpCall)An invocation of a tool on an MCP server. final static ResponseOutputItemofMcpListTools(ResponseOutputItem.McpListTools mcpListTools)A list of tools available on an MCP server. final static ResponseOutputItemofMcpApprovalRequest(ResponseOutputItem.McpApprovalRequest mcpApprovalRequest)A request for human approval of a tool invocation. final static ResponseOutputItemofCustomToolCall(ResponseCustomToolCall customToolCall)A call to a custom tool created by the model. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        messagefinal Optional<ResponseOutputMessage> message() An output message from the model. 
 - 
                                        fileSearchCallfinal Optional<ResponseFileSearchToolCall> fileSearchCall() The results of a file search tool call. See the file search guide for more information. 
 - 
                                        functionCallfinal Optional<ResponseFunctionToolCall> functionCall() A tool call to run a function. See the function calling guide for more information. 
 - 
                                        webSearchCallfinal Optional<ResponseFunctionWebSearch> webSearchCall() The results of a web search tool call. See the web search guide for more information. 
 - 
                                        computerCallfinal Optional<ResponseComputerToolCall> computerCall() A tool call to a computer use tool. See the computer use guide for more information. 
 - 
                                        reasoningfinal Optional<ResponseReasoningItem> reasoning() A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your inputto the Responses API for subsequent turns of a conversation if you are manually managing context.
 - 
                                        imageGenerationCallfinal Optional<ResponseOutputItem.ImageGenerationCall> imageGenerationCall() An image generation request made by the model. 
 - 
                                        codeInterpreterCallfinal Optional<ResponseCodeInterpreterToolCall> codeInterpreterCall() A tool call to run code. 
 - 
                                        localShellCallfinal Optional<ResponseOutputItem.LocalShellCall> localShellCall() A tool call to run a command on the local shell. 
 - 
                                        mcpCallfinal Optional<ResponseOutputItem.McpCall> mcpCall() An invocation of a tool on an MCP server. 
 - 
                                        mcpListToolsfinal Optional<ResponseOutputItem.McpListTools> mcpListTools() A list of tools available on an MCP server. 
 - 
                                        mcpApprovalRequestfinal Optional<ResponseOutputItem.McpApprovalRequest> mcpApprovalRequest() A request for human approval of a tool invocation. 
 - 
                                        customToolCallfinal Optional<ResponseCustomToolCall> customToolCall() A call to a custom tool created by the model. 
 - 
                                        isFileSearchCallfinal Boolean isFileSearchCall() 
 - 
                                        isFunctionCallfinal Boolean isFunctionCall() 
 - 
                                        isWebSearchCallfinal Boolean isWebSearchCall() 
 - 
                                        isComputerCallfinal Boolean isComputerCall() 
 - 
                                        isReasoningfinal Boolean isReasoning() 
 - 
                                        isImageGenerationCallfinal Boolean isImageGenerationCall() 
 - 
                                        isCodeInterpreterCallfinal Boolean isCodeInterpreterCall() 
 - 
                                        isLocalShellCallfinal Boolean isLocalShellCall() 
 - 
                                        isMcpListToolsfinal Boolean isMcpListTools() 
 - 
                                        isMcpApprovalRequestfinal Boolean isMcpApprovalRequest() 
 - 
                                        isCustomToolCallfinal Boolean isCustomToolCall() 
 - 
                                        asMessagefinal ResponseOutputMessage asMessage() An output message from the model. 
 - 
                                        asFileSearchCallfinal ResponseFileSearchToolCall asFileSearchCall() The results of a file search tool call. See the file search guide for more information. 
 - 
                                        asFunctionCallfinal ResponseFunctionToolCall asFunctionCall() A tool call to run a function. See the function calling guide for more information. 
 - 
                                        asWebSearchCallfinal ResponseFunctionWebSearch asWebSearchCall() The results of a web search tool call. See the web search guide for more information. 
 - 
                                        asComputerCallfinal ResponseComputerToolCall asComputerCall() A tool call to a computer use tool. See the computer use guide for more information. 
 - 
                                        asReasoningfinal ResponseReasoningItem asReasoning() A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your inputto the Responses API for subsequent turns of a conversation if you are manually managing context.
 - 
                                        asImageGenerationCallfinal ResponseOutputItem.ImageGenerationCall asImageGenerationCall() An image generation request made by the model. 
 - 
                                        asCodeInterpreterCallfinal ResponseCodeInterpreterToolCall asCodeInterpreterCall() A tool call to run code. 
 - 
                                        asLocalShellCallfinal ResponseOutputItem.LocalShellCall asLocalShellCall() A tool call to run a command on the local shell. 
 - 
                                        asMcpCallfinal ResponseOutputItem.McpCall asMcpCall() An invocation of a tool on an MCP server. 
 - 
                                        asMcpListToolsfinal ResponseOutputItem.McpListTools asMcpListTools() A list of tools available on an MCP server. 
 - 
                                        asMcpApprovalRequestfinal ResponseOutputItem.McpApprovalRequest asMcpApprovalRequest() A request for human approval of a tool invocation. 
 - 
                                        asCustomToolCallfinal ResponseCustomToolCall asCustomToolCall() A call to a custom tool created by the model. 
 - 
                                        acceptfinal <T extends Any> T accept(ResponseOutputItem.Visitor<T> visitor) 
 - 
                                        validatefinal ResponseOutputItem validate() 
 - 
                                        ofMessagefinal static ResponseOutputItem ofMessage(ResponseOutputMessage message) An output message from the model. 
 - 
                                        ofFileSearchCallfinal static ResponseOutputItem ofFileSearchCall(ResponseFileSearchToolCall fileSearchCall) The results of a file search tool call. See the file search guide for more information. 
 - 
                                        ofFunctionCallfinal static ResponseOutputItem ofFunctionCall(ResponseFunctionToolCall functionCall) A tool call to run a function. See the function calling guide for more information. 
 - 
                                        ofWebSearchCallfinal static ResponseOutputItem ofWebSearchCall(ResponseFunctionWebSearch webSearchCall) The results of a web search tool call. See the web search guide for more information. 
 - 
                                        ofComputerCallfinal static ResponseOutputItem ofComputerCall(ResponseComputerToolCall computerCall) A tool call to a computer use tool. See the computer use guide for more information. 
 - 
                                        ofReasoningfinal static ResponseOutputItem ofReasoning(ResponseReasoningItem reasoning) A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your inputto the Responses API for subsequent turns of a conversation if you are manually managing context.
 - 
                                        ofImageGenerationCallfinal static ResponseOutputItem ofImageGenerationCall(ResponseOutputItem.ImageGenerationCall imageGenerationCall) An image generation request made by the model. 
 - 
                                        ofCodeInterpreterCallfinal static ResponseOutputItem ofCodeInterpreterCall(ResponseCodeInterpreterToolCall codeInterpreterCall) A tool call to run code. 
 - 
                                        ofLocalShellCallfinal static ResponseOutputItem ofLocalShellCall(ResponseOutputItem.LocalShellCall localShellCall) A tool call to run a command on the local shell. 
 - 
                                        ofMcpCallfinal static ResponseOutputItem ofMcpCall(ResponseOutputItem.McpCall mcpCall) An invocation of a tool on an MCP server. 
 - 
                                        ofMcpListToolsfinal static ResponseOutputItem ofMcpListTools(ResponseOutputItem.McpListTools mcpListTools) A list of tools available on an MCP server. 
 - 
                                        ofMcpApprovalRequestfinal static ResponseOutputItem ofMcpApprovalRequest(ResponseOutputItem.McpApprovalRequest mcpApprovalRequest) A request for human approval of a tool invocation. 
 - 
                                        ofCustomToolCallfinal static ResponseOutputItem ofCustomToolCall(ResponseCustomToolCall customToolCall) A call to a custom tool created by the model. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-