Class ResponseInputItem
- 
                    
                    - All Implemented Interfaces:
 
 public final class ResponseInputItemA message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public interfaceResponseInputItem.VisitorAn interface that defines how to map each variant of ResponseInputItem to a value of type T. public final classResponseInputItem.MessageA message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole.public final classResponseInputItem.ComputerCallOutputThe output of a computer tool call. public final classResponseInputItem.FunctionCallOutputThe output of a function tool call. public final classResponseInputItem.ImageGenerationCallAn image generation request made by the model. public final classResponseInputItem.LocalShellCallA tool call to run a command on the local shell. public final classResponseInputItem.LocalShellCallOutputThe output of a local shell tool call. public final classResponseInputItem.McpListToolsA list of tools available on an MCP server. public final classResponseInputItem.McpApprovalRequestA request for human approval of a tool invocation. public final classResponseInputItem.McpApprovalResponseA response to an MCP approval request. public final classResponseInputItem.McpCallAn invocation of a tool on an MCP server. public final classResponseInputItem.ItemReferenceAn internal identifier for an item to reference. 
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final Optional<EasyInputMessage>easyInputMessage()A message input to the model with a role indicating instruction following hierarchy. final Optional<ResponseInputItem.Message>message()A message input to the model with a role indicating instruction following hierarchy. final Optional<ResponseOutputMessage>responseOutputMessage()An output message from the model. final Optional<ResponseFileSearchToolCall>fileSearchCall()The results of a file search tool call. final Optional<ResponseComputerToolCall>computerCall()A tool call to a computer use tool. final Optional<ResponseInputItem.ComputerCallOutput>computerCallOutput()The output of a computer tool call. final Optional<ResponseFunctionWebSearch>webSearchCall()The results of a web search tool call. final Optional<ResponseFunctionToolCall>functionCall()A tool call to run a function. final Optional<ResponseInputItem.FunctionCallOutput>functionCallOutput()The output of a function tool call. final Optional<ResponseReasoningItem>reasoning()A description of the chain of thought used by a reasoning model while generating a response. final Optional<ResponseInputItem.ImageGenerationCall>imageGenerationCall()An image generation request made by the model. final Optional<ResponseCodeInterpreterToolCall>codeInterpreterCall()A tool call to run code. final Optional<ResponseInputItem.LocalShellCall>localShellCall()A tool call to run a command on the local shell. final Optional<ResponseInputItem.LocalShellCallOutput>localShellCallOutput()The output of a local shell tool call. final Optional<ResponseInputItem.McpListTools>mcpListTools()A list of tools available on an MCP server. final Optional<ResponseInputItem.McpApprovalRequest>mcpApprovalRequest()A request for human approval of a tool invocation. final Optional<ResponseInputItem.McpApprovalResponse>mcpApprovalResponse()A response to an MCP approval request. final Optional<ResponseInputItem.McpCall>mcpCall()An invocation of a tool on an MCP server. final Optional<ResponseCustomToolCallOutput>customToolCallOutput()The output of a custom tool call from your code, being sent back to the model. final Optional<ResponseCustomToolCall>customToolCall()A call to a custom tool created by the model. final Optional<ResponseInputItem.ItemReference>itemReference()An internal identifier for an item to reference. final BooleanisEasyInputMessage()final BooleanisMessage()final BooleanisResponseOutputMessage()final BooleanisFileSearchCall()final BooleanisComputerCall()final BooleanisComputerCallOutput()final BooleanisWebSearchCall()final BooleanisFunctionCall()final BooleanisFunctionCallOutput()final BooleanisReasoning()final BooleanisImageGenerationCall()final BooleanisCodeInterpreterCall()final BooleanisLocalShellCall()final BooleanisLocalShellCallOutput()final BooleanisMcpListTools()final BooleanisMcpApprovalRequest()final BooleanisMcpApprovalResponse()final BooleanisMcpCall()final BooleanisCustomToolCallOutput()final BooleanisCustomToolCall()final BooleanisItemReference()final EasyInputMessageasEasyInputMessage()A message input to the model with a role indicating instruction following hierarchy. final ResponseInputItem.MessageasMessage()A message input to the model with a role indicating instruction following hierarchy. final ResponseOutputMessageasResponseOutputMessage()An output message from the model. final ResponseFileSearchToolCallasFileSearchCall()The results of a file search tool call. final ResponseComputerToolCallasComputerCall()A tool call to a computer use tool. final ResponseInputItem.ComputerCallOutputasComputerCallOutput()The output of a computer tool call. final ResponseFunctionWebSearchasWebSearchCall()The results of a web search tool call. final ResponseFunctionToolCallasFunctionCall()A tool call to run a function. final ResponseInputItem.FunctionCallOutputasFunctionCallOutput()The output of a function tool call. final ResponseReasoningItemasReasoning()A description of the chain of thought used by a reasoning model while generating a response. final ResponseInputItem.ImageGenerationCallasImageGenerationCall()An image generation request made by the model. final ResponseCodeInterpreterToolCallasCodeInterpreterCall()A tool call to run code. final ResponseInputItem.LocalShellCallasLocalShellCall()A tool call to run a command on the local shell. final ResponseInputItem.LocalShellCallOutputasLocalShellCallOutput()The output of a local shell tool call. final ResponseInputItem.McpListToolsasMcpListTools()A list of tools available on an MCP server. final ResponseInputItem.McpApprovalRequestasMcpApprovalRequest()A request for human approval of a tool invocation. final ResponseInputItem.McpApprovalResponseasMcpApprovalResponse()A response to an MCP approval request. final ResponseInputItem.McpCallasMcpCall()An invocation of a tool on an MCP server. final ResponseCustomToolCallOutputasCustomToolCallOutput()The output of a custom tool call from your code, being sent back to the model. final ResponseCustomToolCallasCustomToolCall()A call to a custom tool created by the model. final ResponseInputItem.ItemReferenceasItemReference()An internal identifier for an item to reference. final Optional<JsonValue>_json()final <T extends Any> Taccept(ResponseInputItem.Visitor<T> visitor)final ResponseInputItemvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseInputItemofEasyInputMessage(EasyInputMessage easyInputMessage)A message input to the model with a role indicating instruction following hierarchy. final static ResponseInputItemofMessage(ResponseInputItem.Message message)A message input to the model with a role indicating instruction following hierarchy. final static ResponseInputItemofResponseOutputMessage(ResponseOutputMessage responseOutputMessage)An output message from the model. final static ResponseInputItemofFileSearchCall(ResponseFileSearchToolCall fileSearchCall)The results of a file search tool call. final static ResponseInputItemofComputerCall(ResponseComputerToolCall computerCall)A tool call to a computer use tool. final static ResponseInputItemofComputerCallOutput(ResponseInputItem.ComputerCallOutput computerCallOutput)The output of a computer tool call. final static ResponseInputItemofWebSearchCall(ResponseFunctionWebSearch webSearchCall)The results of a web search tool call. final static ResponseInputItemofFunctionCall(ResponseFunctionToolCall functionCall)A tool call to run a function. final static ResponseInputItemofFunctionCallOutput(ResponseInputItem.FunctionCallOutput functionCallOutput)The output of a function tool call. final static ResponseInputItemofReasoning(ResponseReasoningItem reasoning)A description of the chain of thought used by a reasoning model while generating a response. final static ResponseInputItemofImageGenerationCall(ResponseInputItem.ImageGenerationCall imageGenerationCall)An image generation request made by the model. final static ResponseInputItemofCodeInterpreterCall(ResponseCodeInterpreterToolCall codeInterpreterCall)A tool call to run code. final static ResponseInputItemofLocalShellCall(ResponseInputItem.LocalShellCall localShellCall)A tool call to run a command on the local shell. final static ResponseInputItemofLocalShellCallOutput(ResponseInputItem.LocalShellCallOutput localShellCallOutput)The output of a local shell tool call. final static ResponseInputItemofMcpListTools(ResponseInputItem.McpListTools mcpListTools)A list of tools available on an MCP server. final static ResponseInputItemofMcpApprovalRequest(ResponseInputItem.McpApprovalRequest mcpApprovalRequest)A request for human approval of a tool invocation. final static ResponseInputItemofMcpApprovalResponse(ResponseInputItem.McpApprovalResponse mcpApprovalResponse)A response to an MCP approval request. final static ResponseInputItemofMcpCall(ResponseInputItem.McpCall mcpCall)An invocation of a tool on an MCP server. final static ResponseInputItemofCustomToolCallOutput(ResponseCustomToolCallOutput customToolCallOutput)The output of a custom tool call from your code, being sent back to the model. final static ResponseInputItemofCustomToolCall(ResponseCustomToolCall customToolCall)A call to a custom tool created by the model. final static ResponseInputItemofItemReference(ResponseInputItem.ItemReference itemReference)An internal identifier for an item to reference. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        easyInputMessagefinal Optional<EasyInputMessage> easyInputMessage() A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.
 - 
                                        messagefinal Optional<ResponseInputItem.Message> message() A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole.
 - 
                                        responseOutputMessagefinal Optional<ResponseOutputMessage> responseOutputMessage() 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. 
 - 
                                        computerCallfinal Optional<ResponseComputerToolCall> computerCall() A tool call to a computer use tool. See the computer use guide for more information. 
 - 
                                        computerCallOutputfinal Optional<ResponseInputItem.ComputerCallOutput> computerCallOutput() The output of a computer tool call. 
 - 
                                        webSearchCallfinal Optional<ResponseFunctionWebSearch> webSearchCall() The results of a web search tool call. See the web search guide for more information. 
 - 
                                        functionCallfinal Optional<ResponseFunctionToolCall> functionCall() A tool call to run a function. See the function calling guide for more information. 
 - 
                                        functionCallOutputfinal Optional<ResponseInputItem.FunctionCallOutput> functionCallOutput() The output of a function tool call. 
 - 
                                        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<ResponseInputItem.ImageGenerationCall> imageGenerationCall() An image generation request made by the model. 
 - 
                                        codeInterpreterCallfinal Optional<ResponseCodeInterpreterToolCall> codeInterpreterCall() A tool call to run code. 
 - 
                                        localShellCallfinal Optional<ResponseInputItem.LocalShellCall> localShellCall() A tool call to run a command on the local shell. 
 - 
                                        localShellCallOutputfinal Optional<ResponseInputItem.LocalShellCallOutput> localShellCallOutput() The output of a local shell tool call. 
 - 
                                        mcpListToolsfinal Optional<ResponseInputItem.McpListTools> mcpListTools() A list of tools available on an MCP server. 
 - 
                                        mcpApprovalRequestfinal Optional<ResponseInputItem.McpApprovalRequest> mcpApprovalRequest() A request for human approval of a tool invocation. 
 - 
                                        mcpApprovalResponsefinal Optional<ResponseInputItem.McpApprovalResponse> mcpApprovalResponse() A response to an MCP approval request. 
 - 
                                        mcpCallfinal Optional<ResponseInputItem.McpCall> mcpCall() An invocation of a tool on an MCP server. 
 - 
                                        customToolCallOutputfinal Optional<ResponseCustomToolCallOutput> customToolCallOutput() The output of a custom tool call from your code, being sent back to the model. 
 - 
                                        customToolCallfinal Optional<ResponseCustomToolCall> customToolCall() A call to a custom tool created by the model. 
 - 
                                        itemReferencefinal Optional<ResponseInputItem.ItemReference> itemReference() An internal identifier for an item to reference. 
 - 
                                        isEasyInputMessagefinal Boolean isEasyInputMessage() 
 - 
                                        isResponseOutputMessagefinal Boolean isResponseOutputMessage() 
 - 
                                        isFileSearchCallfinal Boolean isFileSearchCall() 
 - 
                                        isComputerCallfinal Boolean isComputerCall() 
 - 
                                        isComputerCallOutputfinal Boolean isComputerCallOutput() 
 - 
                                        isWebSearchCallfinal Boolean isWebSearchCall() 
 - 
                                        isFunctionCallfinal Boolean isFunctionCall() 
 - 
                                        isFunctionCallOutputfinal Boolean isFunctionCallOutput() 
 - 
                                        isReasoningfinal Boolean isReasoning() 
 - 
                                        isImageGenerationCallfinal Boolean isImageGenerationCall() 
 - 
                                        isCodeInterpreterCallfinal Boolean isCodeInterpreterCall() 
 - 
                                        isLocalShellCallfinal Boolean isLocalShellCall() 
 - 
                                        isLocalShellCallOutputfinal Boolean isLocalShellCallOutput() 
 - 
                                        isMcpListToolsfinal Boolean isMcpListTools() 
 - 
                                        isMcpApprovalRequestfinal Boolean isMcpApprovalRequest() 
 - 
                                        isMcpApprovalResponsefinal Boolean isMcpApprovalResponse() 
 - 
                                        isCustomToolCallOutputfinal Boolean isCustomToolCallOutput() 
 - 
                                        isCustomToolCallfinal Boolean isCustomToolCall() 
 - 
                                        isItemReferencefinal Boolean isItemReference() 
 - 
                                        asEasyInputMessagefinal EasyInputMessage asEasyInputMessage() A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.
 - 
                                        asMessagefinal ResponseInputItem.Message asMessage() A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole.
 - 
                                        asResponseOutputMessagefinal ResponseOutputMessage asResponseOutputMessage() 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. 
 - 
                                        asComputerCallfinal ResponseComputerToolCall asComputerCall() A tool call to a computer use tool. See the computer use guide for more information. 
 - 
                                        asComputerCallOutputfinal ResponseInputItem.ComputerCallOutput asComputerCallOutput() The output of a computer tool call. 
 - 
                                        asWebSearchCallfinal ResponseFunctionWebSearch asWebSearchCall() The results of a web search tool call. See the web search guide for more information. 
 - 
                                        asFunctionCallfinal ResponseFunctionToolCall asFunctionCall() A tool call to run a function. See the function calling guide for more information. 
 - 
                                        asFunctionCallOutputfinal ResponseInputItem.FunctionCallOutput asFunctionCallOutput() The output of a function tool call. 
 - 
                                        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 ResponseInputItem.ImageGenerationCall asImageGenerationCall() An image generation request made by the model. 
 - 
                                        asCodeInterpreterCallfinal ResponseCodeInterpreterToolCall asCodeInterpreterCall() A tool call to run code. 
 - 
                                        asLocalShellCallfinal ResponseInputItem.LocalShellCall asLocalShellCall() A tool call to run a command on the local shell. 
 - 
                                        asLocalShellCallOutputfinal ResponseInputItem.LocalShellCallOutput asLocalShellCallOutput() The output of a local shell tool call. 
 - 
                                        asMcpListToolsfinal ResponseInputItem.McpListTools asMcpListTools() A list of tools available on an MCP server. 
 - 
                                        asMcpApprovalRequestfinal ResponseInputItem.McpApprovalRequest asMcpApprovalRequest() A request for human approval of a tool invocation. 
 - 
                                        asMcpApprovalResponsefinal ResponseInputItem.McpApprovalResponse asMcpApprovalResponse() A response to an MCP approval request. 
 - 
                                        asMcpCallfinal ResponseInputItem.McpCall asMcpCall() An invocation of a tool on an MCP server. 
 - 
                                        asCustomToolCallOutputfinal ResponseCustomToolCallOutput asCustomToolCallOutput() The output of a custom tool call from your code, being sent back to the model. 
 - 
                                        asCustomToolCallfinal ResponseCustomToolCall asCustomToolCall() A call to a custom tool created by the model. 
 - 
                                        asItemReferencefinal ResponseInputItem.ItemReference asItemReference() An internal identifier for an item to reference. 
 - 
                                        acceptfinal <T extends Any> T accept(ResponseInputItem.Visitor<T> visitor) 
 - 
                                        validatefinal ResponseInputItem validate() 
 - 
                                        ofEasyInputMessagefinal static ResponseInputItem ofEasyInputMessage(EasyInputMessage easyInputMessage) A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.
 - 
                                        ofMessagefinal static ResponseInputItem ofMessage(ResponseInputItem.Message message) A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developerorsystemrole take precedence over instructions given with theuserrole.
 - 
                                        ofResponseOutputMessagefinal static ResponseInputItem ofResponseOutputMessage(ResponseOutputMessage responseOutputMessage) An output message from the model. 
 - 
                                        ofFileSearchCallfinal static ResponseInputItem ofFileSearchCall(ResponseFileSearchToolCall fileSearchCall) The results of a file search tool call. See the file search guide for more information. 
 - 
                                        ofComputerCallfinal static ResponseInputItem ofComputerCall(ResponseComputerToolCall computerCall) A tool call to a computer use tool. See the computer use guide for more information. 
 - 
                                        ofComputerCallOutputfinal static ResponseInputItem ofComputerCallOutput(ResponseInputItem.ComputerCallOutput computerCallOutput) The output of a computer tool call. 
 - 
                                        ofWebSearchCallfinal static ResponseInputItem ofWebSearchCall(ResponseFunctionWebSearch webSearchCall) The results of a web search tool call. See the web search guide for more information. 
 - 
                                        ofFunctionCallfinal static ResponseInputItem ofFunctionCall(ResponseFunctionToolCall functionCall) A tool call to run a function. See the function calling guide for more information. 
 - 
                                        ofFunctionCallOutputfinal static ResponseInputItem ofFunctionCallOutput(ResponseInputItem.FunctionCallOutput functionCallOutput) The output of a function tool call. 
 - 
                                        ofReasoningfinal static ResponseInputItem 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 ResponseInputItem ofImageGenerationCall(ResponseInputItem.ImageGenerationCall imageGenerationCall) An image generation request made by the model. 
 - 
                                        ofCodeInterpreterCallfinal static ResponseInputItem ofCodeInterpreterCall(ResponseCodeInterpreterToolCall codeInterpreterCall) A tool call to run code. 
 - 
                                        ofLocalShellCallfinal static ResponseInputItem ofLocalShellCall(ResponseInputItem.LocalShellCall localShellCall) A tool call to run a command on the local shell. 
 - 
                                        ofLocalShellCallOutputfinal static ResponseInputItem ofLocalShellCallOutput(ResponseInputItem.LocalShellCallOutput localShellCallOutput) The output of a local shell tool call. 
 - 
                                        ofMcpListToolsfinal static ResponseInputItem ofMcpListTools(ResponseInputItem.McpListTools mcpListTools) A list of tools available on an MCP server. 
 - 
                                        ofMcpApprovalRequestfinal static ResponseInputItem ofMcpApprovalRequest(ResponseInputItem.McpApprovalRequest mcpApprovalRequest) A request for human approval of a tool invocation. 
 - 
                                        ofMcpApprovalResponsefinal static ResponseInputItem ofMcpApprovalResponse(ResponseInputItem.McpApprovalResponse mcpApprovalResponse) A response to an MCP approval request. 
 - 
                                        ofMcpCallfinal static ResponseInputItem ofMcpCall(ResponseInputItem.McpCall mcpCall) An invocation of a tool on an MCP server. 
 - 
                                        ofCustomToolCallOutputfinal static ResponseInputItem ofCustomToolCallOutput(ResponseCustomToolCallOutput customToolCallOutput) The output of a custom tool call from your code, being sent back to the model. 
 - 
                                        ofCustomToolCallfinal static ResponseInputItem ofCustomToolCall(ResponseCustomToolCall customToolCall) A call to a custom tool created by the model. 
 - 
                                        ofItemReferencefinal static ResponseInputItem ofItemReference(ResponseInputItem.ItemReference itemReference) An internal identifier for an item to reference. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-