---
title: "List input items"
method: GET
path: "/responses/{response_id}/input_items?beta=true"
tags: ["Responses"]
---

# List input items

`GET /responses/{response_id}/input_items?beta=true`

Returns a list of input items for a given response.

## Path parameters

- `response_id` string, required

## Query parameters

- `limit` integer
- `order` 'asc' | 'desc'
- `after` string
- `include` BetaIncludeEnum[]

## Headers

- `openai-beta` string[]

## Response `200`

OK

- BetaResponseItemList — A list of Response items.
  - `object` 'list', required — The type of object returned, must be `list`.
  - `data` BetaItemResource[], required — A list of items used to generate this response.
    - union — Content item used to generate a response.
      - BetaInputMessageResource — 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.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'message', required — The type of the message input. Always set to `message`.
        - `role` 'user' | 'system' | 'developer', required — The role of the message input. One of `user`, `system`, or `developer`.
        - `status` 'in_progress' | 'completed' | 'incomplete' — The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
        - `content` BetaInputContent[], required — A list of one or many input items to the model, containing different content types.
          - union
            - BetaInputTextContent — A text input to the model.
              - …
            - BetaInputImageContent — An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).
              - …
            - BetaInputFileContent — A file input to the model.
              - …
        - `id` string, required — The unique ID of the message input.
      - BetaOutputMessage — An output message from the model.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `id` string, required — The unique ID of the output message.
        - `type` 'message', required — The type of the output message. Always `message`.
        - `role` 'assistant', required — The role of the output message. Always `assistant`.
        - `content` BetaOutputMessageContent[], required — The content of the output message.
          - union
            - BetaOutputTextContent — A text output from the model.
              - …
            - BetaRefusalContent — A refusal from the model.
              - …
        - `phase` 'commentary' | 'final_answer' — Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
        - `status` 'in_progress' | 'completed' | 'incomplete', required — The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.
      - BetaFileSearchToolCall — 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.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `id` string, required — The unique ID of the file search tool call.
        - `type` 'file_search_call', required — The type of the file search tool call. Always `file_search_call`.
        - `status` 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed', required — The status of the file search tool call. One of `in_progress`, `searching`, `incomplete` or `failed`,
        - `queries` string[], required — The queries used to search for files.
        - `results` object[], nullable — The results of the file search tool call.
          - `file_id` string — The unique ID of the file.
          - `text` string — The text that was retrieved from the file.
          - `filename` string — The name of the file.
          - `attributes` BetaVectorStoreFileAttributes, nullable — Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
          - `score` number, float — The relevance score of the file - a value between 0 and 1.
      - BetaComputerToolCall — 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.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'computer_call', required — The type of the computer call. Always `computer_call`.
        - `id` string, required — The unique ID of the computer call.
        - `call_id` string, required — An identifier used when responding to the tool call with output.
        - `action` union
          - BetaClickParam — A click action.
            - `type` 'click', required — Specifies the event type. For a click action, this property is always `click`.
            - `button` 'left' | 'right' | 'wheel' | 'back' | 'forward', required
            - `x` integer, required — The x-coordinate where the click occurred.
            - `y` integer, required — The y-coordinate where the click occurred.
            - `keys` string[], nullable — The keys being held while clicking.
          - BetaDoubleClickAction — A double click action.
            - `type` 'double_click', required — Specifies the event type. For a double click action, this property is always set to `double_click`.
            - `x` integer, required — The x-coordinate where the double click occurred.
            - `y` integer, required — The y-coordinate where the double click occurred.
            - `keys` string[], nullable, required — The keys being held while double-clicking.
          - BetaDragParam — A drag action.
            - `type` 'drag', required — Specifies the event type. For a drag action, this property is always set to `drag`.
            - `path` BetaCoordParam[], required — An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg ``` [ { x: 100, y: 200 }, { x: 200, y: 300 } ] ```
              - …
            - `keys` string[], nullable — The keys being held while dragging the mouse.
          - BetaKeyPressAction — A collection of keypresses the model would like to perform.
            - `type` 'keypress', required — Specifies the event type. For a keypress action, this property is always set to `keypress`.
            - `keys` string[], required — The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
          - BetaMoveParam — A mouse move action.
            - `type` 'move', required — Specifies the event type. For a move action, this property is always set to `move`.
            - `x` integer, required — The x-coordinate to move to.
            - `y` integer, required — The y-coordinate to move to.
            - `keys` string[], nullable — The keys being held while moving the mouse.
          - BetaScreenshotParam — A screenshot action.
            - `type` 'screenshot', required — Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
          - BetaScrollParam — A scroll action.
            - `type` 'scroll', required — Specifies the event type. For a scroll action, this property is always set to `scroll`.
            - `x` integer, required — The x-coordinate where the scroll occurred.
            - `y` integer, required — The y-coordinate where the scroll occurred.
            - `scroll_x` integer, required — The horizontal scroll distance.
            - `scroll_y` integer, required — The vertical scroll distance.
            - `keys` string[], nullable — The keys being held while scrolling.
          - BetaTypeParam — An action to type in text.
            - `type` 'type', required — Specifies the event type. For a type action, this property is always set to `type`.
            - `text` string, required — The text to type.
          - BetaWaitParam — A wait action.
            - `type` 'wait', required — Specifies the event type. For a wait action, this property is always set to `wait`.
        - `actions` BetaComputerAction[] — Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields.
          - union
            - BetaClickParam — A click action.
              - …
            - BetaDoubleClickAction — A double click action.
              - …
            - BetaDragParam — A drag action.
              - …
            - BetaKeyPressAction — A collection of keypresses the model would like to perform.
              - …
            - BetaMoveParam — A mouse move action.
              - …
            - BetaScreenshotParam — A screenshot action.
              - …
            - BetaScrollParam — A scroll action.
              - …
            - BetaTypeParam — An action to type in text.
              - …
            - BetaWaitParam — A wait action.
              - …
        - `pending_safety_checks` BetaComputerCallSafetyCheckParam[], required — The pending safety checks for the computer call.
          - `id` string, required — The ID of the pending safety check.
          - `code` string, nullable — The type of the pending safety check.
          - `message` string, nullable — Details about the pending safety check.
        - `status` 'in_progress' | 'completed' | 'incomplete', required — The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
      - BetaComputerToolCallOutputResource — The output of a computer tool call.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'computer_call_output', required — The type of the computer tool call output. Always `computer_call_output`.
        - `id` string, required — The unique ID of the computer call tool output.
        - `call_id` string, required — The ID of the computer tool call that produced the output.
        - `acknowledged_safety_checks` BetaComputerCallSafetyCheckParam[] — The safety checks reported by the API that have been acknowledged by the developer.
          - `id` string, required — The ID of the pending safety check.
          - `code` string, nullable — The type of the pending safety check.
          - `message` string, nullable — Details about the pending safety check.
        - `output` BetaComputerScreenshotImage, required — A computer screenshot image used with the computer use tool.
          - `type` 'computer_screenshot', required — Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
          - `image_url` string, uri — The URL of the screenshot image.
          - `file_id` string — The identifier of an uploaded file that contains the screenshot.
        - `status` 'completed' | 'incomplete', required — The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.
        - `created_by` string — The identifier of the actor that created the item.
      - BetaWebSearchToolCall — 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.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `id` string, required — The unique ID of the web search tool call.
        - `type` 'web_search_call', required — The type of the web search tool call. Always `web_search_call`.
        - `status` 'in_progress' | 'searching' | 'completed' | 'failed', required — The status of the web search tool call.
        - `action` union, required — An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page).
          - object — Action type "search" - Performs a web search query.
            - `type` 'search', required — The action type.
            - `query` string — The search query.
            - `queries` string[] — The search queries.
            - `sources` object[] — The sources used in the search.
              - …
          - object — Action type "open_page" - Opens a specific URL from search results.
            - `type` 'open_page', required — The action type.
            - `url` string, uri, nullable — The URL opened by the model.
          - object — Action type "find_in_page": Searches for a pattern within a loaded page.
            - `type` 'find_in_page', required — The action type.
            - `url` string, uri, required — The URL of the page searched for the pattern.
            - `pattern` string, required — The pattern or text to search for within the page.
      - BetaFunctionToolCallResource — A tool call to run a function. See the [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `id` string, required — The unique ID of the function tool call.
        - `type` 'function_call', required — The type of the function tool call. Always `function_call`.
        - `call_id` string, required — The unique ID of the function tool call generated by the model.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCaller
            - `type` 'direct', required
          - BetaProgramToolCallCaller
            - `type` 'program', required
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `namespace` string — The namespace of the function to run.
        - `name` string, required — The name of the function to run.
        - `arguments` string, required — A JSON string of the arguments to pass to the function.
        - `status` 'in_progress' | 'completed' | 'incomplete', required — The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
        - `created_by` string — The identifier of the actor that created the item.
      - BetaFunctionToolCallOutputResource — The output of a function tool call.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `id` string, required — The unique ID of the function call tool output.
        - `type` 'function_call_output', required — The type of the function tool call output. Always `function_call_output`.
        - `call_id` string, required — The unique ID of the function tool call generated by the model.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCallerParam
            - `type` 'direct', required — The caller type. Always `direct`.
          - BetaProgramToolCallCallerParam
            - `type` 'program', required — The caller type. Always `program`.
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `output` union, required — The output from the function call generated by your code. Can be a string or an list of output content.
          - string — A string of the output of the function call.
          - BetaFunctionAndCustomToolCallOutput[] — Text, image, or file output of the function call.
            - union
              - …
        - `status` 'in_progress' | 'completed' | 'incomplete', required — The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
        - `created_by` string — The identifier of the actor that created the item.
      - BetaAgentMessage
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'agent_message', required — The type of the item. Always `agent_message`.
        - `id` string, required — The unique ID of the agent message.
        - `author` string, required — The sending agent identity.
        - `recipient` string, required — The destination agent identity.
        - `content` union[], required — Encrypted content sent between agents.
          - union — A content part that makes up an input or output item.
            - BetaInputTextContent — A text input to the model.
              - …
            - BetaOutputTextContent — A text output from the model.
              - …
            - BetaTextContent — A text content.
              - …
            - BetaSummaryTextContent — A summary text from the model.
              - …
            - BetaReasoningTextContent — Reasoning text from the model.
              - …
            - BetaRefusalContent — A refusal from the model.
              - …
            - BetaInputImageContent — An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).
              - …
            - BetaComputerScreenshotContent — A screenshot of a computer.
              - …
            - BetaInputFileContent — A file input to the model.
              - …
            - BetaEncryptedContent — Opaque encrypted content that Responses API decrypts inside trusted model execution.
              - …
      - BetaMultiAgentCall
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'multi_agent_call', required — The type of the multi-agent call. Always `multi_agent_call`.
        - `id` string, required — The unique ID of the multi-agent call item.
        - `call_id` string, required — The unique ID linking this call to its output.
        - `action` 'spawn_agent' | 'interrupt_agent' | 'list_agents' | 'send_message' | 'followup_task' | 'wait_agent', required
        - `arguments` string, required — The JSON string of arguments generated for the action.
      - BetaMultiAgentCallOutput
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'multi_agent_call_output', required — The type of the multi-agent result. Always `multi_agent_call_output`.
        - `id` string, required — The unique ID of the multi-agent call output item.
        - `call_id` string, required — The unique ID of the multi-agent call.
        - `action` 'spawn_agent' | 'interrupt_agent' | 'list_agents' | 'send_message' | 'followup_task' | 'wait_agent', required
        - `output` BetaOutputTextContent[], required — Text output returned by the multi-agent action.
          - `type` 'output_text', required — The type of the output text. Always `output_text`.
          - `text` string, required — The text output from the model.
          - `annotations` BetaAnnotation[], required — The annotations of the text output.
            - union — An annotation that applies to a span of output text.
              - …
          - `logprobs` BetaLogProb[]
            - `token` string, required
            - `logprob` number, required
            - `bytes` integer[], required
            - `top_logprobs` BetaTopLogProb[], required
              - …
      - BetaToolSearchCall
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'tool_search_call', required — The type of the item. Always `tool_search_call`.
        - `id` string, required — The unique ID of the tool search call item.
        - `call_id` string, nullable, required — The unique ID of the tool search call generated by the model.
        - `execution` 'server' | 'client', required
        - `arguments` unknown, required
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `created_by` string — The identifier of the actor that created the item.
      - BetaToolSearchOutput
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'tool_search_output', required — The type of the item. Always `tool_search_output`.
        - `id` string, required — The unique ID of the tool search output item.
        - `call_id` string, nullable, required — The unique ID of the tool search call generated by the model.
        - `execution` 'server' | 'client', required
        - `tools` BetaTool[], required — The loaded tool definitions returned by tool search.
          - union — A tool that can be used to generate a response.
            - BetaFunctionTool — 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).
              - …
            - BetaFileSearchTool — 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).
              - …
            - BetaComputerTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
              - …
            - BetaComputerUsePreviewTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
              - …
            - BetaWebSearchTool — 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).
              - …
            - BetaMCPTool — 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).
              - …
            - BetaCodeInterpreterTool — A tool that runs Python code to help generate a response to a prompt.
              - …
            - BetaProgrammaticToolCallingParam
              - …
            - BetaImageGenTool — A tool that generates images using the GPT image models.
              - …
            - BetaLocalShellToolParam — A tool that allows the model to execute shell commands in a local environment.
              - …
            - BetaFunctionShellToolParam — A tool that allows the model to execute shell commands.
              - …
            - BetaCustomToolParam — 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)
              - …
            - BetaNamespaceToolParam — Groups function/custom tools under a shared namespace.
              - …
            - BetaToolSearchToolParam — Hosted or BYOT tool search configuration for deferred tools.
              - …
            - BetaWebSearchPreviewTool — 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).
              - …
            - BetaApplyPatchToolParam — Allows the assistant to create, delete, or update files using unified diffs.
              - …
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `created_by` string — The identifier of the actor that created the item.
      - BetaAdditionalTools
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'additional_tools', required — The type of the item. Always `additional_tools`.
        - `id` string, required — The unique ID of the additional tools item.
        - `role` 'unknown' | 'user' | 'assistant' | 'system' | 'critic' | 'discriminator' | 'developer' | 'tool', required
        - `tools` BetaTool[], required — The additional tool definitions made available at this item.
          - union — A tool that can be used to generate a response.
            - BetaFunctionTool — 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).
              - …
            - BetaFileSearchTool — 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).
              - …
            - BetaComputerTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
              - …
            - BetaComputerUsePreviewTool — A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
              - …
            - BetaWebSearchTool — 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).
              - …
            - BetaMCPTool — 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).
              - …
            - BetaCodeInterpreterTool — A tool that runs Python code to help generate a response to a prompt.
              - …
            - BetaProgrammaticToolCallingParam
              - …
            - BetaImageGenTool — A tool that generates images using the GPT image models.
              - …
            - BetaLocalShellToolParam — A tool that allows the model to execute shell commands in a local environment.
              - …
            - BetaFunctionShellToolParam — A tool that allows the model to execute shell commands.
              - …
            - BetaCustomToolParam — 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)
              - …
            - BetaNamespaceToolParam — Groups function/custom tools under a shared namespace.
              - …
            - BetaToolSearchToolParam — Hosted or BYOT tool search configuration for deferred tools.
              - …
            - BetaWebSearchPreviewTool — 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).
              - …
            - BetaApplyPatchToolParam — Allows the assistant to create, delete, or update files using unified diffs.
              - …
      - BetaReasoningItem — 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).
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'reasoning', required — The type of the object. Always `reasoning`.
        - `id` string, required — The unique identifier of the reasoning content.
        - `encrypted_content` string, nullable — The encrypted content of the reasoning item. This is populated by default for reasoning items returned by `POST /v1/responses` and WebSocket `response.create` requests.
        - `summary` BetaSummaryTextContent[], required — Reasoning summary content.
          - `type` 'summary_text', required — The type of the object. Always `summary_text`.
          - `text` string, required — A summary of the reasoning output from the model so far.
        - `content` BetaReasoningTextContent[] — Reasoning text content.
          - `type` 'reasoning_text', required — The type of the reasoning text. Always `reasoning_text`.
          - `text` string, required — The reasoning text from the model.
        - `status` 'in_progress' | 'completed' | 'incomplete' — The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
      - BetaProgram
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'program', required — The type of the item. Always `program`.
        - `id` string, required — The unique ID of the program item.
        - `call_id` string, required — The stable call ID of the program item.
        - `code` string, required — The JavaScript source executed by programmatic tool calling.
        - `fingerprint` string, required — Opaque program replay fingerprint that must be round-tripped.
      - BetaProgramOutput
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'program_output', required — The type of the item. Always `program_output`.
        - `id` string, required — The unique ID of the program output item.
        - `call_id` string, required — The call ID of the program item.
        - `result` string, required — The result produced by the program item.
        - `status` 'completed' | 'incomplete', required
      - BetaCompactionBody — A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'compaction', required — The type of the item. Always `compaction`.
        - `id` string, required — The unique ID of the compaction item.
        - `encrypted_content` string, required — The encrypted content that was produced by compaction.
        - `created_by` string — The identifier of the actor that created the item.
      - BetaImageGenToolCall — An image generation request made by the model.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'image_generation_call', required — The type of the image generation call. Always `image_generation_call`.
        - `id` string, required — The unique ID of the image generation call.
        - `status` 'in_progress' | 'completed' | 'generating' | 'failed', required — The status of the image generation call.
        - `result` string, nullable, required — The generated image encoded in base64.
      - BetaCodeInterpreterToolCall — A tool call to run code.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'code_interpreter_call', required — The type of the code interpreter tool call. Always `code_interpreter_call`.
        - `id` string, required — The unique ID of the code interpreter tool call.
        - `status` 'in_progress' | 'completed' | 'incomplete' | 'interpreting' | 'failed', required — The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.
        - `container_id` string, required — The ID of the container used to run the code.
        - `code` string, nullable, required — The code to run, or null if not available.
        - `outputs` union[], nullable, required — The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.
          - union
            - BetaCodeInterpreterOutputLogs — The logs output from the code interpreter.
              - …
            - BetaCodeInterpreterOutputImage — The image output from the code interpreter.
              - …
      - BetaLocalShellToolCall — A tool call to run a command on the local shell.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'local_shell_call', required — The type of the local shell call. Always `local_shell_call`.
        - `id` string, required — The unique ID of the local shell call.
        - `call_id` string, required — The unique ID of the local shell tool call generated by the model.
        - `action` BetaLocalShellExecAction, required — Execute a shell command on the server.
          - `type` 'exec', required — The type of the local shell action. Always `exec`.
          - `command` string[], required — The command to run.
          - `timeout_ms` integer, nullable — Optional timeout in milliseconds for the command.
          - `working_directory` string, nullable — Optional working directory to run the command in.
          - `env` object, required — Environment variables to set for the command.
          - `user` string, nullable — Optional user to run the command as.
        - `status` 'in_progress' | 'completed' | 'incomplete', required — The status of the local shell call.
      - BetaLocalShellToolCallOutput — The output of a local shell tool call.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'local_shell_call_output', required — The type of the local shell tool call output. Always `local_shell_call_output`.
        - `id` string, required — The unique ID of the local shell tool call generated by the model.
        - `output` string, required — A JSON string of the output of the local shell tool call.
        - `status` 'in_progress' | 'completed' | 'incomplete', nullable — The status of the item. One of `in_progress`, `completed`, or `incomplete`.
      - BetaFunctionShellCall — A tool call that executes one or more shell commands in a managed environment.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'shell_call', required — The type of the item. Always `shell_call`.
        - `id` string, required — The unique ID of the shell tool call. Populated when this item is returned via API.
        - `call_id` string, required — The unique ID of the shell tool call generated by the model.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCaller
            - `type` 'direct', required
          - BetaProgramToolCallCaller
            - `type` 'program', required
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `action` BetaFunctionShellAction, required — Execute a shell command.
          - `commands` string[], required
          - `timeout_ms` integer, nullable, required — Optional timeout in milliseconds for the commands.
          - `max_output_length` integer, nullable, required — Optional maximum number of characters to return from each command.
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `environment` union, required
          - BetaLocalEnvironmentResource — Represents the use of a local environment to perform shell actions.
            - `type` 'local', required — The environment type. Always `local`.
          - BetaContainerReferenceResource — Represents a container created with /v1/containers.
            - `type` 'container_reference', required — The environment type. Always `container_reference`.
            - `container_id` string, required
        - `created_by` string — The ID of the entity that created this tool call.
      - BetaFunctionShellCallOutput — The output of a shell tool call that was emitted.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'shell_call_output', required — The type of the shell call output. Always `shell_call_output`.
        - `id` string, required — The unique ID of the shell call output. Populated when this item is returned via API.
        - `call_id` string, required — The unique ID of the shell tool call generated by the model.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCaller
            - `type` 'direct', required
          - BetaProgramToolCallCaller
            - `type` 'program', required
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `output` BetaFunctionShellCallOutputContent[], required — An array of shell call output contents
          - `stdout` string, required — The standard output that was captured.
          - `stderr` string, required — The standard error output that was captured.
          - `outcome` union, required — Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
            - BetaFunctionShellCallOutputTimeoutOutcome — Indicates that the shell call exceeded its configured time limit.
              - …
            - BetaFunctionShellCallOutputExitOutcome — Indicates that the shell commands finished and returned an exit code.
              - …
          - `created_by` string — The identifier of the actor that created the item.
        - `max_output_length` integer, nullable, required — The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.
        - `created_by` string — The identifier of the actor that created the item.
      - BetaApplyPatchToolCall — A tool call that applies file diffs by creating, deleting, or updating files.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'apply_patch_call', required — The type of the item. Always `apply_patch_call`.
        - `id` string, required — The unique ID of the apply patch tool call. Populated when this item is returned via API.
        - `call_id` string, required — The unique ID of the apply patch tool call generated by the model.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCaller
            - `type` 'direct', required
          - BetaProgramToolCallCaller
            - `type` 'program', required
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `status` 'in_progress' | 'completed', required
        - `operation` union, required — One of the create_file, delete_file, or update_file operations applied via apply_patch.
          - BetaApplyPatchCreateFileOperation — Instruction describing how to create a file via the apply_patch tool.
            - `type` 'create_file', required — Create a new file with the provided diff.
            - `path` string, required — Path of the file to create.
            - `diff` string, required — Diff to apply.
          - BetaApplyPatchDeleteFileOperation — Instruction describing how to delete a file via the apply_patch tool.
            - `type` 'delete_file', required — Delete the specified file.
            - `path` string, required — Path of the file to delete.
          - BetaApplyPatchUpdateFileOperation — Instruction describing how to update a file via the apply_patch tool.
            - `type` 'update_file', required — Update an existing file with the provided diff.
            - `path` string, required — Path of the file to update.
            - `diff` string, required — Diff to apply.
        - `created_by` string — The ID of the entity that created this tool call.
      - BetaApplyPatchToolCallOutput — The output emitted by an apply patch tool call.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'apply_patch_call_output', required — The type of the item. Always `apply_patch_call_output`.
        - `id` string, required — The unique ID of the apply patch tool call output. Populated when this item is returned via API.
        - `call_id` string, required — The unique ID of the apply patch tool call generated by the model.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCaller
            - `type` 'direct', required
          - BetaProgramToolCallCaller
            - `type` 'program', required
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `status` 'completed' | 'failed', required
        - `output` string, nullable — Optional textual output returned by the apply patch tool.
        - `created_by` string — The ID of the entity that created this tool call output.
      - BetaMCPListTools — A list of tools available on an MCP server.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'mcp_list_tools', required — The type of the item. Always `mcp_list_tools`.
        - `id` string, required — The unique ID of the list.
        - `server_label` string, required — The label of the MCP server.
        - `tools` BetaMCPListToolsTool[], required — The tools available on the server.
          - `name` string, required — The name of the tool.
          - `description` string, nullable — The description of the tool.
          - `input_schema` object, required — The JSON schema describing the tool's input.
          - `annotations` object, nullable — Additional annotations about the tool.
        - `error` string, nullable — Error message if the server could not list tools.
      - BetaMCPApprovalRequest — A request for human approval of a tool invocation.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'mcp_approval_request', required — The type of the item. Always `mcp_approval_request`.
        - `id` string, required — The unique ID of the approval request.
        - `server_label` string, required — The label of the MCP server making the request.
        - `name` string, required — The name of the tool to run.
        - `arguments` string, required — A JSON string of arguments for the tool.
      - BetaMCPApprovalResponseResource — A response to an MCP approval request.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'mcp_approval_response', required — The type of the item. Always `mcp_approval_response`.
        - `id` string, required — The unique ID of the approval response
        - `approval_request_id` string, required — The ID of the approval request being answered.
        - `approve` boolean, required — Whether the request was approved.
        - `reason` string, nullable — Optional reason for the decision.
      - BetaMCPToolCall — An invocation of a tool on an MCP server.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'mcp_call', required — The type of the item. Always `mcp_call`.
        - `id` string, required — The unique ID of the tool call.
        - `server_label` string, required — The label of the MCP server running the tool.
        - `name` string, required — The name of the tool that was run.
        - `arguments` string, required — A JSON string of the arguments passed to the tool.
        - `output` string, nullable — The output from the tool call.
        - `error` string, nullable — The error from the tool call, if any.
        - `status` 'in_progress' | 'completed' | 'incomplete' | 'calling' | 'failed'
        - `approval_request_id` string, nullable — Unique identifier for the MCP tool call approval request. Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.
      - BetaCustomToolCallResource — A call to a custom tool created by the model.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'custom_tool_call', required — The type of the custom tool call. Always `custom_tool_call`.
        - `id` string, required — The unique ID of the custom tool call item.
        - `call_id` string, required — An identifier used to map this custom tool call to a tool call output.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCaller
            - `type` 'direct', required
          - BetaProgramToolCallCaller
            - `type` 'program', required
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `namespace` string — The namespace of the custom tool being called.
        - `name` string, required — The name of the custom tool being called.
        - `input` string, required — The input for the custom tool call generated by the model.
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `created_by` string — The identifier of the actor that created the item.
      - BetaCustomToolCallOutputResource — The output of a custom tool call from your code, being sent back to the model.
        - `agent` BetaAgentTag
          - `agent_name` string, required — The canonical name of the agent that produced this item.
        - `type` 'custom_tool_call_output', required — The type of the custom tool call output. Always `custom_tool_call_output`.
        - `id` string, required — The unique ID of the custom tool call output item.
        - `call_id` string, required — The call ID, used to map this custom tool call output to a custom tool call.
        - `caller` union — The execution context that produced this tool call.
          - BetaDirectToolCallCallerParam
            - `type` 'direct', required — The caller type. Always `direct`.
          - BetaProgramToolCallCallerParam
            - `type` 'program', required — The caller type. Always `program`.
            - `caller_id` string, required — The call ID of the program item that produced this tool call.
        - `output` union, required — The output from the custom tool call generated by your code. Can be a string or an list of output content.
          - string — A string of the output of the custom tool call.
          - BetaFunctionAndCustomToolCallOutput[] — Text, image, or file output of the custom tool call.
            - union
              - …
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `created_by` string — The identifier of the actor that created the item.
  - `has_more` boolean, required — Whether there are more items available.
  - `first_id` string, required — The ID of the first item in the list.
  - `last_id` string, required — The ID of the last item in the list.

---

[API](https://skmtc.net/openai/apis/openai-api.md) · [All operations](https://skmtc.net/openai/apis/openai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api/versions/dcd35773a322/schema)
