Package-level declarations

Types

Link copied to clipboard

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

Link copied to clipboard
@Serializable
@SerialName(value = "mcp_list_tools")
data class OpenAIResponseMcpListTools(val id: String, val serverLabel: String, val tools: List<OpenAIResponsesMcpToolDefinition>, val error: String? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem
Link copied to clipboard
@Serializable
sealed interface OpenAIResponseOutputItem
Link copied to clipboard
@Serializable
@SerialName(value = "code_interpreter_call")
data class OpenAIResponsesCodeInterpreterCall(val id: String, val status: OpenAICodeInterpreterStatus, val containerId: String, val code: String? = null, val outputs: List<OpenAIResponsesCodeInterpreterOutput>? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

A code interpreter tool call: the model writes and runs code in a container.

Link copied to clipboard
@Serializable
sealed interface OpenAIResponsesCodeInterpreterOutput

An output produced by a code interpreter tool call.

Link copied to clipboard
@Serializable
@SerialName(value = "computer_call")
data class OpenAIResponsesComputerCall(val id: String, val callId: String, val pendingSafetyChecks: List<OpenAIResponsesPendingSafetyCheck>, val status: OpenAIStatus? = null, val action: OpenAIResponsesComputerAction? = null, val actions: List<OpenAIResponsesComputerAction> = emptyList()) : OpenAIResponseInputItem, OpenAIResponseOutputItem
Link copied to clipboard
@Serializable
@SerialName(value = "computer_call_output")
data class OpenAIResponsesComputerCallOutput(val id: String? = null, val callId: String, val output: OpenAIResponsesComputerCallResult, val acknowledgedSafetyChecks: List<OpenAIResponsesPendingSafetyCheck>? = null, val status: OpenAIStatus? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

The result of a computer tool call.

Link copied to clipboard

The result of a computer tool call.

Link copied to clipboard
@Serializable
@SerialName(value = "custom_tool_call")
data class OpenAIResponsesCustomToolCall(val id: String? = null, val callId: String, val name: String, val input: String, val namespace: String? = null, val caller: OpenAIResponsesCaller? = null, val async: Boolean? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

A custom tool call: a tool whose input is freeform text defined by the caller.

Link copied to clipboard
@Serializable
@SerialName(value = "custom_tool_call_output")
data class OpenAIResponsesCustomToolCallOutput(val id: String? = null, val callId: String, val output: OpenAIFunctionCallOutputOutput) : OpenAIResponseInputItem, OpenAIResponseOutputItem

The result of a custom tool call, sent back to the model as input.

Link copied to clipboard
@Serializable
@SerialName(value = "message")
data class OpenAIResponsesEasyInputMessage(val role: Role, val content: OpenAIResponseContent, val phase: OpenAIPhase? = null) : OpenAIResponseInputItem
Link copied to clipboard
@Serializable
@SerialName(value = "file_search_call")
data class OpenAIResponsesFileSearchCall(val id: String, val queries: List<String>, val status: OpenAIFileSearchStatus, val results: List<String> = emptyList()) : OpenAIResponseInputItem, OpenAIResponseOutputItem
Link copied to clipboard
@Serializable
@SerialName(value = "function_call")
data class OpenAIResponsesFunctionCall(val arguments: String, val callId: String, val name: String, val id: String? = null, val async: Boolean? = null, val namespace: String? = null, val status: OpenAIStatus? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem
Link copied to clipboard
@Serializable
@SerialName(value = "function_call_output")
data class OpenAIResponsesFunctionCallOutput(val id: String? = null, val output: OpenAIFunctionCallOutputOutput, val status: OpenAIStatus? = null, val callId: String? = null, val caller: OpenAIResponsesCaller? = null, val createdBy: String? = null, val name: String? = null, val namespace: String? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem
Link copied to clipboard
@Serializable
@SerialName(value = "image_generation_call")
data class OpenAIResponsesImageGenerationCall(val id: String, val status: OpenAIImageGenerationStatus, val result: String? = null, val error: JsonElement? = null, val size: String? = null, val quality: String? = null, val revisedPrompt: String? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

An image generation tool call performed by the model.

Link copied to clipboard
@Serializable
@SerialName(value = "item_reference")
data class OpenAIResponsesItemReference(val id: String) : OpenAIResponseInputItem

A reference to an existing item (by ID) used as input to the model, instead of repeating the full item content.

Link copied to clipboard
@Serializable
@SerialName(value = "local_shell_call")
data class OpenAIResponsesLocalShellCall(val id: String, val callId: String, val action: OpenAILocalShellExecAction, val status: OpenAIStatus? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

A local shell tool call: the model requests a shell command execution.

Link copied to clipboard
@Serializable
@SerialName(value = "local_shell_call_output")
data class OpenAIResponsesLocalShellCallOutput(val id: String? = null, val callId: String, val output: String, val status: OpenAIStatus? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

The result of a local shell tool call, sent back to the model as input.

Link copied to clipboard
@Serializable
@SerialName(value = "mcp_approval_request")
data class OpenAIResponsesMcpApprovalRequest(val id: String, val serverLabel: String, val name: String, val arguments: String) : OpenAIResponseInputItem, OpenAIResponseOutputItem

A request from the model to the user for approval to invoke an MCP tool.

Link copied to clipboard
@Serializable
@SerialName(value = "mcp_approval_response")
data class OpenAIResponsesMcpApprovalResponse(val id: String? = null, val approvalRequestId: String, val approve: Boolean, val reason: String? = null) : OpenAIResponseInputItem

The user's response to an OpenAIResponsesMcpApprovalRequest: whether the tool invocation was approved, with an optional explanation.

Link copied to clipboard
@Serializable
@SerialName(value = "mcp_call")
data class OpenAIResponsesMcpCall(val id: String, val serverLabel: String, val name: String, val arguments: String, val output: String? = null, val error: JsonElement? = null, val status: OpenAIMcpCallStatus? = null, val approvalRequestId: String? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

An MCP tool call performed by the model against a configured MCP server.

Link copied to clipboard
@Serializable
@SerialName(value = "message")
data class OpenAIResponsesMessage(val role: Role, val content: OpenAIResponseContent) : OpenAIResponseInputItem
Link copied to clipboard
@Serializable
@SerialName(value = "message")
data class OpenAIResponsesOutputMessage(val id: String, val content: List<OpenAIResponseOutputContent.OutputMessageContent>, val role: Role = Role.Assistant, val status: OpenAIStatus, val phase: OpenAIPhase? = null) : OpenAIResponseOutputItem, OpenAIResponseInputItem
Link copied to clipboard
@Serializable
@SerialName(value = "reasoning")
data class OpenAIResponsesReasoning(val id: String, val summary: List<OpenAIResponseOutputContent.ReasoningContent> = emptyList(), val content: List<OpenAIResponseOutputContent.ReasoningContent> = emptyList()) : OpenAIResponseOutputItem, OpenAIResponseInputItem
Link copied to clipboard
@Serializable
@SerialName(value = "web_search_call")
data class OpenAIResponsesWebSearchCall(val id: String, val status: OpenAIWebSearchStatus, val action: OpenAIWebSearchAction? = null) : OpenAIResponseInputItem, OpenAIResponseOutputItem

A web search tool call performed by the model.